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

Commit 481d92c5 authored by Fyodor Kupolov's avatar Fyodor Kupolov Committed by android-build-merger
Browse files

Merge "Fix ContentObserver unregister issue"

am: 09b6988e

Change-Id: I242e87b53f603a05ba7c4069662456457a3d980a
parents 311b2a31 09b6988e
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -193,6 +193,11 @@ public abstract class ContentObserver {
     */
    private void dispatchChange(boolean selfChange, Uri uri, int userId) {
        if (mHandler == null) {
            synchronized (mLock) {
                if (mTransport == null) {
                    return;
                }
            }
            onChange(selfChange, uri, userId);
        } else {
            mHandler.post(new NotificationRunnable(selfChange, uri, userId));
@@ -213,6 +218,11 @@ public abstract class ContentObserver {

        @Override
        public void run() {
            synchronized (mLock) {
                if (mTransport == null) {
                    return;
                }
            }
            ContentObserver.this.onChange(mSelfChange, mUri, mUserId);
        }
    }