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

Commit dfb7bc8c authored by Android (Google) Code Review's avatar Android (Google) Code Review
Browse files

Merge change 26821 into eclair

* changes:
  Make removeOnAccountsUpdateListener cope with null handlers.
parents 531e580a 5be61f5b
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -859,9 +859,10 @@ public class AccountManager {
            throw new IllegalArgumentException("the listener is null");
        }
        synchronized (mAccountsUpdatedListeners) {
            if (mAccountsUpdatedListeners.remove(listener) == null) {
            if (!mAccountsUpdatedListeners.containsKey(listener)) {
                throw new IllegalStateException("this listener was not previously added");
            }
            mAccountsUpdatedListeners.remove(listener);
            if (mAccountsUpdatedListeners.isEmpty()) {
                mContext.unregisterReceiver(mAccountsChangedBroadcastReceiver);
            }