diff options
Diffstat (limited to 'services')
-rw-r--r-- | services/core/java/com/android/server/net/NetworkPolicyManagerService.java | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/services/core/java/com/android/server/net/NetworkPolicyManagerService.java b/services/core/java/com/android/server/net/NetworkPolicyManagerService.java index 395aa27..cd982d3 100644 --- a/services/core/java/com/android/server/net/NetworkPolicyManagerService.java +++ b/services/core/java/com/android/server/net/NetworkPolicyManagerService.java @@ -1520,9 +1520,14 @@ public class NetworkPolicyManagerService extends INetworkPolicyManager.Stub { } synchronized (mRulesLock) { - final int oldPolicy = mUidPolicy.get(uid, POLICY_NONE); - if (oldPolicy != policy) { - setUidPolicyUncheckedLocked(uid, policy, true); + final long token = Binder.clearCallingIdentity(); + try { + final int oldPolicy = mUidPolicy.get(uid, POLICY_NONE); + if (oldPolicy != policy) { + setUidPolicyUncheckedLocked(uid, policy, true); + } + } finally { + Binder.restoreCallingIdentity(token); } } } |