Show default icon in access log for root/mediaserver/unknown packages

This commit is contained in:
M66B 2016-02-07 10:12:00 +01:00
parent 56421a954f
commit 719094d103
1 changed files with 1 additions and 3 deletions

View File

@ -192,9 +192,7 @@ public class LogAdapter extends CursorAdapter {
info = pm.getApplicationInfo(pkg[0], 0);
} catch (PackageManager.NameNotFoundException ignored) {
}
if (info == null)
ivIcon.setImageDrawable(null);
else if (info.icon == 0)
if (info == null || info.icon == 0)
Picasso.with(context).load(android.R.drawable.sym_def_app_icon).into(ivIcon);
else {
Uri uri = Uri.parse("android.resource://" + info.packageName + "/" + info.icon);