diff options
author | Julia Reynolds <juliacr@google.com> | 2015-07-27 19:51:24 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2015-07-27 19:51:24 +0000 |
commit | f68e0236a67a8d6f8ec167df0daf332221149b51 (patch) | |
tree | 5fdec6a7c5d7654960fb474a454774f043fcd4dc /services | |
parent | 4ba1820b34c215b9f844ccd06373669d9137d27c (diff) | |
parent | 72f83d6a05ddecd516787cedb3b49839bb287c6d (diff) | |
download | frameworks_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.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); } } } |