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
2 files changed
tree: 45a82cae392bc8df43a083fc7548a7b9db83bca1
  1. service/