Fixed notification race condition

This commit is contained in:
M66B
2019-09-18 21:36:10 +02:00
parent a233a1c9a4
commit ebf783e159
2 changed files with 8 additions and 5 deletions

View File

@@ -169,13 +169,13 @@ public class ServiceSynchronize extends ServiceBase {
if (tag != null && tag.startsWith("unseen.")) {
String[] p = tag.split(("\\."));
long group = Long.parseLong(p[1]);
long id = Long.parseLong(p[2]);
long id = sbn.getNotification().extras.getLong("id", 0);
if (!groupNotifying.containsKey(group))
groupNotifying.put(group, new ArrayList<>());
if (id > 0) {
Log.i("Notify restore " + tag);
Log.i("Notify restore " + tag + " id=" + id);
groupNotifying.get(group).add(id);
}
}