diff --git a/src/biz/bokhorst/xprivacy/ApplicationInfoEx.java b/src/biz/bokhorst/xprivacy/ApplicationInfoEx.java index 95bfa83d9..241b055c3 100644 --- a/src/biz/bokhorst/xprivacy/ApplicationInfoEx.java +++ b/src/biz/bokhorst/xprivacy/ApplicationInfoEx.java @@ -26,6 +26,7 @@ @SuppressLint("DefaultLocale") public class ApplicationInfoEx implements Comparable { + private int mUid; private TreeMap mMapAppInfo = null; private Map mMapPkgInfo = new HashMap(); @@ -39,6 +40,7 @@ public class ApplicationInfoEx implements Comparable { private long mUpdateTime = -1; public ApplicationInfoEx(Context context, int uid) { + mUid = uid; mMapAppInfo = new TreeMap(); PackageManager pm = context.getPackageManager(); String[] packages = pm.getPackagesForUid(uid); @@ -185,11 +187,7 @@ public boolean isFrozen(Context context) { } public int getUid() { - // All listed uid's are the same - if (mMapAppInfo.size() > 0) - return mMapAppInfo.firstEntry().getValue().uid; - else - return -1; + return mUid; } public int getState(Context context) { @@ -261,7 +259,6 @@ public boolean isIsolated() { @Override public String toString() { - // All uid's are the same return String.format("%d %s", getUid(), TextUtils.join(", ", getApplicationName())); } diff --git a/src/biz/bokhorst/xprivacy/PrivacyService.java b/src/biz/bokhorst/xprivacy/PrivacyService.java index 6c3782a01..2c7b2ceb6 100644 --- a/src/biz/bokhorst/xprivacy/PrivacyService.java +++ b/src/biz/bokhorst/xprivacy/PrivacyService.java @@ -1410,7 +1410,7 @@ private AlertDialog.Builder getOnDemandDialogBuilder(final PRestriction restrict view.setBackgroundColor(resources.getColor(R.color.color_dangerous_dark)); ivAppIcon.setImageDrawable(appInfo.getIcon(context)); - tvUid.setText(Integer.toString(restriction.uid)); + tvUid.setText(Integer.toString(appInfo.getUid())); tvAppName.setText(TextUtils.join(", ", appInfo.getApplicationName())); String defaultAction = resources.getString(result.restricted ? R.string.title_deny : R.string.title_allow);