close cursors after querying phone db

This commit is contained in:
iNPUTmice 2014-12-03 23:29:35 +01:00
parent e623e28487
commit 2274c38726

View File

@ -64,6 +64,7 @@ public class PhoneHelper {
if (listener != null) { if (listener != null) {
listener.onPhoneContactsLoaded(phoneContacts); listener.onPhoneContactsLoaded(phoneContacts);
} }
cursor.close();
} }
}); });
try { try {
@ -85,6 +86,7 @@ public class PhoneHelper {
} else { } else {
mProfileCursor.moveToFirst(); mProfileCursor.moveToFirst();
String uri = mProfileCursor.getString(1); String uri = mProfileCursor.getString(1);
mProfileCursor.close();
if (uri == null) { if (uri == null) {
return null; return null;
} else { } else {