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

Commit ec0c4f41 authored by Costin Manolache's avatar Costin Manolache
Browse files

Remove notifications for account when account is removed.

Change-Id: I21b5d757231401c10c922443cecd04b68f922c0b
parent f342ac91
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 {