diff options
author | Tony Mak <tonymak@google.com> | 2016-03-08 12:18:06 +0000 |
---|---|---|
committer | Tony Mak <tonymak@google.com> | 2016-03-08 12:18:06 +0000 |
commit | 5e854ef150a090cd0e77f2b9ebf4ef8609ac6135 (patch) | |
tree | f927875a6ceaa962d829457a987fa116418c6f4f | |
parent | 03d89375880bd5693026cf2dcacc1810629cbc90 (diff) | |
download | ContactsProvider-5e854ef150a090cd0e77f2b9ebf4ef8609ac6135.tar.gz |
Update error msg when corp lookup key is not supported
Bug: 27146678
Change-Id: I3f0dfadde30d3fc30a914498580cc0febfbc0b36
-rw-r--r-- | src/com/android/providers/contacts/ContactLookupKey.java | 5 |
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); } |