Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit a5af2d38 authored by Alessio Balsini's avatar Alessio Balsini
Browse files

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: default avatarAlessio Balsini <balsini@google.com>
parent e51ae85f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment