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

Commit aa3e778b authored by Costin Manolache's avatar Costin Manolache Committed by Android (Google) Code Review
Browse files

Merge "Remove notifications for account when account is removed."

parents 7eea0f18 ec0c4f41
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -520,6 +520,18 @@ public class AccountManagerService
        if (account == null) throw new IllegalArgumentException("account is null");
        checkManageAccountsPermission();
        long identityToken = clearCallingIdentity();

        cancelNotification(getSigninRequiredNotificationId(account));
        synchronized(mCredentialsPermissionNotificationIds) {
            for (Pair<Pair<Account, String>, Integer> pair:
                mCredentialsPermissionNotificationIds.keySet()) {
                if (account.equals(pair.first.first)) {
                    int id = mCredentialsPermissionNotificationIds.get(pair);
                    cancelNotification(id);
                }
            }
        }

        try {
            new RemoveAccountSession(response, account).bind();
        } finally {