Merge "Fix ContentObserver unregister issue" am: 09b6988e27 am: 481d92c517

am: aee5787b48

Change-Id: I6cbd47b7158d5ccd207c0ce57ca613ebc7822b5f
This commit is contained in:
Fyodor Kupolov
2017-07-06 18:37:34 +00:00
committed by android-build-merger

View File

@@ -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);
}
}