Commit graph

5 commits

Author SHA1 Message Date
TreeHugger Robot
759987d939 Merge changes from topic "health_report_api"
* changes:
  Test API returning health information
  Add an API to return Health Info
2018-01-18 18:04:18 +00:00
Hridya Valsaraju
1bd3772833 Add an API to return Health Info
Bug: 71860528
Test: vts-tradefed run vts -m VtsHalHealthV2_0

Change-Id: I5e0defdabcd8e44b32a6eab609492ff354512e64
2018-01-17 20:31:32 +00:00
Yifan Hong
81874af4a1 IHealth: get* function return 0 on fail.
getChargeCounter, getCurrentNow, getCurrentAverage,
getCapacity, getEnergyCounter returns 0 when result is
not SUCCESS.

This is consistent with the invalid value defined
by @1.0::IHealthInfo and @2.0::IHealthInfo.
IHealthInfoCallback.healthInfoChanged() and
IHealth.getHealthInfo() both zero-fill invalid values.

This does not affect any clients, because client code
checks for result before using the value.

Test: health VTS test
Change-Id: I50e6faa5f4feb42bb1ec899e289567d6dde7e9c2
2018-01-17 11:14:50 -08:00
Hridya Valsaraju
2b520838b1 Add methods to health HAL interface to report storage info
The methods will report device specific storage info.

Bug: 68388678
Test: vts-tradefed run vts -m VtsHalHealthV2_0
Change-Id: I76a15f36f271312d2b49141ee1d45118be101397
2018-01-11 10:35:48 -08:00
Yifan Hong
e889fec6ce Add android.hardware.health@2.0 HAL
Test: mma
Bug: 62229583

Change-Id: Icc5159424cf2623588a2f2acc7db5ff5bd7eeae8
2017-10-03 18:10:33 -07:00