diff options
author | Treehugger Robot <treehugger-gerrit@google.com> | 2018-03-17 00:27:22 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2018-03-17 00:27:22 +0000 |
commit | 33cfcb2d93a8c0421b32926fb94148a8171ad944 (patch) | |
tree | b259bf500b0e35b5366964aaec04465123683b67 | |
parent | 6121b933d52225cbea79918240703243bb30aa4f (diff) | |
parent | 7a266602c38a3faced884c4f0a4568bc89beca31 (diff) |
Merge "Remove contact id from all non-local directory contacts."
-rw-r--r-- | java/com/android/dialer/searchfragment/directories/DirectoryContactViewHolder.java | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/java/com/android/dialer/searchfragment/directories/DirectoryContactViewHolder.java b/java/com/android/dialer/searchfragment/directories/DirectoryContactViewHolder.java index 6e0a05a77..fbb662ce9 100644 --- a/java/com/android/dialer/searchfragment/directories/DirectoryContactViewHolder.java +++ b/java/com/android/dialer/searchfragment/directories/DirectoryContactViewHolder.java @@ -131,18 +131,7 @@ public final class DirectoryContactViewHolder extends RecyclerView.ViewHolder private static Uri getContactUri(SearchCursor cursor) { String lookupKey = cursor.getString(Projections.LOOKUP_KEY); - - Uri baseUri; - // If the contact is a local work contact, leave the contact id out of the uri since it - // isn't valid. - if (DirectoryCompat.isOnlyEnterpriseDirectoryId(cursor.getDirectoryId())) { - baseUri = Uri.withAppendedPath(Contacts.CONTENT_LOOKUP_URI, lookupKey); - } else { - long contactId = cursor.getLong(Projections.ID); - baseUri = Contacts.getLookupUri(contactId, lookupKey); - } - - return baseUri + return Uri.withAppendedPath(Contacts.CONTENT_LOOKUP_URI, lookupKey) .buildUpon() .appendQueryParameter( ContactsContract.DIRECTORY_PARAM_KEY, String.valueOf(cursor.getDirectoryId())) |