summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--telecomm/java/android/telecom/PhoneAccount.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/telecomm/java/android/telecom/PhoneAccount.java b/telecomm/java/android/telecom/PhoneAccount.java
index 4b059b24..062baa5 100644
--- a/telecomm/java/android/telecom/PhoneAccount.java
+++ b/telecomm/java/android/telecom/PhoneAccount.java
@@ -380,12 +380,17 @@ public class PhoneAccount implements Parcelable {
}
private Drawable getIcon(Context context, int resId) {
+ if (resId == 0) {
+ return null;
+ }
+
Context packageContext;
try {
packageContext = context.createPackageContext(
mAccountHandle.getComponentName().getPackageName(), 0);
} catch (PackageManager.NameNotFoundException e) {
- Log.w(this, "Cannot find package %s", mAccountHandle.getComponentName().getPackageName());
+ Log.w(this, "Cannot find package %s",
+ mAccountHandle.getComponentName().getPackageName());
return null;
}
try {