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:
parent
56421a954f
commit
719094d103
1 changed files with 1 additions and 3 deletions
|
@ -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);
|
||||||
|
|
Loading…
Reference in a new issue