From c683c795aa43c343da972b36a940b9cfbada6775 Mon Sep 17 00:00:00 2001 From: Andrew Lee Date: Thu, 18 Jun 2015 12:00:08 -0700 Subject: Do not set type label if "Custom". If the label type is "Custom", it falls back to the number label to display. But, if the number label is empty we do not want to show "Custom" as the label type, so skip in this case. Bug: 21814339 Change-Id: Icfee49aef3c73ceaf81b6f9e767436a4188db119 --- src/com/android/dialer/PhoneCallDetailsHelper.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/com/android/dialer/PhoneCallDetailsHelper.java b/src/com/android/dialer/PhoneCallDetailsHelper.java index 68b47afcf..672a1c8e9 100644 --- a/src/com/android/dialer/PhoneCallDetailsHelper.java +++ b/src/com/android/dialer/PhoneCallDetailsHelper.java @@ -183,7 +183,9 @@ public class PhoneCallDetailsHelper { if (TextUtils.isEmpty(details.name) && !TextUtils.isEmpty(details.geocode)) { numberFormattedLabel = details.geocode; - } else { + } else if (!(details.numberType == Phone.TYPE_CUSTOM + && TextUtils.isEmpty(details.numberLabel))) { + // Get type label only if it will not be "Custom" because of an empty number label. numberFormattedLabel = Phone.getTypeLabel( mResources, details.numberType, details.numberLabel); } -- cgit v1.2.3