aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTony Mak <tonymak@google.com>2016-03-08 12:23:23 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2016-03-08 12:23:24 +0000
commit63b0203a07ea9f8b61834ea6dec66562b961f410 (patch)
tree3fc2ddfacb4f3d864050cb091d6afe56a72a45e2
parentdc573da99e53cfbade8bdd2df844b1dbde796983 (diff)
parent5e854ef150a090cd0e77f2b9ebf4ef8609ac6135 (diff)
downloadContactsProvider-63b0203a07ea9f8b61834ea6dec66562b961f410.tar.gz
Merge "Update error msg when corp lookup key is not supported" into nyc-dev
-rw-r--r--src/com/android/providers/contacts/ContactLookupKey.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/com/android/providers/contacts/ContactLookupKey.java b/src/com/android/providers/contacts/ContactLookupKey.java
index be718a1a..fb3a6fec 100644
--- a/src/com/android/providers/contacts/ContactLookupKey.java
+++ b/src/com/android/providers/contacts/ContactLookupKey.java
@@ -16,8 +16,6 @@
package com.android.providers.contacts;
-import android.net.Uri;
-
import java.util.ArrayList;
/**
@@ -152,6 +150,9 @@ public class ContactLookupKey {
lookupType = LOOKUP_TYPE_DISPLAY_NAME;
} else if (c == 'r') {
lookupType = LOOKUP_TYPE_RAW_CONTACT_ID;
+ } else if (c == 'c') {
+ throw new IllegalArgumentException(
+ "Work contact lookup key is not accepted here: " + lookupKey);
} else {
throw new IllegalArgumentException("Invalid lookup id: " + lookupKey);
}