From 947aa9d7a94fde7dff8897f83686ebb90118ce45 Mon Sep 17 00:00:00 2001 From: M66B Date: Sat, 13 Oct 2018 10:48:55 +0000 Subject: [PATCH] Workaround Android 9 Pie bug --- app/src/main/java/eu/faircode/email/ServiceSynchronize.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/src/main/java/eu/faircode/email/ServiceSynchronize.java b/app/src/main/java/eu/faircode/email/ServiceSynchronize.java index 936d01a4..365daab0 100644 --- a/app/src/main/java/eu/faircode/email/ServiceSynchronize.java +++ b/app/src/main/java/eu/faircode/email/ServiceSynchronize.java @@ -1940,6 +1940,10 @@ public class ServiceSynchronize extends LifecycleService { SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(ServiceSynchronize.this); if (!prefs.getBoolean("enabled", true)) { EntityLog.log(ServiceSynchronize.this, "Not enabled, halt"); + try { + Thread.sleep(3000); + } catch (InterruptedException ignored) { + } stopSelf(); return; }