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

Commit

Permalink
Fix disabling restrictions
Browse files Browse the repository at this point in the history
  • Loading branch information
M66B committed Jun 28, 2014
1 parent e181992 commit 91e3269
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Changelog
```
cd /data/system/xprivacy
echo "ipc" >disabled
echo "system/getInstalledProviders" >>disabled
echo "system.getInstalledProviders" >>disabled
```

[Open issues](https://github.com/M66B/XPrivacy/issues?state=open)
Expand Down
8 changes: 6 additions & 2 deletions src/biz/bokhorst/xprivacy/XPrivacy.java
Original file line number Diff line number Diff line change
Expand Up @@ -371,10 +371,14 @@ else if (name.equals(Context.WIFI_SERVICE))

public static void hookAll(List<XHook> listHook, ClassLoader classLoader, String secret) {
for (XHook hook : listHook)
if (hook.getRestrictionName() != null) {
if (hook.getRestrictionName() == null)
hook(hook, classLoader, secret);
else {
CRestriction crestriction = new CRestriction(0, hook.getRestrictionName(), null, null);
CRestriction mrestriction = new CRestriction(0, hook.getRestrictionName(), hook.getMethodName(), null);
if (!(mListDisabled.contains(crestriction) || mListDisabled.contains(mrestriction)))
if (mListDisabled.contains(crestriction) || mListDisabled.contains(mrestriction))
Util.log(hook, Log.WARN, "Skipping " + hook);
else
hook(hook, classLoader, secret);
}
}
Expand Down

0 comments on commit 91e3269

Please sign in to comment.