Prevent crash

pull/153/head
M66B 6 years ago
parent 1657d1a836
commit f619dd09a3

@ -1500,7 +1500,11 @@ class Core {
boolean badge = prefs.getBoolean("badge", true);
Widget.update(context, messages.size());
ShortcutBadger.applyCount(context, badge ? messages.size() : 0);
try {
ShortcutBadger.applyCount(context, badge ? messages.size() : 0);
} catch (Throwable ex) {
Log.e(ex);
}
NotificationManager nm = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE);

@ -163,7 +163,11 @@ public class ServiceSynchronize extends LifecycleService {
cm.unregisterNetworkCallback(networkCallback);
Widget.update(this, -1);
ShortcutBadger.applyCount(this, 0);
try {
ShortcutBadger.applyCount(this, 0);
} catch (Throwable ex) {
Log.e(ex);
}
WorkerCleanup.cancel();

Loading…
Cancel
Save