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

Commit

Permalink
Fixed setting dangerous restrictions
Browse files Browse the repository at this point in the history
Closes #876
  • Loading branch information
M66B committed Dec 4, 2013
1 parent 994793d commit 1dc6122
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ Changelog

**Next release**

* Fixed setting dangerous restrictions ([issue](https://github.com/M66B/XPrivacy/issues/876))
* Attempt to fix user agent restriction for KitKat ([issue](https://github.com/M66B/XPrivacy/issues/825))
* Show relative usage time
* Updated Polish translation

Expand Down
6 changes: 3 additions & 3 deletions src/biz/bokhorst/xprivacy/PrivacyManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -439,12 +439,12 @@ public static void setRestricted(XHook hook, Context context, int uid, String re
logRestriction(hook, context, uid, "set", restrictionName, methodName, restricted, false, 0);

// Set default exceptions for methods
boolean dangerous = PrivacyManager.getSettingBool(null, context, 0, PrivacyManager.cSettingDangerous,
false, false);
boolean dangerous = PrivacyManager.getSettingBool(null, context, 0, PrivacyManager.cSettingDangerous, false,
false);
if (restricted && methodName == null && !dangerous) {
for (MethodDescription md : getMethods(restrictionName))
if (isDangerousMethod(restrictionName, md.getMethodName()))
PrivacyManager.setRestricted(null, context, uid, restrictionName, md.getMethodName(), !dangerous);
PrivacyManager.setRestricted(null, context, uid, restrictionName, md.getMethodName(), dangerous);
}
}

Expand Down

0 comments on commit 1dc6122

Please sign in to comment.