diff options
author | calderwoodra <calderwoodra@google.com> | 2017-10-18 04:49:12 +0000 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2017-10-18 04:49:12 +0000 |
commit | df419c43b14e58e5241867e3bd2962a7b555f74f (patch) | |
tree | 7606a99d60659b38dbc4895e1826afac70e550de /java/com/android/dialer/searchfragment/remote | |
parent | 7f1dd720b96504ce706e4d7d8867211048bf5cfa (diff) | |
parent | 4b46ec2258373c76c44c900a3cfe93c1d28935a8 (diff) |
Merge changes Ib92b055d,I5c9f66ff
am: 4b46ec2258
Change-Id: I8cbfb88558d46cbdd3ed696b56774913d1839a78
Diffstat (limited to 'java/com/android/dialer/searchfragment/remote')
-rw-r--r-- | java/com/android/dialer/searchfragment/remote/RemoteContactViewHolder.java | 14 | ||||
-rw-r--r-- | java/com/android/dialer/searchfragment/remote/RemoteContactsCursorLoader.java | 2 |
2 files changed, 8 insertions, 8 deletions
diff --git a/java/com/android/dialer/searchfragment/remote/RemoteContactViewHolder.java b/java/com/android/dialer/searchfragment/remote/RemoteContactViewHolder.java index df3eacc5b..8a02eb9b9 100644 --- a/java/com/android/dialer/searchfragment/remote/RemoteContactViewHolder.java +++ b/java/com/android/dialer/searchfragment/remote/RemoteContactViewHolder.java @@ -64,7 +64,7 @@ public final class RemoteContactViewHolder extends RecyclerView.ViewHolder */ public void bind(SearchCursor cursor, String query) { number = cursor.getString(Projections.PHONE_NUMBER); - String name = cursor.getString(Projections.PHONE_DISPLAY_NAME); + String name = cursor.getString(Projections.DISPLAY_NAME); String label = getLabel(context.getResources(), cursor); String secondaryInfo = TextUtils.isEmpty(label) @@ -78,12 +78,12 @@ public final class RemoteContactViewHolder extends RecyclerView.ViewHolder if (shouldShowPhoto(cursor)) { nameView.setVisibility(View.VISIBLE); photo.setVisibility(View.VISIBLE); - String photoUri = cursor.getString(Projections.PHONE_PHOTO_URI); + String photoUri = cursor.getString(Projections.PHOTO_URI); ContactPhotoManager.getInstance(context) .loadDialerThumbnailOrPhoto( photo, getContactUri(cursor), - cursor.getLong(Projections.PHONE_PHOTO_ID), + cursor.getLong(Projections.PHOTO_ID), photoUri == null ? null : Uri.parse(photoUri), name, LetterTileDrawable.TYPE_DEFAULT); @@ -96,11 +96,11 @@ public final class RemoteContactViewHolder extends RecyclerView.ViewHolder // Show the contact photo next to only the first number if a contact has multiple numbers private boolean shouldShowPhoto(SearchCursor cursor) { int currentPosition = cursor.getPosition(); - String currentLookupKey = cursor.getString(Projections.PHONE_LOOKUP_KEY); + String currentLookupKey = cursor.getString(Projections.LOOKUP_KEY); cursor.moveToPosition(currentPosition - 1); if (!cursor.isHeader() && !cursor.isBeforeFirst()) { - String previousLookupKey = cursor.getString(Projections.PHONE_LOOKUP_KEY); + String previousLookupKey = cursor.getString(Projections.LOOKUP_KEY); cursor.moveToPosition(currentPosition); return !currentLookupKey.equals(previousLookupKey); } @@ -121,8 +121,8 @@ public final class RemoteContactViewHolder extends RecyclerView.ViewHolder } private static Uri getContactUri(SearchCursor cursor) { - long contactId = cursor.getLong(Projections.PHONE_ID); - String lookupKey = cursor.getString(Projections.PHONE_LOOKUP_KEY); + long contactId = cursor.getLong(Projections.ID); + String lookupKey = cursor.getString(Projections.LOOKUP_KEY); return Contacts.getLookupUri(contactId, lookupKey) .buildUpon() .appendQueryParameter( diff --git a/java/com/android/dialer/searchfragment/remote/RemoteContactsCursorLoader.java b/java/com/android/dialer/searchfragment/remote/RemoteContactsCursorLoader.java index 37695be50..eb472732f 100644 --- a/java/com/android/dialer/searchfragment/remote/RemoteContactsCursorLoader.java +++ b/java/com/android/dialer/searchfragment/remote/RemoteContactsCursorLoader.java @@ -54,7 +54,7 @@ public final class RemoteContactsCursorLoader extends CursorLoader { super( context, null, - Projections.PHONE_PROJECTION, + Projections.DATA_PROJECTION, IGNORE_NUMBER_TOO_LONG_CLAUSE, null, Phone.SORT_KEY_PRIMARY); |