diff options
author | Treehugger Robot <treehugger-gerrit@google.com> | 2017-09-07 14:58:36 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2017-09-07 14:58:36 +0000 |
commit | 4662229bb3c8053a27b0030a0da359f4d99b042e (patch) | |
tree | 862d8001fffab8adc8b0dd13b68d9871bd14068a /java/com/android/dialer/searchfragment/remote/RemoteContactViewHolder.java | |
parent | 54601a6cc03220108ac93c0663667d09b83eb074 (diff) | |
parent | cc2cde0555bd49362f7631c64d24221b24ed71c8 (diff) |
Merge changes I4b5a494b,I4b6f7ca8
* changes:
Added logging to aid debugging of issue where dialer shows blank screen.
NewSearchFragment contact photos now properly open quick contact cards.
Diffstat (limited to 'java/com/android/dialer/searchfragment/remote/RemoteContactViewHolder.java')
-rw-r--r-- | java/com/android/dialer/searchfragment/remote/RemoteContactViewHolder.java | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/java/com/android/dialer/searchfragment/remote/RemoteContactViewHolder.java b/java/com/android/dialer/searchfragment/remote/RemoteContactViewHolder.java index 5fb12d349..df3eacc5b 100644 --- a/java/com/android/dialer/searchfragment/remote/RemoteContactViewHolder.java +++ b/java/com/android/dialer/searchfragment/remote/RemoteContactViewHolder.java @@ -22,6 +22,7 @@ import android.database.Cursor; import android.net.Uri; import android.provider.ContactsContract; import android.provider.ContactsContract.CommonDataKinds.Phone; +import android.provider.ContactsContract.Contacts; import android.support.v7.widget.RecyclerView; import android.text.TextUtils; import android.view.View; @@ -119,10 +120,14 @@ public final class RemoteContactViewHolder extends RecyclerView.ViewHolder return (String) Phone.getTypeLabel(resources, numberType, numberLabel); } - private static Uri getContactUri(Cursor cursor) { + private static Uri getContactUri(SearchCursor cursor) { long contactId = cursor.getLong(Projections.PHONE_ID); String lookupKey = cursor.getString(Projections.PHONE_LOOKUP_KEY); - return ContactsContract.Contacts.getLookupUri(contactId, lookupKey); + return Contacts.getLookupUri(contactId, lookupKey) + .buildUpon() + .appendQueryParameter( + ContactsContract.DIRECTORY_PARAM_KEY, String.valueOf(cursor.getDirectoryId())) + .build(); } @Override |