mirror of
https://github.com/M66B/FairEmail.git
synced 2026-03-26 19:05:23 +01:00
Prevent crash
This commit is contained in:
@@ -201,8 +201,13 @@ public class ServiceSynchronize extends ServiceBase implements SharedPreferences
|
||||
if (isBackgroundService(this))
|
||||
stopForeground(true);
|
||||
else
|
||||
startForeground(NotificationHelper.NOTIFICATION_SYNCHRONIZE,
|
||||
getNotificationService(null, null));
|
||||
try {
|
||||
startForeground(NotificationHelper.NOTIFICATION_SYNCHRONIZE,
|
||||
getNotificationService(null, null));
|
||||
} catch (Throwable ex) {
|
||||
Log.e(ex);
|
||||
stopSelf();
|
||||
}
|
||||
|
||||
isOptimizing = Boolean.FALSE.equals(Helper.isIgnoringOptimizations(this));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user