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

Commit b9667384 authored by Amith Yamasani's avatar Amith Yamasani Committed by Gerrit Code Review
Browse files

Merge "onAccountsUpdated shouldn't be called back after listener unregistered"

parents 2c97ab6e 8d3e159b
Loading
Loading
Loading
Loading
+10 −6
Original line number Diff line number Diff line
@@ -1857,14 +1857,18 @@ public class AccountManager {
        handler = (handler == null) ? mMainHandler : handler;
        handler.post(new Runnable() {
            public void run() {
                synchronized (mAccountsUpdatedListeners) {
                    try {
                        if (mAccountsUpdatedListeners.containsKey(listener)) {
                            listener.onAccountsUpdated(accountsCopy);
                        }
                    } catch (SQLException e) {
                        // Better luck next time.  If the problem was disk-full,
                        // the STORAGE_OK intent will re-trigger the update.
                        Log.e(TAG, "Can't update accounts", e);
                    }
                }
            }
        });
    }