Parse the raw batterystats into an ActivityReport object.

For each app that appears in the batterystats data, there is an AppActivity
object (which subclasses from AppInfo, because the needs of the upcoming
PowerReport object are similar).  Inside the AppActivity, there are
ComponentActivity objects.  Each power using component has a ComponentActivity
for the fields required.  The additional Report objects in RawBatteryStats are
also added here.

This change usess modem data as a proof of concept. The exact fields in it
may evolve, even though the calculation uses tx and rx packets, the final power
calculation uses time, and putting the batterystats apportioning logic in the
batterystats handling code seems better than what we're doing here.  Anyway,
that can be iterated upon.

Test: atest frameworks/base/tools/powermodel --host
Change-Id: I2c5fce16d4fef3628d64107562d6cf9ea4edbbc2
13 files changed