diff --git a/CHANGELOG.md b/CHANGELOG.md index 43b5d4f89..6e41eeb80 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -26,6 +26,7 @@ See for more information about XPrivacy 3 [this FAQ](https://github.com/M66B/XPr **Next release** * Added option to rename templates ([issue](/../../issues/1723)) +* Restored select all ([issue](/../../issues/1977)) ([issue](/../../issues/1986)) * Updated Dutch translation [Open issues](https://github.com/M66B/XPrivacy/issues?state=open) diff --git a/src/biz/bokhorst/xprivacy/ActivityApp.java b/src/biz/bokhorst/xprivacy/ActivityApp.java index 324fe71b7..348df045b 100644 --- a/src/biz/bokhorst/xprivacy/ActivityApp.java +++ b/src/biz/bokhorst/xprivacy/ActivityApp.java @@ -362,10 +362,9 @@ protected void onResume() { super.onResume(); // Update switch - if (swEnabled != null) { - boolean enabled = PrivacyManager.getSettingBool(mAppInfo.getUid(), PrivacyManager.cSettingRestricted, true); - swEnabled.setChecked(enabled); - } + if (swEnabled != null) + swEnabled.setChecked(PrivacyManager.getSettingBool(mAppInfo.getUid(), PrivacyManager.cSettingRestricted, + true)); // Update on demand check box int userId = Util.getUserId(Process.myUid()); diff --git a/src/biz/bokhorst/xprivacy/ActivityMain.java b/src/biz/bokhorst/xprivacy/ActivityMain.java index 95a2fbc52..a39b09797 100644 --- a/src/biz/bokhorst/xprivacy/ActivityMain.java +++ b/src/biz/bokhorst/xprivacy/ActivityMain.java @@ -1633,31 +1633,20 @@ public int[] getSelectedOrVisibleUid(int flags) { } public void selectAllVisible() { - // Look through the visible, enabled apps to figure out what to do + // Look through the visible apps to figure out what to do mSelecting = false; for (int i = 0; i < this.getCount(); i++) { - ApplicationInfoEx appInfo = this.getItem(i); - if (!mListAppSelected.contains(appInfo)) { - boolean enabled = PrivacyManager.getSettingBool(appInfo.getUid(), - PrivacyManager.cSettingRestricted, true); - if (enabled) { - mSelecting = true; - break; - } + if (!mListAppSelected.contains(this.getItem(i))) { + mSelecting = true; + break; } } if (mSelecting) { - // Add the visible, enabled apps not already selected - for (int i = 0; i < this.getCount(); i++) { - ApplicationInfoEx appInfo = this.getItem(i); - if (!mListAppSelected.contains(appInfo)) { - boolean enabled = PrivacyManager.getSettingBool(appInfo.getUid(), - PrivacyManager.cSettingRestricted, true); - if (enabled) - mListAppSelected.add(this.getItem(i)); - } - } + // Add the visible apps not already selected + for (int i = 0; i < this.getCount(); i++) + if (!mListAppSelected.contains(this.getItem(i))) + mListAppSelected.add(this.getItem(i)); } else mListAppSelected.clear();