summaryrefslogtreecommitdiffstats
path: root/services/java/com/android/server/net
diff options
context:
space:
mode:
authorJeff Sharkey <jsharkey@android.com>2012-06-12 21:06:30 -0700
committerJeff Sharkey <jsharkey@android.com>2012-06-12 21:06:30 -0700
commit6c0b4f393ae8e728c7a7943bfbdcdd27d6642192 (patch)
treedfd7c2aa6e047047f5e84b284d5b2dd99c290790 /services/java/com/android/server/net
parentf6f7f1d2dc6e8fad5d6ff9a56af9929488873b4f (diff)
downloadframeworks_base-6c0b4f393ae8e728c7a7943bfbdcdd27d6642192.zip
frameworks_base-6c0b4f393ae8e728c7a7943bfbdcdd27d6642192.tar.gz
frameworks_base-6c0b4f393ae8e728c7a7943bfbdcdd27d6642192.tar.bz2
Clear identity when snoozing limit.
Continues to check MANAGE_NETWORK_POLICY permission. This allows SystemUI to invoke snoozeLimit() without CONNECTIVITY_INTERNAL. Bug: 6653091 Change-Id: I464bf62b79f2647c6b6db151251a0036897d0cc0
Diffstat (limited to 'services/java/com/android/server/net')
-rw-r--r--services/java/com/android/server/net/NetworkPolicyManagerService.java8
1 files changed, 7 insertions, 1 deletions
diff --git a/services/java/com/android/server/net/NetworkPolicyManagerService.java b/services/java/com/android/server/net/NetworkPolicyManagerService.java
index c4abac9..d4e9cbc 100644
--- a/services/java/com/android/server/net/NetworkPolicyManagerService.java
+++ b/services/java/com/android/server/net/NetworkPolicyManagerService.java
@@ -1407,7 +1407,13 @@ public class NetworkPolicyManagerService extends INetworkPolicyManager.Stub {
@Override
public void snoozeLimit(NetworkTemplate template) {
mContext.enforceCallingOrSelfPermission(MANAGE_NETWORK_POLICY, TAG);
- performSnooze(template, TYPE_LIMIT);
+
+ final long token = Binder.clearCallingIdentity();
+ try {
+ performSnooze(template, TYPE_LIMIT);
+ } finally {
+ Binder.restoreCallingIdentity(token);
+ }
}
private void performSnooze(NetworkTemplate template, int type) {