summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnthony Lee <anthonylee@google.com>2014-12-03 20:43:12 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-12-03 20:43:12 +0000
commit148241019a0d3ecde22abcb1767a1be5c9e2caf6 (patch)
tree5a6b290b51155d61bb89905c19ceba32c20f7cf3
parentc718fb6a29e80b01de26147b40e0d5e5e7732063 (diff)
parent34c4a427e03ecdfb64233d6fcfba29f15eeaf556 (diff)
am 34c4a427: am df47edd9: NPE fix.
* commit '34c4a427e03ecdfb64233d6fcfba29f15eeaf556': NPE fix.
-rw-r--r--src/com/android/dialer/calllog/PhoneAccountUtils.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/com/android/dialer/calllog/PhoneAccountUtils.java b/src/com/android/dialer/calllog/PhoneAccountUtils.java
index 3979a3e5e..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;
}
/**