Remove contact id from all non-local directory contacts.

Bug: 72755010
Test: manaul
PiperOrigin-RevId: 189408046
Change-Id: Ia23442b2243e2008042e0046a21f840a30dbf008
diff --git a/java/com/android/dialer/searchfragment/directories/DirectoryContactViewHolder.java b/java/com/android/dialer/searchfragment/directories/DirectoryContactViewHolder.java
index 6e0a05a..fbb662c 100644
--- a/java/com/android/dialer/searchfragment/directories/DirectoryContactViewHolder.java
+++ b/java/com/android/dialer/searchfragment/directories/DirectoryContactViewHolder.java
@@ -131,18 +131,7 @@
 
   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()))