mirror of https://github.com/M66B/FairEmail.git
Added fail safe
This commit is contained in:
parent
7581bd22e6
commit
3b1b66ec7b
|
@ -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) {
|
||||||
|
|
Loading…
Reference in New Issue