ActiveModeWarden: Add roles for each mode manager

Introducing a new concept of "roles" for each mode manager.
This is to make it easier for ActiveModeWarden to create multiple client
mode managers in different roles and make it available to the rest of the wifi stack
for various STA + STA use-cases. This also tries to homogenize the existing modes
of operation for the mode managers (i.e scan only, tethered, local only) into
this new "roles" concept.

For ex:
a) WifiNetworkfactory (which handles the peer to peer API) will request
ActiveModeWarden for a ClientModeManager which it can use for making
local connection (ActiveModeWarden.getLocalOnlyClientModeManager()). If the
device supports STA + STA, ActiveModeWarden will hande WifiNetworkFactory
the second STA, otherwise it will hand it the primary STA.
b) WifiServiceImpl (which needs to handle public API calls) will request
ActiveModeWarden for a ClientModeManager which is being used for primary
wifi connection (ActiveModeWarden.getPrimaryClientModeManager()) to
route the API calls.

Future CL's will follow to enable creation/request for role specific STA's.

Bug: 139157226
Test: Togged wifi/softap/APM/location on/off & ensured the existing
behavior is preserved.
Test: Need to fix unit tests
Change-Id: I292ccafef34a6b58787c30bc34be7cafb835ad98
7 files changed
tree: 8a4d63d34faaf7826cfbedd05cc96900c380a925
  1. service/
  2. PREUPLOAD.cfg