WifiController: send mode change before switching
When performing the following mode changes, do not force
WifiStateMachine to guess which mode it should be entering.
Sequence:
1. Enable wifi
2. Enable wifi location scans
3. Disable wifi (ScanMode)
4. Disable wifi location scans (wifi fully disabled)
5. Enable wifi (should go to ClientMode without
first entering ScanMode)
This sequence was an issue because WifiStateMachine was most recently in
ScanMode and supplicant was started before the new operational mode was
sent. This CL adds a mode switch call to WifiStateMachine before the
call to start supplicant if wifi was off and we are going to
ConnectMode.
Bug: 31986765
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Test: frameworks/base/wifi/tests/runtests.sh
Test: manually verified by performing the above sequence and inspecting
the logs
Test: passed wifi integration tests
Change-Id: I9e0f99c4c3df59330c1932370cc93d3047202f33
1 file changed