diff options
author | Ajay Panicker <apanicke@google.com> | 2016-12-14 18:43:07 -0800 |
---|---|---|
committer | Ajay Panicker <apanicke@google.com> | 2016-12-15 12:05:15 -0800 |
commit | 046debbf8704ce4a0e0e318567cddcba76b026e6 (patch) | |
tree | 4316c2bc72f5e5e6434a78d0dc5c5f436fe1723b | |
parent | d4961961db33fcaa59675d755d469f39ba638320 (diff) | |
download | android_packages_apps_Bluetooth-046debbf8704ce4a0e0e318567cddcba76b026e6.tar.gz android_packages_apps_Bluetooth-046debbf8704ce4a0e0e318567cddcba76b026e6.tar.bz2 android_packages_apps_Bluetooth-046debbf8704ce4a0e0e318567cddcba76b026e6.zip |
Prevent SQL query from having a bad where clause
Bug: 33092708
Test: Sanity test MAP on carkit
Change-Id: I6c7f54f60877cf2c57df9b3521604660321214ff
(cherry picked from commit 0552994436e2afdec3d35fed5aac0f87e8e3e0bb)
-rw-r--r-- | src/com/android/bluetooth/map/BluetoothMapContent.java | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/com/android/bluetooth/map/BluetoothMapContent.java b/src/com/android/bluetooth/map/BluetoothMapContent.java index 326f9ebce..2b7f4f3b5 100644 --- a/src/com/android/bluetooth/map/BluetoothMapContent.java +++ b/src/com/android/bluetooth/map/BluetoothMapContent.java @@ -1656,10 +1656,8 @@ public class BluetoothMapContent { private String setWhereFilterFolderType(BluetoothMapFolderElement folderElement, FilterInfo fi) { - String where = ""; - if(folderElement.shouldIgnore()) { - where = "1=1"; - } else { + String where = "1=1"; + if (!folderElement.shouldIgnore()) { if (fi.mMsgType == FilterInfo.TYPE_SMS) { where = setWhereFilterFolderTypeSms(folderElement.getName()); } else if (fi.mMsgType == FilterInfo.TYPE_MMS) { @@ -1670,6 +1668,7 @@ public class BluetoothMapContent { where = setWhereFilterFolderTypeIm(folderElement.getFolderId()); } } + return where; } |