From 7f456497b9f8c7df49ba99b1db81de50fad7be58 Mon Sep 17 00:00:00 2001 From: Richard MacGregor Date: Tue, 26 Apr 2016 09:43:51 -0700 Subject: Fix number label in quick contacts recent calls list Custom number label were not being shown in recent calls list due to database entry for number type being null instead of a valid integer. Use InCallApi plugin name as label if available, becauase some plugins use the label column for strings that are too long to be considered a label. Ticket CD-460 Change-Id: Ic10cf4bbc6edea8dc7363f7897756df61385581d --- src/com/android/contacts/interactions/CallLogInteraction.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/com/android/contacts/interactions/CallLogInteraction.java b/src/com/android/contacts/interactions/CallLogInteraction.java index 4dd3e366b..0496bb25a 100644 --- a/src/com/android/contacts/interactions/CallLogInteraction.java +++ b/src/com/android/contacts/interactions/CallLogInteraction.java @@ -105,10 +105,14 @@ public class CallLogInteraction implements ContactInteraction { public String getViewBody(Context context) { Integer numberType = getCachedNumberType(); if (numberType == null) { - return null; + numberType = Phone.TYPE_CUSTOM; } - return Phone.getTypeLabel(context.getResources(), getCachedNumberType(), - getCachedNumberLabel()).toString(); + + final String cachedNumberLabel = getCachedNumberLabel(); + final String label = ContactDisplayUtils.getLabelForCall(context, getNumber(), numberType, + cachedNumberLabel, mPluginName); + + return label; } @Override -- cgit v1.2.3