MBB: notify ConnectivityService of new primary CMM and linger
During Make-Before-Break, when the new ClientModeManager
becomes primary, the old ClientModeManager will be put
into a lingering state, meaning it will self-destruct when
it disconnects from its currently connected network.
This disconnection is triggered by ConnectivityService
via CMD_UNWANTED_NETWORK, as the new CMM outscores it.
During lingering, WifiScoreReport sends a very low score
to ensure that the new CMM outscores it. In addition,
WifiScoreReport will stop reporting the real score in
lingering mode.
In case the lingering CMM is reused for some other purpose,
if a connection command is sent to it, it will exit lingering
mode.
Also, migrate off of verifyNoMoreInteractions as it is not
maintainable.
Bug: 160346062
Test: atest FrameworksWifiTests
Test: manual testing of Make-Before-Break flow to ensure
the old primary CMM is destroyed after disconnection
Change-Id: Idd79924e156c36d928a2c80aad1fbafdae17dcf5
11 files changed