summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
authorJulia Reynolds <juliacr@google.com>2015-07-27 19:51:24 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2015-07-27 19:51:24 +0000
commitf68e0236a67a8d6f8ec167df0daf332221149b51 (patch)
tree5fdec6a7c5d7654960fb474a454774f043fcd4dc /services
parent4ba1820b34c215b9f844ccd06373669d9137d27c (diff)
parent72f83d6a05ddecd516787cedb3b49839bb287c6d (diff)
downloadframeworks_base-f68e0236a67a8d6f8ec167df0daf332221149b51.zip
frameworks_base-f68e0236a67a8d6f8ec167df0daf332221149b51.tar.gz
frameworks_base-f68e0236a67a8d6f8ec167df0daf332221149b51.tar.bz2
Merge "Allow Settings to set background data restrict on secondary users." into mnc-dev
Diffstat (limited to 'services')
-rw-r--r--services/core/java/com/android/server/net/NetworkPolicyManagerService.java11
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);
}
}
}