Subclass Handler to log incoming messages

A new class WifiHandler that overrides handleMessage() method to log
incoming messages and associated unit tests. In order to instantiate
WifiLog, an instance of WifiInjector is required. WifiHandler is
expected to be used by any service in wifi, including WifiP2pService.
Since this service is started before WifiService is started,
WifiInjector which is created in WifiServiceImpl would not be available
to instantiate WifiHandler if is required in the constructor. For now,
we use lazy initialization and invoke WifiInjector.getInstance() once
to get the WifiInjector and then make a WifiLog object the first time
a message is logged. In order to enable testing of this class, a hidden
API is exposed only for testing to set the logging field in the class.

Bug: 33085782
Test: Unit test suite, Sanity tests (power on, Wifi connection)

Change-Id: I9110eacb28a5faea331a818998ef25295aa589a8
2 files changed
tree: ae595ccb40d02c38d337e485865c9f34eacd0291
  1. service/
  2. PREUPLOAD.cfg