WifiStateMachine: merge scan mode handling
There are two flavors of scan mode that are not handled consistently.
This causes issues like wifi being reported as enabled when it is
disabled.
This CL merges the two scan mode options. SCAN_ONLY_MODE and
SCAN_ONLY_WITH_WIFI_OFF_MODE both are now handled the same way in
WifiStateMachine and will report wifi as disabled (when ScanMode is the
operational state). There will not be special handling between the two
modes. Full cleanup will be done with the WifiStateMachine refactor.
An update to the scan mode transition to connect mode was also cleaned
up. With the cleanup of the connect mode enter method, we now set wifi
enabled, notify p2p and also no longer need to load the configs. These
calls were removed since they are now redundant.
A test was added to check the wifi disabled/enabled state for the
operating modes of connect, scan, softap and disabled (not a real state,
but implemented as the InitialState). A helper function was also added
to advance the state machine thru SupplicantStarting and
SupplicantStarted states. One test name typo was also fixed.
Bug: 33367804
Test: frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Test: frameworks/base/wifi/tests/runtests.sh
Test: passed wifi integration tests
Change-Id: I9d2c2c898a36f8029a108bda5b8a9aabef9c4762
2 files changed