diff --git a/CHANGELOG.md b/CHANGELOG.md index c6de59653..22b9d3039 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -48,6 +48,7 @@ Version 3.x will be available with a [pro license](http://www.xprivacy.eu/) only * Improved database locking ([pull request](/../../issues/1939)) * Changed settings dialog to settings activity ([pull request](/../../issues/1938)) * Moved flush button to expert mode section ([issue](/../../issues/1934)) +* Added category merge/reset ([issue](/../../issues/1909)) * Updated simplified Chinese translation [Open issues](https://github.com/M66B/XPrivacy/issues?state=open) diff --git a/src/biz/bokhorst/xprivacy/PrivacyManager.java b/src/biz/bokhorst/xprivacy/PrivacyManager.java index 6596a0cae..87401ac70 100644 --- a/src/biz/bokhorst/xprivacy/PrivacyManager.java +++ b/src/biz/bokhorst/xprivacy/PrivacyManager.java @@ -605,8 +605,13 @@ public static void applyTemplate(int uid, String templateName, String restrictio // Apply if (canRestrict(uid, Process.myUid(), rRestrictionName, null, true)) - listPRestriction.add(new PRestriction(uid, rRestrictionName, null, parentMerge.restricted - || parentRestricted, parentMerge.asked && parentAsked)); + if (invert && ((parentRestricted && parentMerge.restricted) || (!parentAsked && !parentMerge.asked))) { + listPRestriction.add(new PRestriction(uid, rRestrictionName, null, parentRestricted ? false + : parentMerge.restricted, !parentAsked ? true : parentMerge.asked)); + continue; // leave functions + } else + listPRestriction.add(new PRestriction(uid, rRestrictionName, null, parentMerge.restricted + || parentRestricted, parentMerge.asked && parentAsked)); // Childs if (methods)