From 2274c387265a410f3ce4f2da1703cf93cdfdbcd7 Mon Sep 17 00:00:00 2001 From: iNPUTmice Date: Wed, 3 Dec 2014 23:29:35 +0100 Subject: [PATCH] close cursors after querying phone db --- src/main/java/eu/siacs/conversations/utils/PhoneHelper.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/java/eu/siacs/conversations/utils/PhoneHelper.java b/src/main/java/eu/siacs/conversations/utils/PhoneHelper.java index 5becc7e79..879731591 100644 --- a/src/main/java/eu/siacs/conversations/utils/PhoneHelper.java +++ b/src/main/java/eu/siacs/conversations/utils/PhoneHelper.java @@ -64,6 +64,7 @@ public class PhoneHelper { if (listener != null) { listener.onPhoneContactsLoaded(phoneContacts); } + cursor.close(); } }); try { @@ -85,6 +86,7 @@ public class PhoneHelper { } else { mProfileCursor.moveToFirst(); String uri = mProfileCursor.getString(1); + mProfileCursor.close(); if (uri == null) { return null; } else {