ConcreteClientModeManager: Invoke onStopped() from IdleState exit
Needed to handle stop() call before we have moved to StartedState.
Also,
i) Change the state heirarchy for both ClientModeManager & SoftApManager
to ensure that IdleState is the parent state for all sub-states (helps
put the onStopped() in one central place).
ii) Exit the state machine directly when an interface down/destroyed
callback is received. The current transition to "IdleState" is useless
since the exit of "StartedState" already triggers a state machine exit.
This also causes some weird state transitions currently (Started ->
quitNow() -> Idle -> quit())
Bug: 174119612
Test: atest com.android.server.wifi (Added a test which was failing
before making the changes). All other unit tests passes.
Change-Id: Ib8c15cee44f4dc71df6709274097f7fb1ef2a70f
3 files changed