diff options
Diffstat (limited to 'java/com/android/dialer/app/list/PhoneFavoriteTileView.java')
-rw-r--r-- | java/com/android/dialer/app/list/PhoneFavoriteTileView.java | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/java/com/android/dialer/app/list/PhoneFavoriteTileView.java b/java/com/android/dialer/app/list/PhoneFavoriteTileView.java index e0961be4b..3b27d3118 100644 --- a/java/com/android/dialer/app/list/PhoneFavoriteTileView.java +++ b/java/com/android/dialer/app/list/PhoneFavoriteTileView.java @@ -60,9 +60,10 @@ public abstract class PhoneFavoriteTileView extends ContactTileView { // don't crash with an NPE if the drag shadow is released in their bounds private static final ClipData EMPTY_CLIP_DATA = ClipData.newPlainText("", ""); /** View that contains the transparent shadow that is overlaid on top of the contact image. */ - private View mShadowOverlay; + private View shadowOverlay; /** Users' most frequent phone number. */ - private String mPhoneNumberString; + private String phoneNumberString; + private boolean isPinned; private boolean isStarred; private int position = -1; @@ -74,7 +75,7 @@ public abstract class PhoneFavoriteTileView extends ContactTileView { @Override protected void onFinishInflate() { super.onFinishInflate(); - mShadowOverlay = findViewById(R.id.shadow_overlay); + shadowOverlay = findViewById(R.id.shadow_overlay); setOnLongClickListener( new OnLongClickListener() { @@ -93,13 +94,13 @@ public abstract class PhoneFavoriteTileView extends ContactTileView { public void loadFromContact(ContactEntry entry) { super.loadFromContact(entry); // Set phone number to null in case we're reusing the view. - mPhoneNumberString = null; + phoneNumberString = null; isPinned = (entry.pinned != PinnedPositions.UNPINNED); isStarred = entry.isFavorite; if (entry != null) { sendViewNotification(getContext(), entry.lookupUri); // Grab the phone-number to call directly. See {@link onClick()}. - mPhoneNumberString = entry.phoneNumber; + phoneNumberString = entry.phoneNumber; // If this is a blank entry, don't show anything. For this to truly look like an empty row // the entire ContactTileRow needs to be hidden. @@ -141,7 +142,7 @@ public abstract class PhoneFavoriteTileView extends ContactTileView { callSpecificAppData.addSpeedDialContactType(SpeedDialContactType.Type.PINNED_CONTACT); } - if (TextUtils.isEmpty(mPhoneNumberString)) { + if (TextUtils.isEmpty(phoneNumberString)) { // Don't set performance report now, since user may spend some time on picking a number // Copy "superclass" implementation @@ -156,7 +157,7 @@ public abstract class PhoneFavoriteTileView extends ContactTileView { // call them at the number that you usually talk to them // at (i.e. the one displayed in the UI), regardless of // whether that's their default number. - mListener.onCallNumberDirectly(mPhoneNumberString, callSpecificAppData.build()); + mListener.onCallNumberDirectly(phoneNumberString, callSpecificAppData.build()); } } }; @@ -176,8 +177,8 @@ public abstract class PhoneFavoriteTileView extends ContactTileView { @Override protected void configureViewForImage(boolean isDefaultImage) { // Hide the shadow overlay if the image is a default image (i.e. colored letter tile) - if (mShadowOverlay != null) { - mShadowOverlay.setVisibility(isDefaultImage ? View.GONE : View.VISIBLE); + if (shadowOverlay != null) { + shadowOverlay.setVisibility(isDefaultImage ? View.GONE : View.VISIBLE); } } |