Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 77780a4e authored by Sailesh Nepal's avatar Sailesh Nepal
Browse files

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

Bug: 17678017
Change-Id: I212a815af26af1d344092d874c057e9481642263
parent ecb8ebc8
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -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 {