Nick Kralevich
8c038f2a2f
healthd_common.cpp: use epoll_create1
...
epoll_create leaks file descriptors. Use epoll_create1(EPOLL_CLOEXEC)
instead.
Bug: 120983106
Test: compiles and boots
Change-Id: I50aad9f1c0633add2b44fb22be73dd292a366f39
2018-12-15 11:36:47 -08:00
Keun Soo YIM
68ae05dd2d
pack VTS cc_test binaries as general-tests
...
Test: make general-tests
Bug: 120093339
Merged-In: I363450d205868f900e4925ccff1430e2a569f2a4
Change-Id: I363450d205868f900e4925ccff1430e2a569f2a4
2018-12-07 10:49:56 -08:00
Yifan Hong
f8a8873ee6
Merge "health VTS: split Properties test"
2018-10-02 23:37:43 +00:00
Yifan Hong
26c1200e54
health VTS: split Properties test
...
... into multiple test cases.
Test: run test
Change-Id: I2a03a7ab01d2918b746e06f55c2ee6d733ab4021
2018-10-02 14:54:28 -07:00
Yifan Hong
e9fc235eb4
health: registerCallback() and getHealthInfo() does not notify all callbacks
...
registerCallback() and getHealthInfo() unintentionally broadcast
health info to all callbacks, which has a performance impact.
* registerCallback() still invokes the new callback immediately
* getHealthInfo() does not call any callbacks at all.
Test: VTS test call getHealthInfo does not invoke update()
Bug: 117167903
Change-Id: Ida99fdd73831e747fbf2d65089c7c0e7661fe7c4
2018-10-02 14:30:03 -07:00
Yifan Hong
a46c0dae81
health: use recursive_mutex.
...
Need to use an reentrant lock.
Bug: 117167903
Test: vts
Change-Id: I25a366e06ed9d983823f7276668b7f45ddcf1c2b
2018-10-02 14:30:03 -07:00
Hridya Valsaraju
bf0b9faaad
Initialize healthd_mode_ops in recovery default Health HAL impl.
...
This is required for correct functioning of getHealthInfo() API
in recovery since BatteryMonitor requires healthd_mode_ops to be
initialized to update battery properties.
Bug: 78793464
Test: fastboot getvar battery-voltage
Change-Id: I9ff77664cada22e4aa3668bfb7d28d5f1d45590b
2018-09-28 21:30:20 +00:00
Yifan Hong
10becafa1e
Merge "health.storage: Add VTS test."
2018-09-21 22:20:24 +00:00
Yifan Hong
14eea6bb3f
health.storage: Add VTS test.
...
Test: run test
Bug: 111655771
Change-Id: I353026bcf882fcdafa9986e4f60d5853abac7e54
2018-09-21 12:25:24 -07:00
Yifan Hong
c0263aa0e4
health.storage: Add default implementation.
...
Test: lshal show default implementation when installed
Test: `lshal debug` (read and write successfully)
Test: `adb shell sm idle-maint run`
Bug: 111655771
Change-Id: Ibb09836b99310b6bc21e87be9c0177175efa29df
2018-09-20 17:18:53 -07:00
Yifan Hong
ec75d33d9c
health.filesystem::IFileSystem -> health.storage::IStorage
...
Rename the HAL because it is regarding 'storage health',
not 'filesystem health'.
Bug: 111655771
Test: compiles
Change-Id: I07072c876fb07c88be8bd74cf6b84aec6020a697
Merged-In: I07072c876fb07c88be8bd74cf6b84aec6020a697
2018-09-19 13:11:59 -07:00
Yifan Hong
a0082b80ba
health filesystem: update garbageCollect() function.
...
Bug: 111655771
Test: run dev gc on vold
Change-Id: I2cef404f9e2720c1be7822895187a590837763c8
2018-09-12 10:43:49 -07:00
Yifan Hong
6ab518e0df
libhealthhalutils is recovery_available
...
Test: build it with recovery
Bug: 80132328
Change-Id: I0728b9a900577cc41cb8acb3d70dd0afb507fb2a
2018-08-13 12:55:36 -07:00
Yifan Hong
66a4144c96
Add health.filesystem HAL.
...
Test: builds
Bug: 111655771
Change-Id: I29f157912ef74b4efd64def93ea125aa079ac1eb
Merged-In: I29f157912ef74b4efd64def93ea125aa079ac1eb
2018-08-10 11:36:39 -07:00
Treehugger Robot
c07a66e169
Merge "libhealthd.default: Mark as recovery_available."
2018-08-09 01:42:06 +00:00
Yifan Hong
388897c3f2
health: convert README to markdown format.
...
Test: none
Change-Id: Ic9503d43a5e69cee0deb901193a99154d68f67b0
Fixes: 112277698
2018-08-08 11:06:51 -07:00
Tao Bao
a6d2cccee3
libhealthd.default: Mark as recovery_available.
...
Bug: 110380063
Test: `m dist` with aosp_taimen-userdebug
Change-Id: I65c13107bdf77e9e0ab49af96e92ea462435fe6a
2018-08-07 21:47:46 -07:00
Steven Moreland
2ea3fa5cc1
IWYU: healthd IPCThreadState
...
Bug: 65843592
Test: m
Change-Id: I6f235c8a851079f335cfbc15b9bdb6f9d34d91fe
2018-08-01 01:23:53 +00:00
Yifan Hong
4db762a4d9
healthd: add android.hardware.health@2.0-impl-default.recovery
...
Test: build recovery
Bug: 80132328
Change-Id: I253bd1a756f3b94f6470da12bfc4488313a16aa4
2018-07-18 16:04:39 -07:00
Yifan Hong
ad35b35621
health@2.0-impl: recovery_available: true
...
... so that it can be installed to recovery image.
Test: build and inspect out dir
Test: boot to recovery and 'adb shell ls /vendor/lib64/hw'
Bug: 80132328
Change-Id: Icb33c9e9e648b54db33cac23ed877392cce4e76b
Merged-In: Icb33c9e9e648b54db33cac23ed877392cce4e76b
(cherry picked from commit 4e40086d39
)
2018-07-18 11:28:12 -07:00
Yifan Hong
b21b03dd35
health: libhealthstoragedefault: recovery_available
...
Test: builds
Bug: 80132328
Change-Id: I2c4d880968e6938806cb9a2cf65352c73748f4ce
Merged-In: I2c4d880968e6938806cb9a2cf65352c73748f4ce
(cherry picked from commit 14d4383762
)
2018-07-18 11:28:08 -07:00
TreeHugger Robot
456c9ebbcf
Merge "healthd use vintf_fragments" into stage-aosp-master
2018-07-17 22:07:51 +00:00
Yifan Hong
c4a3421bc8
healthd use vintf_fragments
...
This encourages device manufacturers to use
service.override over service and to remove healthd
on device, because it is one less step to do.
Test: make VINTF metadata
Bug: 66917623
Change-Id: I447395450060cdf17731514bb9a5e3ed912bbc66
Merged-In: I447395450060cdf17731514bb9a5e3ed912bbc66
(cherry picked from commit ae005c4610
)
2018-07-17 11:58:23 -07:00
Yifan Hong
51b29c99d4
health: remove unused flag HEALTHD_USE_HEALTH_2_0
...
Test: boots
Bug: 79107699
Change-Id: Idc27ad452b799ef2ce4f18c787f2aa2afd1dd8cf
(cherry picked from commit 1ffc50ad70
)
2018-07-17 17:55:40 +00:00
Steven Moreland
c90461c738
rename hidl_enum_{iterator,range}
...
This is actually a range, not an iterator.
Bug: 78573628
Test: m
Change-Id: Ie824a3eabcb7d5af94a8752e1498bdc8c7032e40
2018-05-02 00:06:33 +00:00
TreeHugger Robot
2b2ffe64d6
Merge "Remove DiskStat checks from VTS Health HAL test" into pi-dev
2018-04-10 19:24:31 +00:00
Yifan Hong
7f8caede5f
Merge "health: update readme for writing kmesg" into pi-dev
2018-04-06 21:03:34 +00:00
Yifan Hong
d7b297df83
health: update readme for writing kmesg
...
Test: none
Bug: 77661605
Change-Id: Iea07a8361e7c23919515d8550d90d2bd329e616a
2018-04-05 19:11:10 -07:00
TreeHugger Robot
6acac5a356
Merge "health: expand debug info." into pi-dev
2018-04-05 18:40:15 +00:00
Yifan Hong
81b2833a2f
health: expand debug info.
...
Test: lshal -m android.hardware.health@2.0::IHealth/default
Test: lshal -m android.hardware.health@2.0::IHealth/backup
Bug: 74057048
Change-Id: Iaca0a7fd32209522d7d759342b98d6e6898595ac
2018-04-04 22:32:53 +00:00
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
Hridya Valsaraju
075c182f4d
Remove DiskStat checks from VTS Health HAL test
...
The fields being checked were uint64_t and it
is valid for them to have any value greater than
or equal to zero.
Bug: 74057048
Test: vts-tradefed run vts -m VtsHalHealthV2_0
Change-Id: If932e1d6af8e162b7c570a1d5dd0f5ddce89ad1e
2018-04-03 18:24:34 +00:00
Zhuoyao Zhang
d571a2bc57
Merge "Convert health hal test to use VtsHalHidlTargetTestEnvBase" am: 8a5a99ca3b
am: ef211ccb88
...
am: d5e930ea16
Change-Id: Iea1bedb26ec6eabc050b4f2c7c99cda2dfe9894e
2018-02-16 00:16:15 +00:00
Zhuoyao Zhang
91456084c2
Convert health hal test to use VtsHalHidlTargetTestEnvBase
...
Bug: 64203181
Test: make vts
vts-tradefed run vts -m VtsHalHealthV1_0Target
Change-Id: Ibbe9421b5a737d7eb2d021bd64757a548d3c95fc
2018-02-12 23:48:50 +00: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