diff options
Diffstat (limited to 'src/com/android/dialer/calllog/PhoneAccountUtils.java')
-rw-r--r-- | src/com/android/dialer/calllog/PhoneAccountUtils.java | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/com/android/dialer/calllog/PhoneAccountUtils.java b/src/com/android/dialer/calllog/PhoneAccountUtils.java index 2eaf94937..adeec0f2b 100644 --- a/src/com/android/dialer/calllog/PhoneAccountUtils.java +++ b/src/com/android/dialer/calllog/PhoneAccountUtils.java @@ -18,7 +18,6 @@ package com.android.dialer.calllog; import android.content.ComponentName; import android.content.Context; -import android.graphics.drawable.Drawable; import android.telecom.PhoneAccount; import android.telecom.PhoneAccountHandle; import android.telecom.TelecomManager; @@ -65,7 +64,10 @@ public class PhoneAccountUtils { */ public static String getAccountLabel(Context context, PhoneAccountHandle accountHandle) { PhoneAccount account = getAccountOrNull(context, accountHandle); - return account == null ? null : account.getLabel().toString(); + if (account != null && account.getLabel() != null) { + return account.getLabel().toString(); + } + return null; } /** @@ -73,7 +75,7 @@ public class PhoneAccountUtils { */ public static int getAccountColor(Context context, PhoneAccountHandle accountHandle) { PhoneAccount account = getAccountOrNull(context, accountHandle); - return account == null ? PhoneAccount.NO_COLOR : account.getHighlightColor(); + return account == null ? PhoneAccount.NO_HIGHLIGHT_COLOR : account.getHighlightColor(); } /** |