Added fail safe

This commit is contained in:
M66B 2022-03-23 08:32:47 +01:00
parent 7581bd22e6
commit 3b1b66ec7b
1 changed files with 43 additions and 39 deletions

View File

@ -249,6 +249,7 @@ public class ApplicationEx extends Application
@Override @Override
public void onSharedPreferenceChanged(SharedPreferences sharedPreferences, String key) { public void onSharedPreferenceChanged(SharedPreferences sharedPreferences, String key) {
try {
switch (key) { switch (key) {
case "enabled": case "enabled":
ServiceSynchronize.reschedule(this); ServiceSynchronize.reschedule(this);
@ -289,6 +290,9 @@ public class ApplicationEx extends Application
Log.setLevel(this); Log.setLevel(this);
break; break;
} }
} catch (Throwable ex) {
Log.e(ex);
}
} }
static void restart(Context context) { static void restart(Context context) {