[DO NOT MERGE] WifiStateMachine: prevent erroneous wifi toggle
The icon for wifi toggles on/off quickly when transitioning between
states if location scans are enabled. This is due to two errors:
1 - WifiStateMachine sends the wifi enabled broadcast before wifi has
entered client mode.
2 - WifiStateMachine assumes it is entering client mode if it has not
been told otherwise.
This CL works around the assumptions in WifiStateMachine and avoids
sending the wifi enabled broadcast when it should be going in to scan
mode and not client mode.
Bug: 28336982
Test: verified state transitions manually
Test: runtest frameworks-wifi
Change-Id: I5e34ee4f0ef90668ecc97f5d6d726444fd08ffb3
2 files changed