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

Commit

Permalink
Disabled application icon caching
Browse files Browse the repository at this point in the history
Refs #2094
  • Loading branch information
M66B committed Dec 23, 2014
1 parent 1b4de0c commit 4c94db8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
11 changes: 5 additions & 6 deletions src/biz/bokhorst/xprivacy/ApplicationInfoEx.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ public class ApplicationInfoEx implements Comparable<ApplicationInfoEx> {
private Map<String, PackageInfo> mMapPkgInfo = new HashMap<String, PackageInfo>();

// Cache
private Drawable mIcon = null;
private Boolean mInternet = null;
private Boolean mFrozen = null;
private long mInstallTime = -1;
Expand Down Expand Up @@ -149,11 +148,11 @@ public List<Integer> 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) {
Expand Down

0 comments on commit 4c94db8

Please sign in to comment.