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

Commit

Permalink
Not filtering on restricted will filter on not restricted
Browse files Browse the repository at this point in the history
Fixes #682
  • Loading branch information
M66B committed Nov 13, 2013
1 parent 9f024c6 commit 9f3aae1
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ Changelog
* Require Android 4.0.3 (minimum for Xposed)
* Added settings for Advertisement ID (including randomization) ([issue](https://github.com/M66B/XPrivacy/issues/738))
* Added settings for SSID (including randomization) ([issue](https://github.com/M66B/XPrivacy/issues/652))
* Not filtering on restricted will filter on not restricted ([issue](https://github.com/M66B/XPrivacy/issues/682))
* Option to randomize subscriber ID (IMSI) ([issue](https://github.com/M66B/XPrivacy/issues/690))
* Added traditional Chinese translation
* Updated German translation
Expand Down
23 changes: 11 additions & 12 deletions src/biz/bokhorst/xprivacy/ActivityMain.java
Original file line number Diff line number Diff line change
Expand Up @@ -906,17 +906,16 @@ protected FilterResults performFiltering(CharSequence constraint) {

// Get some restricted
boolean someRestricted = false;
if (fRestricted)
if (mRestrictionName == null) {
for (boolean restricted : PrivacyManager.getRestricted(getApplicationContext(),
xAppInfo.getUid(), true))
if (restricted) {
someRestricted = true;
break;
}
} else
someRestricted = PrivacyManager.getRestricted(null, getApplicationContext(),
xAppInfo.getUid(), mRestrictionName, null, false, false);
if (mRestrictionName == null) {
for (boolean restricted : PrivacyManager.getRestricted(getApplicationContext(),
xAppInfo.getUid(), true))
if (restricted) {
someRestricted = true;
break;
}
} else
someRestricted = PrivacyManager.getRestricted(null, getApplicationContext(), xAppInfo.getUid(),
mRestrictionName, null, false, false);

// Get Android permission
boolean permission = false;
Expand All @@ -939,7 +938,7 @@ else if (PrivacyManager.hasPermission(mContext, xAppInfo.getPackageName(), mRest

// Match application
if ((fName.equals("") ? true : contains) && (fUsed ? used : true) && (fInternet ? internet : true)
&& (fRestricted ? someRestricted : true) && (fPermission ? permission : true)
&& (fRestricted ? someRestricted : !someRestricted) && (fPermission ? permission : true)
&& (fUser ? user : true) && (fSystem ? system : true))
lstApp.add(xAppInfo);
}
Expand Down

0 comments on commit 9f3aae1

Please sign in to comment.