Skip to content
This repository was archived by the owner on Mar 24, 2020. It is now read-only.

Commit 8963467

Browse files
committed
Fixed crash on delivering the same result from CursorLoader
1 parent 2697382 commit 8963467

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/java/android/support/v4/content/CursorLoader.java

+4-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,10 @@ public void deliverResult(Cursor cursor) {
6767
}
6868
Cursor oldCursor = mCursor;
6969
mCursor = cursor;
70-
mCursor.registerContentObserver(mObserver);
70+
71+
if (cursor != oldCursor) {
72+
mCursor.registerContentObserver(mObserver);
73+
}
7174

7275
if (isStarted()) {
7376
super.deliverResult(cursor);

0 commit comments

Comments
 (0)