Skip to content
This repository has been archived by the owner on Sep 6, 2019. It is now read-only.

Commit

Permalink
Better Andy ;-)
Browse files Browse the repository at this point in the history
Refs #2095
  • Loading branch information
M66B committed Dec 24, 2014
1 parent 326cbcf commit 4fef50e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
6 changes: 1 addition & 5 deletions src/biz/bokhorst/xprivacy/ActivityMain.java
Original file line number Diff line number Diff line change
Expand Up @@ -1988,11 +1988,7 @@ else if (state == ApplicationInfoEx.STATE_SHARED)
getThemed(R.attr.color_state_restricted)));

// Display icon
Bitmap bm = xAppInfo.getIconBitmap(ActivityMain.this);
if (bm == null)
holder.imgIcon.setImageDrawable(xAppInfo.getIcon(ActivityMain.this));
else
holder.imgIcon.setImageBitmap(bm);
holder.imgIcon.setImageBitmap(xAppInfo.getIconBitmap(ActivityMain.this));
holder.imgIcon.setVisibility(View.VISIBLE);

// Display on demand
Expand Down
2 changes: 2 additions & 0 deletions src/biz/bokhorst/xprivacy/ApplicationInfoEx.java
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,8 @@ public Bitmap getIconBitmap(Context context) {
if (mMapAppInfo.size() > 0) {
try {
final ApplicationInfo appInfo = mMapAppInfo.firstEntry().getValue();
if (appInfo.icon == 0)
appInfo.icon = android.R.drawable.sym_def_app_icon;
final Resources resources = context.getPackageManager().getResourcesForApplication(appInfo);

final BitmapFactory.Options options = new BitmapFactory.Options();
Expand Down

0 comments on commit 4fef50e

Please sign in to comment.