diff options
author | Jay Shrauner <shrauner@google.com> | 2015-03-13 12:34:30 -0700 |
---|---|---|
committer | Jay Shrauner <shrauner@google.com> | 2015-03-13 15:07:08 -0700 |
commit | 09e08ac8c9352f42003d2cd3a510bea96244ae0a (patch) | |
tree | 0feb4a55ab8d6fe1ff1f3f05f59cd44429079d6e /src/com | |
parent | 410c29fe803c63342ee73168cd27f4bf7eda1c0e (diff) | |
download | packages_providers_ContactsProvider-09e08ac8c9352f42003d2cd3a510bea96244ae0a.zip packages_providers_ContactsProvider-09e08ac8c9352f42003d2cd3a510bea96244ae0a.tar.gz packages_providers_ContactsProvider-09e08ac8c9352f42003d2cd3a510bea96244ae0a.tar.bz2 |
Protect against null lookup uri
Bug:19588470
Change-Id: Iadfed46a7de067513463f12fa72bdd658f5b07f8
Diffstat (limited to 'src/com')
-rw-r--r-- | src/com/android/providers/contacts/GlobalSearchSupport.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/com/android/providers/contacts/GlobalSearchSupport.java b/src/com/android/providers/contacts/GlobalSearchSupport.java index 6ccbd38..20307d4 100644 --- a/src/com/android/providers/contacts/GlobalSearchSupport.java +++ b/src/com/android/providers/contacts/GlobalSearchSupport.java @@ -244,8 +244,9 @@ public class GlobalSearchSupport { String.valueOf(SNIPPET_START_MATCH), String.valueOf(SNIPPET_END_MATCH), SNIPPET_ELLIPSIS, SNIPPET_MAX_TOKENS, false); } + sb.append(" WHERE " + Contacts.LOOKUP_KEY + " IS NOT NULL"); if (selection != null) { - sb.append(" WHERE ").append(selection); + sb.append(" AND ").append(selection); } if (limit != null) { sb.append(" LIMIT " + limit); |