WifiNative: Use link up/down events to query iface state
Since |BaseNetworkObserver#interfaceStatusChanged| is not working
currently, switch back to listening to
|BaseNetworkObserver#interfaceLinkStateChanged|. We use the link state
change events to query the real interface state and trigger callbacks to
WifiStateMachine/SoftApManager/ScanOnlyModeManager.
Bug: 77218676
Test: Unit tests
Test: Ran WifiManagerTest & WifiSoftApTest ACTS tests locally.
Test: Ran 'ifconfig wlan0 down' on the 3 modes:
a) Client mode - Triggers recovery and puts wifi in disabled mode.
b) ScanOnly mode - Triggers recovery and puts wifi in disabled mode.
b) SoftAp mode - Triggers recovery and puts wifi in scan only mode (it
goes to disabled mode first, but then moves to scan only mode).
Change-Id: Ic611bf91c9176c6f8a7fa0d8622dc4c8f6b1098a
2 files changed