From c2cd6a9c669ec9bfb199e86bf223ab7c9f0af5b9 Mon Sep 17 00:00:00 2001 From: Ciaran Gultnieks Date: Wed, 24 Oct 2012 15:02:17 +0100 Subject: [PATCH] Avoid SQLite statement cache full warning --- src/org/fdroid/fdroid/DB.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/org/fdroid/fdroid/DB.java b/src/org/fdroid/fdroid/DB.java index add4d648a..db18b860d 100644 --- a/src/org/fdroid/fdroid/DB.java +++ b/src/org/fdroid/fdroid/DB.java @@ -562,9 +562,13 @@ public class DB { for (Apk apk : app.apks) { if (apkrepo == 0 || apkrepo == apk.repo) { - c = db.query(TABLE_APK, cols, "id = ? and vercode = " - + Integer.toString(apk.vercode), - new String[] { apk.id }, null, null, null, null); + c = db.query( + TABLE_APK, + cols, + "id = ? and vercode = ?", + new String[] { apk.id, + Integer.toString(apk.vercode) }, null, + null, null, null); c.moveToFirst(); apk.detail_hash = c.getString(0); apk.detail_hashType = c.getString(1);