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

Commit

Permalink
Revert "Not filtering on restricted will filter on not restricted"
Browse files Browse the repository at this point in the history
This reverts commit 9f3aae1.

Conflicts:
	CHANGELOG.md

Refs #754
  • Loading branch information
M66B committed Nov 14, 2013
1 parent 705e688 commit de62afa
Showing 1 changed file with 12 additions and 11 deletions.
23 changes: 12 additions & 11 deletions src/biz/bokhorst/xprivacy/ActivityMain.java
Original file line number Diff line number Diff line change
Expand Up @@ -906,16 +906,17 @@ protected FilterResults performFiltering(CharSequence constraint) {

// Get some restricted
boolean someRestricted = 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);
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);

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

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

0 comments on commit de62afa

Please sign in to comment.