set cursor factory before the cursor is actually created
This commit is contained in:
@@ -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