|
|
|
@ -168,7 +168,8 @@ public class ServiceSynchronize extends ServiceBase {
|
|
|
|
|
Map<Long, List<Long>> groupNotifying = new HashMap<>();
|
|
|
|
|
|
|
|
|
|
// Get existing notifications
|
|
|
|
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
|
|
|
|
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M)
|
|
|
|
|
try {
|
|
|
|
|
NotificationManager nm = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
|
|
|
|
|
for (StatusBarNotification sbn : nm.getActiveNotifications()) {
|
|
|
|
|
String tag = sbn.getTag();
|
|
|
|
@ -186,6 +187,17 @@ public class ServiceSynchronize extends ServiceBase {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
} catch (Throwable ex) {
|
|
|
|
|
Log.w(ex);
|
|
|
|
|
/*
|
|
|
|
|
java.lang.RuntimeException: Unable to create service eu.faircode.email.ServiceSynchronize: java.lang.NullPointerException: Attempt to invoke virtual method 'java.util.List android.content.pm.ParceledListSlice.getList()' on a null object reference
|
|
|
|
|
at android.app.ActivityThread.handleCreateService(ActivityThread.java:2944)
|
|
|
|
|
at android.app.ActivityThread.access$1900(ActivityThread.java:154)
|
|
|
|
|
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1474)
|
|
|
|
|
at android.os.Handler.dispatchMessage(Handler.java:102)
|
|
|
|
|
at android.os.Looper.loop(Looper.java:234)
|
|
|
|
|
at android.app.ActivityThread.main(ActivityThread.java:5526)
|
|
|
|
|
*/
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
db.message().liveUnseenNotify().observe(cowner, new Observer<List<TupleMessageEx>>() {
|
|
|
|
|