If LinkedCallback::Make returns nullptr, do not put it
in Health::callback_. Otherwise, OnHealthInfoChanged
crashes later because the linked callback objects are
not null checked before accessing.
Test: android.hardware.health-service.aidl_fuzzer (with
a special corpus)
Fixes: 289599278
Change-Id: I8bad41dbcfbefeb54744059baffd4eef1ae7ec42
Move batteryStateOfHealth to HealthData
Bug: 251427118
Test: m android.hardware.health-update-api
Change-Id: I8835489f5c3d75ffc48e198a63eafc52b555ccd4
Signed-off-by: AleX Pelosi <apelosi@google.com>
Add a check before executing the test to determine whether the
health HAL is indeed the V2 version.
Bug: 266665472
Test: vts test
Change-Id: I43c7d0139037701f0ef2e8f3925272470684a50e
Signed-off-by: Jack Wu <wjack@google.com>
1. add the new propertes
- batteryHealthData
- batteryStateOfHealth
- chargingState
- chargingPolicy
2. add new types to health status
3. add new methods
- setChargingPolicy
- getChargingPolicy
- getBatteryHealthData
Bug: 251425963
Test: m android.hardware.health-update-api
Change-Id: Ie2339c50e1f9bfc28427e4108a95b1a16c739205
Signed-off-by: Jack Wu <wjack@google.com>
When health aidl_interface version updraged, some libraries are
depending on V1 and android.hardware.health-translate-ndk at the
same time. It will cause multiple versions depending if
android.hardware.health-translate-ndk is depending on new version.
version.
Fork android.hardware.health-translate-ndk generate two versions,
so that other libraries can depend on the same aidl_interface,
to avoid multiple versions depending.
Bug: 251425963
Test: m
Change-Id: I0641e9f6c1445ee2549b956012ebb35eb1f8ac97
Signed-off-by: Jack Wu <wjack@google.com>
Using service_fuzzer_defaults in
- android.hardware.health-service.aidl_fuzzer
- android.hardware.vibrator-service.example_fuzzer
Bug: 240318902
Test: m android.hardware.health-service.aidl_fuzzer
Test: m android.hardware.vibrator-service.example_fuzzer
Change-Id: I3fd1cf37a5835ebef14658ed40332132cec07e49
Some are still in VNDK because they are used in other VNDK libs.
Ignore-AOSP-First: some libs are still in internal master only.
Bug: 234181591
Test: m
Merged-In: If999df9c78a20df931177da11742b1c5de19bc08
Change-Id: If999df9c78a20df931177da11742b1c5de19bc08
(cherry picked from commit 5527adfd7f)
* Timed out runs do not show any warning messages.
* These test files cannot finish clang-tidy runs with
the following settings:
TIDY_TIMEOUT=90
WITH_TIDY=1
CLANG_ANALYZER_CHECKS=1
* When TIDY_TIMEOUT is set, in Android continuous builds,
tidy_timeout_srcs files will not be compiled by clang-tidy.
When developers build locally without TIDY_TIMEOUT,
tidy_timeout_srcs files will be compiled.
* Some of these test modules may be split into smaller ones,
or disable some time consuming checks, and then
enable clang-tidy to run within limited time.
Bug: 201099167
Test: make droid tidy-hardware-interfaces_subset
Change-Id: I1de28f1572fff368f67eab512fffec9f2e5c2a9b
Devices may have actions triggered by
init.svc.vendor.charger. If the name is changed,
these actions are not triggered properly.
The name is usually vendor.charger, so the default
service will also use vendor.charger as the name.
Test: none
Bug: 215152892
Change-Id: Icb296ae82a6f3472730fdb3abc35dcede22889e7
This is a shim library that wraps a HIDL IHealth to
an AIDL BnHealth.
Also add tests for the library.
Bug: 177269435
Test: libhealthshim_test
Change-Id: Ia5f32c1ae0693c70cf698b46b48d5f77006cf6c7
Use charger_vendor SELinux context.
Also update readme to reflect the change.
Test: manual in offline-charging mode
Bug: 177269435
Change-Id: Icf5cd9d579b3365037e2d360fcc29b0ef4be1b15
Otherwise, clients will need to know how to destroy
LinkedCallback, a hidden class.
Test: builds
Bug: 177269435
Change-Id: I89532755da16b672c4cbece55b943306f68cdb9e
It was meant to be the replacement of health2impl, the helper library
for implementing the health HAL. Hence, vendor implementation needs
to access it.
Test: pass
Bug: 177269435
Change-Id: I58f4bcd860983b2b16ea52fbdd6e05c8d4953454
... for BatteryService to use. Other fields
are kept as default values.
Test: builds
Bug: 177269435
Change-Id: I7e1c997f5441c7a81bcffb32688f4a2216378998
This is a direct translation of the health 2.0
and 2.1 VTS tests.
Some slight modifications are made (e.g. use googlemock
matchers) to make the test code more readable.
Test: run on Pixel
Bug: 203245778
Change-Id: Ifc3799a04a6a09d0d53f400b60d19fbfe004a3e3