commit | db02ccda58df30accfe74233f9ee2e797aed1d08 | [log] [tgz] |
---|---|---|
author | Sudheer Shanka <sudheersai@google.com> | Thu Nov 29 11:27:21 2018 -0800 |
committer | Sudheer Shanka <sudheersai@google.com> | Thu Nov 29 11:53:58 2018 -0800 |
tree | 2444d4e1f31569b16f60adfb22fbb5e15c345093 | |
parent | eb2f7b6b0bb974e59c7d1c1bdd168703e31fd385 [diff] [blame] |
Add missing permission check in NPMS.setAppIdleWhitelist. Bug: 120220390 Test: atest CtsHostsideNetworkTests Change-Id: I9032c2f1ddd49029407fc37395ca8c02d4daca13
diff --git a/services/core/java/com/android/server/net/NetworkPolicyManagerService.java b/services/core/java/com/android/server/net/NetworkPolicyManagerService.java index 9ed978f..0d6dadf 100644 --- a/services/core/java/com/android/server/net/NetworkPolicyManagerService.java +++ b/services/core/java/com/android/server/net/NetworkPolicyManagerService.java
@@ -3932,6 +3932,8 @@ */ @VisibleForTesting void setAppIdleWhitelist(int uid, boolean shouldWhitelist) { + mContext.enforceCallingOrSelfPermission(MANAGE_NETWORK_POLICY, TAG); + synchronized (mUidRulesFirstLock) { if (mAppIdleTempWhitelistAppIds.get(uid) == shouldWhitelist) { // No change.