set cursor factory before the cursor is actually created
This commit is contained in:
1 parent
4967a49949
commit
fc6084a7ef
1 file changed
+1
-1
+1
-1
@@ -311,8 +311,8 @@ public class KeychainExternalProvider extends ContentProvider implements SimpleC
|
|||||||
}
|
}
|
||||||
|
|
||||||
qb.setStrict(true);
|
qb.setStrict(true);
|
||||||
Cursor cursor = qb.query(db, projection, null, null, groupBy, null, orderBy);
|
|
||||||
qb.setCursorFactory(new CloseDatabaseCursorFactory());
|
qb.setCursorFactory(new CloseDatabaseCursorFactory());
|
||||||
|
Cursor cursor = qb.query(db, projection, null, null, groupBy, null, orderBy);
|
||||||
if (cursor != null) {
|
if (cursor != null) {
|
||||||
// Tell the cursor what uri to watch, so it knows when its source data changes
|
// Tell the cursor what uri to watch, so it knows when its source data changes
|
||||||
cursor.setNotificationUri(getContext().getContentResolver(), uri);
|
cursor.setNotificationUri(getContext().getContentResolver(), uri);
|
||||||
|
|||||||
Reference in new issue
Block a user