summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrew Lee <anwlee@google.com>2015-06-18 12:00:08 -0700
committerAndrew Lee <anwlee@google.com>2015-06-18 12:01:19 -0700
commitc683c795aa43c343da972b36a940b9cfbada6775 (patch)
tree1c144d4a4f396ec77df0a4507e945b6a013c3b70 /src
parente445ae79d87f70f207c1a16a3585c03f577b901f (diff)
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
Diffstat (limited to 'src')
-rw-r--r--src/com/android/dialer/PhoneCallDetailsHelper.java4
1 files changed, 3 insertions, 1 deletions
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);
}