From 4c94db81853c549a797650adf0cc852ffd213d3c Mon Sep 17 00:00:00 2001 From: M66B Date: Tue, 23 Dec 2014 15:20:28 +0100 Subject: [PATCH] Disabled application icon caching Refs #2094 --- CHANGELOG.md | 1 + src/biz/bokhorst/xprivacy/ApplicationInfoEx.java | 11 +++++------ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 501ccbe97..36faad026 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,6 +21,7 @@ Changelog **Next release** +* Disabled application icon caching ([issue](/../../issues/2094)) * Removed Cydia Substrate support ([issue](/../../issues/2087)) [Open issues](https://github.com/M66B/XPrivacy/issues?state=open) diff --git a/src/biz/bokhorst/xprivacy/ApplicationInfoEx.java b/src/biz/bokhorst/xprivacy/ApplicationInfoEx.java index 042f3ba9a..0b0137255 100644 --- a/src/biz/bokhorst/xprivacy/ApplicationInfoEx.java +++ b/src/biz/bokhorst/xprivacy/ApplicationInfoEx.java @@ -31,7 +31,6 @@ public class ApplicationInfoEx implements Comparable { private Map mMapPkgInfo = new HashMap(); // Cache - private Drawable mIcon = null; private Boolean mInternet = null; private Boolean mFrozen = null; private long mInstallTime = -1; @@ -149,11 +148,11 @@ public List getPackageVersionCode(Context context) { } public Drawable getIcon(Context context) { - if (mIcon == null) - // Pick first icon - if (mMapAppInfo.size() > 0) - mIcon = mMapAppInfo.firstEntry().getValue().loadIcon(context.getPackageManager()); - return (mIcon == null ? new ColorDrawable(Color.TRANSPARENT) : mIcon); + // Pick first icon + if (mMapAppInfo.size() > 0) + return mMapAppInfo.firstEntry().getValue().loadIcon(context.getPackageManager()); + else + return new ColorDrawable(Color.TRANSPARENT); } public boolean hasInternet(Context context) {