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

Commit

Permalink
Always set restriction for replaced methods
Browse files Browse the repository at this point in the history
  • Loading branch information
M66B committed Jul 13, 2014
1 parent c91063d commit 0ad4589
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions src/biz/bokhorst/xprivacy/UpdateService.java
Original file line number Diff line number Diff line change
Expand Up @@ -313,14 +313,15 @@ private static List<PRestriction> getUpgradeWork(Version sVersion, int uid, bool
}

// Restrict replaced methods
if (hook.getReplacedMethod() != null)
if (PrivacyManager.getRestrictionEx(uid, hook.getReplacedRestriction(),
hook.getReplacedMethod()).restricted) {
Util.log(null, Log.WARN,
"Replaced " + hook.getReplacedRestriction() + "/" + hook.getReplacedMethod()
+ " by " + hook + " from=" + hook.getFrom() + " uid=" + uid);
listWork.add(new PRestriction(uid, hook.getRestrictionName(), hook.getName(), true));
}
if (hook.getReplacedMethod() != null) {
PRestriction restriction = PrivacyManager.getRestrictionEx(uid,
hook.getReplacedRestriction(), hook.getReplacedMethod());
listWork.add(new PRestriction(uid, hook.getRestrictionName(), hook.getName(),
restriction.restricted));
Util.log(null, Log.WARN,
"Replacing " + hook.getReplacedRestriction() + "/" + hook.getReplacedMethod()
+ " by " + hook + " from=" + hook.getFrom() + " uid=" + uid);
}
}
}

Expand Down

0 comments on commit 0ad4589

Please sign in to comment.