PowerHAL: add pixel HW lib with generic debug code

Significant portions of the PowerHAL implementation code for Pixel
devices is copied forward from one year to the next, which creates
avoidable duplicate code maintenance work.  hardware/google/pixel was
created in part to help solve that problem, with the intention that all
code generic across device families could be moved there.

This CL creates the first portion of that new device-agnostic support
library for PowerHAL implementations.  It adds debugging utility
functions that can be used by any pixel devices in their HAL "debug()"
implementations to display the results from getPlatformLowPowerStats
(PowerHAL 1.0) and getSubsystemLowPowerStats (PowerHAL 1.1).

Over time, it is expected that additional PowerHAL code will migrate
into this library as well.

Bug: 116750864
Test: Built with corresponding changes to call into the library from
2018 and 2017 devices and verified that platform and subsystem stats
were displayed properly.
Test: While code was still in the 2018-specific implementation, added
test code to call both functions with a variety of inputs to test all
combinations of empty/not-empty inputs.
Test: Built a 2016 target and verified that library was not built (as
there is currently no dependency).

Change-Id: Iac5bbc23808df7e33f83e2c45ee4711d58e8addb
3 files changed
tree: 43f229608e16c305c289d51c8fe1f8bf9df8ba91
  1. health/
  2. powerstats/
  3. Android.bp