This commit is contained in:
M66B 2016-01-10 14:13:36 +01:00
parent c7d288cacc
commit 1535b841e9
2 changed files with 4 additions and 1 deletions

View File

@ -98,6 +98,7 @@
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/manifests" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/objectFiles" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/pre-dexed" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/proguard-rules" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/res" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/rs" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/symbols" />

View File

@ -105,8 +105,10 @@ public class LogAdapter extends CursorAdapter {
info = pm.getApplicationInfo(pkg[0], 0);
} catch (PackageManager.NameNotFoundException ignored) {
}
if (info == null || info.icon == 0)
if (info == null)
ivIcon.setImageDrawable(null);
else if (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);
Picasso.with(context).load(uri).into(ivIcon);