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

Commit

Permalink
Fixed restrictions not always showing correct after on demand restric…
Browse files Browse the repository at this point in the history
…ting

Fixes #1549
  • Loading branch information
M66B committed Mar 13, 2014
1 parent 5d3f246 commit 9da33cc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ Changelog

**Next release**

* Fixed restrictions not always showing correct after on demand restricting ([issue](/../../issues/1549))

[Open issues](https://github.com/M66B/XPrivacy/issues?state=open)

**Version 2.0.2 STABLE**
Expand Down
7 changes: 3 additions & 4 deletions src/biz/bokhorst/xprivacy/PrivacyService.java
Original file line number Diff line number Diff line change
Expand Up @@ -354,10 +354,9 @@ private void setRestrictionInternal(PRestriction restriction) throws RemoteExcep
// Update cache
if (mUseCache)
synchronized (mRestrictionCache) {
if (restriction.methodName == null || restriction.extra == null)
for (CRestriction key : new ArrayList<CRestriction>(mRestrictionCache.keySet()))
if (key.isSameMethod(restriction))
mRestrictionCache.remove(key);
for (CRestriction key : new ArrayList<CRestriction>(mRestrictionCache.keySet()))
if (key.isSameMethod(restriction))
mRestrictionCache.remove(key);

CRestriction key = new CRestriction(restriction, restriction.extra);
if (mRestrictionCache.containsKey(key))
Expand Down

0 comments on commit 9da33cc

Please sign in to comment.