summaryrefslogtreecommitdiff
path: root/service
diff options
context:
space:
mode:
authorTreeHugger Robot <treehugger-gerrit@google.com>2019-08-14 04:56:39 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2019-08-14 04:56:39 +0000
commit319ffa57dcac297d6abf7c492b55c369aff663b7 (patch)
treef251989f46407cadcf736b41ed570abc8d96e9b5 /service
parenta5dd8bd03bd02dd67f6853fb730948e401118afa (diff)
parentb46e815669ba3f376f7dda2a24479f84bad0b4a8 (diff)
Merge "WifiServiceImpl: Allow setWifiEnabled for system apps" into qt-qpr1-dev
Diffstat (limited to 'service')
-rw-r--r--service/java/com/android/server/wifi/WifiServiceImpl.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/service/java/com/android/server/wifi/WifiServiceImpl.java b/service/java/com/android/server/wifi/WifiServiceImpl.java
index 51c3dc712..be75f96b3 100644
--- a/service/java/com/android/server/wifi/WifiServiceImpl.java
+++ b/service/java/com/android/server/wifi/WifiServiceImpl.java
@@ -875,7 +875,8 @@ public class WifiServiceImpl extends BaseWifiService {
}
boolean isPrivileged = isPrivileged(Binder.getCallingPid(), Binder.getCallingUid());
if (!isPrivileged && !isDeviceOrProfileOwner(Binder.getCallingUid())
- && !mWifiPermissionsUtil.isTargetSdkLessThan(packageName, Build.VERSION_CODES.Q)) {
+ && !mWifiPermissionsUtil.isTargetSdkLessThan(packageName, Build.VERSION_CODES.Q)
+ && !isSystem(packageName)) {
mLog.info("setWifiEnabled not allowed for uid=%")
.c(Binder.getCallingUid()).flush();
return false;