commit | 72f83d6a05ddecd516787cedb3b49839bb287c6d | [log] [tgz] |
---|---|---|
author | Julia Reynolds <juliacr@google.com> | Mon Jul 27 15:10:42 2015 -0400 |
committer | Julia Reynolds <juliacr@google.com> | Mon Jul 27 15:10:42 2015 -0400 |
tree | 61574eb974c70270855ee531e03b5c2773c694a8 | |
parent | 11f4cb1bccf47a0e985be6948f30709ba40f4522 [diff] [blame] |
Allow Settings to set background data restrict on secondary users. Bug: 22721091 Change-Id: Iadfbd25f75f233f2c3c080e0de05b0244572b6cd
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 @@ } 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); } } }