Fix single and double quotes issue in chat
This commit is contained in:
parent
124dad2da3
commit
b2d37fb596
1 changed files with 5 additions and 1 deletions
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue