Prevent crash on work manager init

pull/156/head
M66B 6 years ago
parent b80f7db3cb
commit d274ea64f6

@ -106,7 +106,15 @@ public class ApplicationEx extends Application {
MessageHelper.setSystemProperties();
ContactInfo.init(this, new Handler());
try {
WorkerWatchdog.init(this);
} catch (Throwable ex) {
// Incorrect:
// java.lang.RuntimeException: Unable to create application eu.faircode.email.ApplicationEx:
// java.lang.IllegalStateException: WorkManager is not initialized properly.
Log.e(ex);
}
}
@Override

Loading…
Cancel
Save