Don't print error log if phone account icon is missing

Bug: 17678017
Change-Id: I212a815af26af1d344092d874c057e9481642263
This commit is contained in:
Sailesh Nepal
2014-09-26 18:12:00 -07:00
parent ecb8ebc8bb
commit 77780a4e37

View File

@@ -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 {