WifiStateMachine: dynamically configure WifiHAL log level

By default, VERBOSE level logging is disabled for native code.
However, when debugging Wifi issues, we'll sometimes want to
include VERBOSE level log messages from the HAL implementation.

Update WifiStateMachine's verbose-debugging logic, to support
this case.

Note that VERBOSE level messages will not be compiled in
on user builds. Nor will system server be permitted to change
the logging level on user builds. For these reasons, the
log level is only modified on non-user builds.

BUG=27857554
TEST=unit tests, manual

Manual test (bullhead):
- On userdebug build with 'Enable Wi-Fi Verbose Logging' set:
  $ adb reboot && adb wait-for-device && adb logcat -d | grep 'V WifiHAL'
  -> matching lines seen
  $ adb shell getprop | grep WifiHAL
  [log.tag.WifiHAL]: [V]
- On userdebug build with 'Enable Wi-Fi Verbose Logging' unset:
  $ adb reboot && adb wait-for-device && adb logcat -d | grep 'V WifiHAL'
  -> NO matching lines
  $ adb shell getprop | grep WifiHAL
  [log.tag.WifiHAL]: [D]
- On user build with 'Enable Wi-Fi Verbose Logging' set:
  $ adb logcat -d | grep 'V WifiHAL'
  -> NO matching lines
  $ adb shell getprop | grep WifiHAL
  -> NO matching lines

Change-Id: Icaa91d9d1261a6cf5851d5ad9b0a6a25fd329344
1 file changed
tree: d2dfb3fb380794f6acd7c59c14e3ad19d1ff2215
  1. service/