Create puller for batteryHealthData
Register the BATTERY_HEALTH puller and collect the data to populate the
corresponding atom.
All the operations are done through the class BatteryHealthPuller,
which, in addition to collecting all the health information, takes care
of reducing the domains of returned values otherwise to prevent the
identification of individual users.
In particular:
- the dates for when the battery is produced and first used are rounded
from seconds precision to week precision (the day of the week is
forced to Monday);
- the battery serial is hashed and then reduced to 8 bits with a 0xFF
bitwise AND, so that the domain space is only 256 possibilities.
Flag: EXEMPT statsd atoms/metrics changes
Bug: 343691107
Test: statsd_testdrive 10220
Test: CtsStatsdAtomHostTestCases:android.cts.statsdatom.hardware.health
Change-Id: I9cf766d39b73e0484a93326a4550c303594cf7e7
Depends-On: I5412268d2904fe8afc6195dc1fab2bb782ffba44
Signed-off-by: Alessio Balsini <balsini@google.com>
Loading
Please register or sign in to comment