summaryrefslogtreecommitdiff
path: root/service
diff options
context:
space:
mode:
authorRebecca Silberstein <silberst@google.com>2016-08-02 15:18:29 -0700
committerRebecca Silberstein <silberst@google.com>2016-08-02 16:02:38 -0700
commit24750cd1f8148d6a935bda96f3b17f22b0c1d8bd (patch)
treec043e5090ea70bdec0249790780df1c66e337a6b /service
parent225b5d3d3da2356a124ce4cad4fc99d1b8303d21 (diff)
WifiController: correct active state after ap mode
When a device is in AP mode and wifi is toggled, the device should end the wifi hotspot and enter the connect mode for wifi. When wifi was toggled in ApEnabledState, a wifi toggle would trigger a switch to StaEnabledState. This state's enter method would trigger WifiStateMachine to start supplicant, but would not indicate it should be in connect mode. This is done by DeviceActiveState. This CL switches the mPendingState in ApEnabledState from StaEnabledState to DeviceActiveState. Added a test to WifiControllerTest to cover this situation. BUG: 30042498 Change-Id: I0792c06521e82e07a8c36648ebbd62c8babceaff TEST: runtest frameworks-wifi
Diffstat (limited to 'service')
-rw-r--r--service/java/com/android/server/wifi/WifiController.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/service/java/com/android/server/wifi/WifiController.java b/service/java/com/android/server/wifi/WifiController.java
index 94310e988..bfbf44906 100644
--- a/service/java/com/android/server/wifi/WifiController.java
+++ b/service/java/com/android/server/wifi/WifiController.java
@@ -703,7 +703,7 @@ public class WifiController extends StateMachine {
case CMD_WIFI_TOGGLED:
if (mSettingsStore.isWifiToggleEnabled()) {
mWifiStateMachine.setHostApRunning(null, false);
- mPendingState = mStaEnabledState;
+ mPendingState = mDeviceActiveState;
}
break;
case CMD_SET_AP: