Commit graph

40 commits

Author SHA1 Message Date
Yifan Hong
8ef2335fe0 health 2.0: update readme to uninstall healthd
Test: none
Bug: 77541952

Change-Id: I44191f2d9f4a6d328c0ec96212c2add3b02874ca
2018-04-04 14:25:00 -07:00
Yifan Hong
9fe3cc4e34 health 2.0: update README for typo. am: de542acbbf am: 6271c38c90
am: a9e9f9182d

Change-Id: Ia2997a95ca4034e79895197c56206e0cd0a7a379
2018-01-31 02:33:45 +00:00
Yifan Hong
de542acbbf health 2.0: update README for typo.
Test: none
Change-Id: Iaede40e22b909a06592dceedb3b430232ced0b1a
2018-01-30 15:32:30 -08:00
Yifan Hong
3e6dbcbc30 health: add README.
Test: none
Bug: 63702641
Change-Id: I1d23c0cdf56516585e7c6dd0db577784baa7b74e
Merged-In: I1d23c0cdf56516585e7c6dd0db577784baa7b74e
2018-01-30 15:06:21 -08:00
Steven Moreland
5d1e41a8fd Update makefiles.
Bug: N/A
Test: N/A
Change-Id: Idb1d74aeed9b82ca6568c76f35552f3fcc894239
2018-01-23 19:44:19 +00:00
Yifan Hong
fed3bfa4bc health: add README.
Test: none
Bug: 63702641
Change-Id: I1d23c0cdf56516585e7c6dd0db577784baa7b74e
2018-01-22 12:53:15 -08:00
Yifan Hong
4ad11a9474 health: move duplicate HealthServiceCommon
... to hardware/interfaces. HealthServiceCommon
becomes two separate libraries:
- libhealthservicedefault for services on vendor
- libhealthservicehealthd for healthd

Test: boots
Bug: 63702641
Change-Id: I40235cef7d4fa62103629bf507b0401e3f939654
2018-01-22 12:49:13 -08:00
Yifan Hong
75a2fb5441 health: move util modules to utils/
Test: pass
Change-Id: I5eb5202d75e26146d0d40fb726a0722cf8bf9e0f
2018-01-22 12:39:33 -08:00
TreeHugger Robot
6cb4a2ae36 Merge "Modify IHealthInfoCallback interface to return V2.0 HealthInfo" 2018-01-19 01:55:28 +00:00
Hridya Valsaraju
d31932aa67 Modify IHealthInfoCallback interface to return V2.0 HealthInfo
Bug: 71860528
Test: vts-tradefed run vts -m VtsHalHealthV2_0
Change-Id: Ie7294efa644442825baa5f08c39553c10b368e75
2018-01-18 21:24:12 +00:00
Yifan Hong
83a5b5a9eb health: update comments.
Test: pass
Bug: 63702641
Change-Id: Iedf1bfe37a356e5801a09e313ac186fdc73668ca
2018-01-18 12:49:19 -08:00
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
87e29602a0 Test API returning health information
Bug: 71860528
Test: vts-tradefed run vts -m VtsHalHealthV2_0
Change-Id: I44f76b383a890a3f75f82da512d778c3572b3dea
2018-01-18 00:27:42 +00:00
TreeHugger Robot
f24b8c30ac Merge "Refactor get_health_service" 2018-01-17 22:55:25 +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
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
Steven Moreland
4e1e4081e4 Updating makefiles for hidl_interface.
Bug: 64487114
Test: manual
Merged-In: Ie13d9e014cf2b81c18c67f551b4644fb9f0ba812
Change-Id: Ie13d9e014cf2b81c18c67f551b4644fb9f0ba812
(cherry-picked from commit c2f829a1d2)
2017-12-03 10:31:49 -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