From b2d37fb5967b728806d8c181a9941e2e0326d7a8 Mon Sep 17 00:00:00 2001 From: Sylvain Berfini Date: Mon, 14 Jan 2013 09:42:10 +0100 Subject: [PATCH] Fix single and double quotes issue in chat --- src/org/linphone/ChatStorage.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/org/linphone/ChatStorage.java b/src/org/linphone/ChatStorage.java index 5ccfc5458..55680c18e 100644 --- a/src/org/linphone/ChatStorage.java +++ b/src/org/linphone/ChatStorage.java @@ -57,7 +57,11 @@ public class ChatStorage { public void updateMessageStatus(String to, String message, int status) { ContentValues values = new ContentValues(); values.put("status", status); - db.update(TABLE_NAME, values, "direction LIKE " + OUTGOING + " AND remoteContact LIKE \"" + to + "\" AND message LIKE \"" + message + "\"", null); + + String where = "direction LIKE ? AND remoteContact LIKE ? AND message LIKE ?"; + String[] whereArgs = { String.valueOf(OUTGOING), to, message }; + + db.update(TABLE_NAME, values, where, whereArgs); } public void updateMessageStatus(String to, int id, int status) {