diff options
author | Roshan Pius <rpius@google.com> | 2019-08-08 14:28:29 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2019-08-08 14:28:29 +0000 |
commit | d6dcaece660e8e80e9d561c6e530190e9674fded (patch) | |
tree | b4f5edebbccee25f1de54cb7341a8777a911cbd6 /service | |
parent | ece7e1bb352a57ed82124173449b7d5b6d479e8e (diff) | |
parent | 840cdc08391ef0f24adf2f46fa1ea017d3d5eac4 (diff) |
Merge "WifiService: Ignore wifi state change API in crypt debounce state" into qt-qpr1-dev
Diffstat (limited to 'service')
-rw-r--r-- | service/java/com/android/server/wifi/WifiServiceImpl.java | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/service/java/com/android/server/wifi/WifiServiceImpl.java b/service/java/com/android/server/wifi/WifiServiceImpl.java index 66b9b276a..51c3dc712 100644 --- a/service/java/com/android/server/wifi/WifiServiceImpl.java +++ b/service/java/com/android/server/wifi/WifiServiceImpl.java @@ -893,6 +893,11 @@ public class WifiServiceImpl extends BaseWifiService { return false; } + // If we're in crypt debounce, ignore any wifi state change APIs. + if (mFrameworkFacade.inStorageManagerCryptKeeperBounce()) { + return false; + } + mLog.info("setWifiEnabled package=% uid=% enable=%").c(packageName) .c(Binder.getCallingUid()).c(enable).flush(); long ident = Binder.clearCallingIdentity(); @@ -1045,6 +1050,10 @@ public class WifiServiceImpl extends BaseWifiService { public boolean startSoftAp(WifiConfiguration wifiConfig) { // NETWORK_STACK is a signature only permission. enforceNetworkStackPermission(); + // If we're in crypt debounce, ignore any wifi state change APIs. + if (mFrameworkFacade.inStorageManagerCryptKeeperBounce()) { + return false; + } mLog.info("startSoftAp uid=%").c(Binder.getCallingUid()).flush(); @@ -1091,6 +1100,10 @@ public class WifiServiceImpl extends BaseWifiService { public boolean stopSoftAp() { // NETWORK_STACK is a signature only permission. enforceNetworkStackPermission(); + // If we're in crypt debounce, ignore any wifi state change APIs. + if (mFrameworkFacade.inStorageManagerCryptKeeperBounce()) { + return false; + } // only permitted callers are allowed to this point - they must have gone through // connectivity service since this method is protected with the NETWORK_STACK PERMISSION @@ -1421,6 +1434,10 @@ public class WifiServiceImpl extends BaseWifiService { return LocalOnlyHotspotCallback.ERROR_INCOMPATIBLE_MODE; } + if (mFrameworkFacade.inStorageManagerCryptKeeperBounce()) { + return LocalOnlyHotspotCallback.ERROR_INCOMPATIBLE_MODE; + } + mLog.info("startLocalOnlyHotspot uid=% pid=%").c(uid).c(pid).flush(); synchronized (mLocalOnlyHotspotRequests) { |