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

Commit e56b0969 authored by Chris Wren's avatar Chris Wren Committed by Android (Google) Code Review
Browse files

Merge "re-try notification subscriptions if they fail" into ics-ub-calendar-denim

parents d2b0d8ab 6f823320
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;