Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6f823320 authored by Chris Wren's avatar Chris Wren
Browse files

re-try notification subscriptions if they fail

Bug: 8754701
Change-Id: I6e3823b09b9e6d24f7b83155fb1968be65c48a52
parent a65f4e87
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -145,15 +145,16 @@ public class GlobalDismissManager extends BroadcastReceiver {
                if (cnb.open(context)) {
                    for (String account : accounts) {
                        try {
                            cnb.subscribeToGroup(senderId, account, account);
                            accounts.add(account);
                            if (cnb.subscribeToGroup(senderId, account, account)) {
                                existingAccounts.add(account);
                            }
                        } catch (IOException e) {
                            // Try again, next time the account triggers and alert.
                        }
                    }
                    cnb.close();
                    prefs.edit()
                    .putStringSet(ACCOUNT_KEY, accounts)
                    .putStringSet(ACCOUNT_KEY, existingAccounts)
                    .commit();
                }
                return null;