diff options
author | iNPUTmice <daniel@gultsch.de> | 2014-10-08 14:10:37 +0200 |
---|---|---|
committer | iNPUTmice <daniel@gultsch.de> | 2014-10-08 14:10:37 +0200 |
commit | 10411944b1bd18c0b5d7b1353f4c55eb0ec4aff6 (patch) | |
tree | 013a1756234483f8a5f3f59c525c032e5a464048 /src/eu/siacs/conversations/persistance/DatabaseBackend.java | |
parent | 3d88ffc5cd4b9e500048557f9ce5f01653123526 (diff) |
bullet proofing some code
Diffstat (limited to '')
-rw-r--r-- | src/eu/siacs/conversations/persistance/DatabaseBackend.java | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/eu/siacs/conversations/persistance/DatabaseBackend.java b/src/eu/siacs/conversations/persistance/DatabaseBackend.java index 0231c0e7..0991dd2d 100644 --- a/src/eu/siacs/conversations/persistance/DatabaseBackend.java +++ b/src/eu/siacs/conversations/persistance/DatabaseBackend.java @@ -210,6 +210,7 @@ public class DatabaseBackend extends SQLiteOpenHelper { while (cursor.moveToNext()) { list.add(Account.fromCursor(cursor)); } + cursor.close(); return list; } @@ -232,6 +233,7 @@ public class DatabaseBackend extends SQLiteOpenHelper { + Account.TABLENAME + " where not options & (1 <<1)", null); cursor.moveToFirst(); int count = cursor.getInt(0); + cursor.close(); return (count > 0); } @@ -258,6 +260,7 @@ public class DatabaseBackend extends SQLiteOpenHelper { while (cursor.moveToNext()) { roster.initContact(Contact.fromCursor(cursor)); } + cursor.close(); } public void writeRoster(Roster roster) { |