1
0
Fork 0
mirror of https://github.com/M66B/FairEmail.git synced 2025-03-03 18:26:20 +00:00

Check main app

This commit is contained in:
M66B 2020-01-19 09:09:50 +01:00
parent 2cb27d05d4
commit d7458a8792

View file

@ -1204,6 +1204,12 @@ public class ServiceSynchronize extends ServiceBase implements SharedPreferences
if (!iservice.getStore().isConnected())
throw new StoreClosedException(iservice.getStore(), "NOOP");
if (!ServiceSynchronize.this.getMainLooper().getThread().isAlive()) {
Log.e("App died");
state.stop();
throw new StoreClosedException(iservice.getStore(), "App died");
}
if (sync)
for (EntityFolder folder : mapFolders.keySet())
if (folder.synchronize)