Autofix notification security exception

This commit is contained in:
M66B 2019-06-09 10:37:51 +02:00
parent 9f5c62f534
commit 16b1552bc2
1 changed files with 3 additions and 1 deletions

View File

@ -170,7 +170,9 @@ public class ServiceSynchronize extends LifecycleService {
try {
Core.notifyMessages(ServiceSynchronize.this, notifying, messages);
} catch (SecurityException ex) {
android.util.Log.e(Log.TAG, ex + "\n" + android.util.Log.getStackTraceString(ex));
Log.w(ex);
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(ServiceSynchronize.this);
prefs.edit().remove("sound").apply();
} catch (Throwable ex) {
Log.e(ex);
}