diff --git a/app/src/main/java/eu/faircode/email/ServiceExternal.java b/app/src/main/java/eu/faircode/email/ServiceExternal.java index 42c001d706..6ac58a37bb 100644 --- a/app/src/main/java/eu/faircode/email/ServiceExternal.java +++ b/app/src/main/java/eu/faircode/email/ServiceExternal.java @@ -81,7 +81,12 @@ public class ServiceExternal extends ServiceBase { @Override public void onTimeout(int startId) { - Log.e(new Throwable("onTimeout")); + String msg = "onTimeout" + + " class=" + this.getClass().getName() + + " ignoring=" + Helper.isIgnoringOptimizations(this); + Log.e(new Throwable(msg)); + EntityLog.log(this, EntityLog.Type.Debug3, msg); + stopSelf(); } @Override diff --git a/app/src/main/java/eu/faircode/email/ServiceSend.java b/app/src/main/java/eu/faircode/email/ServiceSend.java index c830320650..a041a4b242 100644 --- a/app/src/main/java/eu/faircode/email/ServiceSend.java +++ b/app/src/main/java/eu/faircode/email/ServiceSend.java @@ -211,7 +211,12 @@ public class ServiceSend extends ServiceBase implements SharedPreferences.OnShar @Override public void onTimeout(int startId) { - Log.e(new Throwable("onTimeout")); + String msg = "onTimeout" + + " class=" + this.getClass().getName() + + " ignoring=" + Helper.isIgnoringOptimizations(this); + Log.e(new Throwable(msg)); + EntityLog.log(this, EntityLog.Type.Debug3, msg); + stopSelf(); } @Override diff --git a/app/src/main/java/eu/faircode/email/ServiceSynchronize.java b/app/src/main/java/eu/faircode/email/ServiceSynchronize.java index 2ffad14062..fe5377d223 100644 --- a/app/src/main/java/eu/faircode/email/ServiceSynchronize.java +++ b/app/src/main/java/eu/faircode/email/ServiceSynchronize.java @@ -1194,7 +1194,12 @@ public class ServiceSynchronize extends ServiceBase implements SharedPreferences @Override public void onTimeout(int startId) { - Log.e(new Throwable("onTimeout")); + String msg = "onTimeout" + + " class=" + this.getClass().getName() + + " ignoring=" + Helper.isIgnoringOptimizations(this); + Log.e(new Throwable(msg)); + EntityLog.log(this, EntityLog.Type.Debug3, msg); + stopSelf(); } private void onEnable(Intent intent) {