diff options
Diffstat (limited to 'src/com/android/dialer/PhoneCallDetailsHelper.java')
-rw-r--r-- | src/com/android/dialer/PhoneCallDetailsHelper.java | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/com/android/dialer/PhoneCallDetailsHelper.java b/src/com/android/dialer/PhoneCallDetailsHelper.java index 37394c30f..0da0d0c39 100644 --- a/src/com/android/dialer/PhoneCallDetailsHelper.java +++ b/src/com/android/dialer/PhoneCallDetailsHelper.java @@ -115,19 +115,25 @@ public class PhoneCallDetailsHelper { } else { numberText = details.geocode; } - labelText = null; + labelText = numberText; // We have a real phone number as "nameView" so make it always LTR views.nameView.setTextDirection(View.TEXT_DIRECTION_LTR); } else { nameText = details.name; numberText = displayNumber; - labelText = numberFormattedLabel; + labelText = TextUtils.isEmpty(numberFormattedLabel) ? numberText : + numberFormattedLabel; // We have a real phone number as "numberView" so make it always LTR - views.numberView.setTextDirection(View.TEXT_DIRECTION_LTR); + if (views.numberView != null) { + views.numberView.setTextDirection(View.TEXT_DIRECTION_LTR); + } } views.nameView.setText(nameText); - views.numberView.setText(numberText); + if (views.numberView != null) { + views.numberView.setText(numberText); + } + views.labelView.setText(labelText); views.labelView.setVisibility(TextUtils.isEmpty(labelText) ? View.GONE : View.VISIBLE); } |