ActiveModeWarden: Support multiple ClientModeManagers

Changes in the CL:
a) Rename WifiController states to Enabled & Disabled state to better
incorporate Softap into the overall state management.
EnableState - One or more ActiveModeManager active (we transition to
Enabled when the first ActiveModeManager is started).
DisabledState - No ActiveModeManager active.
b) Create ClientModeManager/ClientListener similar to how
SoftApManager is created.
c) Ensure we have a consistent setup/teardown flow for both
ClientModeManager/SoftApManager.
Any time SoftapManager is stopped/start failure, check if we
need to create a ClientModeManager.
d) The logic to create secondary ClientModeManager has not been added.
This will come later once we have a target use-case.
d) All active client mode managers are treated equaly. i.e
stopped/switched modes all done on global toggles.
e) Also, reworked some of the emergency handling code. If we're in
EnabledState when the emergency mode starts (&
getConfigWifiDisabledInEcbm returns true), we need to allow the state
machine to switch to DisableState. This is needed becauase we now
transition to DisabledState only when all the mode managers are
completely stopped.

Bug: 139157226
Bug: 141540849.
Test: Manual tests in progress.
Change-Id: I7b1c2cde7ed679ad2c35bfd1b0527cdfc8a37c01
4 files changed
tree: 274aa12e00059f0ed45004f08ec51b1cc388788a
  1. service/
  2. PREUPLOAD.cfg