1
0
Fork 0
mirror of https://github.com/M66B/NetGuard.git synced 2024-12-28 10:51:14 +00:00

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

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);