diff options
author | Roshan Pius <rpius@google.com> | 2019-07-29 11:08:36 -0700 |
---|---|---|
committer | Roshan Pius <rpius@google.com> | 2019-07-29 18:10:46 +0000 |
commit | 68c549b0814a3129c97ed9c67a005d18601dbe17 (patch) | |
tree | 7c5ad7a13b765ab90e522edb6162c5343dc3ac8f /service | |
parent | 03cd20804986d2f77ea03de6722927a090f73cf4 (diff) |
WifiService: Allow DO/PO apps to toggle wifi
Allow DO/PO apps to toggle wifi even if they target Q SDK.
Bug: 136487810
Test: atest com.android.server.wifi.WifiServiceImplTest
Change-Id: If59dd4485a6265077f50800c0089a0dd9d61c2f0
Diffstat (limited to 'service')
-rw-r--r-- | service/java/com/android/server/wifi/WifiServiceImpl.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/service/java/com/android/server/wifi/WifiServiceImpl.java b/service/java/com/android/server/wifi/WifiServiceImpl.java index b25a84593..66b9b276a 100644 --- a/service/java/com/android/server/wifi/WifiServiceImpl.java +++ b/service/java/com/android/server/wifi/WifiServiceImpl.java @@ -874,7 +874,7 @@ public class WifiServiceImpl extends BaseWifiService { return false; } boolean isPrivileged = isPrivileged(Binder.getCallingPid(), Binder.getCallingUid()); - if (!isPrivileged + if (!isPrivileged && !isDeviceOrProfileOwner(Binder.getCallingUid()) && !mWifiPermissionsUtil.isTargetSdkLessThan(packageName, Build.VERSION_CODES.Q)) { mLog.info("setWifiEnabled not allowed for uid=%") .c(Binder.getCallingUid()).flush(); |