WifiService: Decouple API calls from ClientModeImpl

Stop piping API's which have no dependency on Client mode state
through ClientModeImpl. Instead call the corresponding module directly.

All of these changes are simple refactor of the existing call flow.
There a few more which can similarly be removed from ClientModeImpl, but
needs some additional hooks (will be in the next CL).

Also, fixed a bug in factoryReset() handling to send the broadcast
inside the post(). This ensures that the broadcast is sent after all
the factory reset operations are complete.
Also, reworked the WifiserviceImplTest to just use one looper (get rid
of the second thread that was being created for tests which use
WifiThreadRunner.call() or run()). The previous architecture does not
work for testing methods which have both blocking (call() or run()) and
non-blocking calls (post())

Bug: 138403307
Bug: 117601161
TODO: atest com.android.server.wifi
Test: Manual tests - Connecting to a new network from settings, etc.
Test: Will send for full regression testing.
Change-Id: I4608fbd8003eca01d622fce8748ad75134b44562
4 files changed
tree: 4418f605f5ea7f39881a52ad844714f6e7279d23
  1. service/
  2. PREUPLOAD.cfg