From a31413a325747aa91ff8002a0975e1651ad68325 Mon Sep 17 00:00:00 2001 From: Sandeep Siddhartha Date: Tue, 12 Aug 2014 17:20:07 -0700 Subject: Fix delete clause for sound model DB Since UUIDs contain '-'s they need to be wrapped within quotes Bug: 16985919 Change-Id: I624a512ca7fc2494a7737b5465c94a9e161dec88 --- .../java/com/android/server/voiceinteraction/DatabaseHelper.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'services/voiceinteraction/java') diff --git a/services/voiceinteraction/java/com/android/server/voiceinteraction/DatabaseHelper.java b/services/voiceinteraction/java/com/android/server/voiceinteraction/DatabaseHelper.java index f0ecafe..cc0d8df 100644 --- a/services/voiceinteraction/java/com/android/server/voiceinteraction/DatabaseHelper.java +++ b/services/voiceinteraction/java/com/android/server/voiceinteraction/DatabaseHelper.java @@ -130,8 +130,8 @@ public class DatabaseHelper extends SQLiteOpenHelper { synchronized(this) { SQLiteDatabase db = getWritableDatabase(); - String soundModelClause = SoundModelContract.KEY_MODEL_UUID + "=" - + modelUuid.toString(); + String soundModelClause = SoundModelContract.KEY_MODEL_UUID + "='" + + modelUuid.toString() + "'"; try { return db.delete(SoundModelContract.TABLE, soundModelClause, null) != 0; -- cgit v1.1