mirror of
https://github.com/M66B/FairEmail.git
synced 2026-04-05 08:33:37 +02:00
Prevent crash
This commit is contained in:
@@ -2433,7 +2433,11 @@ public class ServiceSynchronize extends ServiceBase implements SharedPreferences
|
||||
if (isBackgroundService(context))
|
||||
context.startService(intent);
|
||||
else
|
||||
ContextCompat.startForegroundService(context, intent);
|
||||
try {
|
||||
ContextCompat.startForegroundService(context, intent);
|
||||
} catch (Throwable ex) {
|
||||
Log.e(ex);
|
||||
}
|
||||
}
|
||||
|
||||
private static boolean isBackgroundService(Context context) {
|
||||
|
||||
Reference in New Issue
Block a user