Commit graph

25 commits

Author SHA1 Message Date
TreeHugger Robot
f24b8c30ac Merge "Refactor get_health_service" 2018-01-17 22:55:25 +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
Yifan Hong
954c3ff81a Refactor get_health_service
Refactor get_health_service into a module named libhealthhalutils.

Test: pass
Bug: 68388678
Change-Id: Ibeb22c017689c87dc81f21e954f9cedced4ee39c
2018-01-17 18:26:23 +00:00
Hridya Valsaraju
2120ecc3f5 Add VTS tests for APIs that return storage info.
Bug: 68388678
Test: vts-tradefed run vts -m VtsHalHealthV2_0
Change-Id: Id1c3bad60ca35cc5c257e35725482ca5b883a3b5
2018-01-11 17:47:21 -08:00
Hridya Valsaraju
f09d118864 Create libstoragehealthdefault
Bug: 68388678
Test: vts-tradefed run vts -m VtsHalHealthV2_0

libstoragehealthdefault contains dummy implementations
of methods which pull storage health information.

Change-Id: I182b43f32f59420eed132c56129545557d9a08fc
2018-01-11 17:47:15 -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
Hridya Valsaraju
d3e3d72cf8 Move android.hardware.health@2.0-impl to hardware/interfaces
Move android.hardware.health@2.0-impl to hardware/interfaces
from system/core/healthd.

Bug: 70533363 63702641
Test: make -j32

Change-Id: I0e4468f2183a273b4f73606b04faff88dd7afb72
2017-12-12 17:19:01 -08:00
Yifan Hong
d6ea57e9d7 health@2.0 VTS test: fix flaky test
An implementation may or may not invoke the callback
immediately when registerCallback is called, causing
a race in the test. Fix the test by waiting for the
invocation, or time-out, whichever comes first.

Test: run test 200 times
Bug: 69005254
Change-Id: I79a416f9ba5c93d7e8f9f2d6e32a0f46410561d7
2017-11-21 14:16:40 -08:00
Ryan Campbell
6f62a49017 Transfer VTS test ownership. am: ae6b2a5f1e am: 8ca98990ab
am: 4596756e1b

Change-Id: I3f889b17ff28d49c120b4ce42f1b79a75441bc0d
2017-11-17 02:17:33 +00:00
Ryan Campbell
4596756e1b Transfer VTS test ownership. am: ae6b2a5f1e
am: 8ca98990ab

Change-Id: Iafe4c27fc759f10671218c1fb66505d55cb7960e
2017-11-17 02:12:26 +00:00
Ryan Campbell
ae6b2a5f1e Transfer VTS test ownership.
Remove self from test ownership and transfer to new owners as agreed.

Test: none
Bug: 69425312
Change-Id: I8b189e6f2d7076b9ee7f3bad91445ccf6c5e1767
Merged-In: I8b189e6f2d7076b9ee7f3bad91445ccf6c5e1767
2017-11-16 14:48:00 -08:00
Steven Moreland
c2f829a1d2 Updating makefiles for hidl_interface.
Bug: 64487114
Test: manual
Merged-In: Ie13d9e014cf2b81c18c67f551b4644fb9f0ba812
Change-Id: Ie13d9e014cf2b81c18c67f551b4644fb9f0ba812
2017-11-13 11:39:07 -08:00
Steven Moreland
8db261bc99 Updating makefiles for hidl_interface.
Bug: 64487114
Test: manual
Merged-In: Ie13d9e014cf2b81c18c67f551b4644fb9f0ba812
Change-Id: Ie13d9e014cf2b81c18c67f551b4644fb9f0ba812
2017-11-13 10:00:18 -08:00
Yifan Hong
f86271dbcd Health@2.0: IHealthInfoCallback uses 1.0 HealthInfo.
BatteryService does not use these fields for posting
sticky intents.

This is a partial revert of commit
cbfb15e0b8.

Bug: 63702641
Test: boots
Change-Id: Id6596b04daaa19ae97d783c7a8bc111a43725334
2017-11-06 17:10:33 -08:00
Yifan Hong
cf11280bd5 health@2.0: IHealthInfoCallback expands HealthInfo struct.
IHealthInfoCallback reports more information, so that
BatteryService can send these fields to BatteryManager in framework.

Test: builds
Bug: 62229583
Change-Id: Ieacd4acabc3e0870d0d2fed04dad9d8c3255986b
Merged-In: Ieacd4acabc3e0870d0d2fed04dad9d8c3255986b
2017-10-11 17:34:15 -07:00
Yifan Hong
841ae2db8f health@2.0: update VTS tests for updated @2.0::HealthInfo.
Test: builds
Bug: 62229583
Change-Id: I1a403ffbdc7842e870259c332afd2cd46ab125cf
2017-10-11 10:46:26 -07:00
Yifan Hong
cbfb15e0b8 health@2.0: IHealthInfoCallback expands HealthInfo struct.
IHealthInfoCallback reports more information, so that
BatteryService can send these fields to BatteryManager in framework.

Test: builds
Bug: 62229583
Change-Id: Ieacd4acabc3e0870d0d2fed04dad9d8c3255986b
2017-10-11 10:46:24 -07:00
Yifan Hong
69c2254dea health@2.0: Add vts tests.
Test: compiles
Test: VtsHalHealthV2_0TargetTest \
--hal_service_instance=android.hardware.health@2.0::IHealth/backup

Bug: 62229583
Change-Id: I79150e1298ceddedea0825c591938cd194eeadb5
2017-10-06 11:35:18 -07:00
Yifan Hong
7a78954607 Revert "health@2.0: Add vts tests."
This reverts commit bb4d60f0ad.

Reason for revert: break stage aosp master

Change-Id: Ib8678217d34c37d6fff1cc174de3a96295bdeb5f
2017-10-06 04:55:15 +00:00
Yifan Hong
090168ef72 Revert "health@2.0 vts: Add missing include"
This reverts commit b02df7b9e1.

Reason for revert: break stage aosp master

Change-Id: I9c75e24ce2cf9b392bbe4e91446fdc3927e3f5b7
2017-10-06 04:54:41 +00:00
Yifan Hong
b02df7b9e1 health@2.0 vts: Add missing include
Test: pass
Change-Id: Ibdf7287676653b5f76a42f6aab618e0d7fa4008e
2017-10-05 17:42:20 -07:00
Yifan Hong
8ce66bbbfe health@2.0/vts: add OWNERS
Test: pass
Change-Id: I75ef90b782d9b5429f7928ffbc59650277bea92a
2017-10-06 00:39:38 +00:00
Yifan Hong
bb4d60f0ad health@2.0: Add vts tests.
Test: compiles
Test: VtsHalHealthV2_0TargetTest \
--hal_service_instance=android.hardware.health@2.0::IHealth/backup

Bug: 62229583
Change-Id: I79150e1298ceddedea0825c591938cd194eeadb5
2017-10-05 12:34:03 -07:00
Steven Moreland
527fd76a0e Update for hidl adapter module defaults.
Test: pass
Change-Id: Idc6a943149a279bf17cfcfd0f2571473e53bbbbf
2017-10-04 12:47:03 -07: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