1
0
Fork 0
mirror of https://github.com/M66B/NetGuard.git synced 2024-12-30 20:05:04 +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); info = pm.getApplicationInfo(pkg[0], 0);
} catch (PackageManager.NameNotFoundException ignored) { } catch (PackageManager.NameNotFoundException ignored) {
} }
if (info == null) if (info == null || info.icon == 0)
ivIcon.setImageDrawable(null);
else if (info.icon == 0)
Picasso.with(context).load(android.R.drawable.sym_def_app_icon).into(ivIcon); Picasso.with(context).load(android.R.drawable.sym_def_app_icon).into(ivIcon);
else { else {
Uri uri = Uri.parse("android.resource://" + info.packageName + "/" + info.icon); Uri uri = Uri.parse("android.resource://" + info.packageName + "/" + info.icon);