Add CAP_BLOCK_SUSPEND to android.hardware.health@1.0 and
android.hardware.health@2.1 service so that when epoll_wait()
is waiting on uevents and timer_fd events it can block suspend
to take the necessary action. Without this permission, eventpoll
is going to ignore the flags EPOLLWAKEUP used in health HAL or
healthloop.
Bug: 169873088
Change-Id: If9b0e1f60e47d7bf54942f589acbfbb883b9bac8
Test: Run the test under an implementation that doesn't support
batteryChargeTimeToFullNowSeconds
Bug: 166841711
Change-Id: I18fb11bb0a2233a9a89183a5f9ecf597e7719172
Fix code that incorrectly transforms a hidl_string to String8
by using size of another field.
Test: none
Fixes: 161210887
Change-Id: I54a11e9beab4c825905dda37b121e1fc85658215
HIDL libs are not necessarily part of VNDK now. Because some are
used by VNDK libs, they are still VNDK. But rest are now just
vendor-available.
.hidl_for_test files are also removed because they are used to exclude
test-purpose hidl libs from VNDK libs.
Instead, .hidl_for_system_ext files are added to tests/lazy to
distinguish them from others which are installed /system.
Bug: 143933769
Test: update-makefiles.sh && m com.android.vndk.current
Merged-In: Ia81312dda340b6b5cbdd7a3c21e1d323bda39a4a
Change-Id: Ia81312dda340b6b5cbdd7a3c21e1d323bda39a4a
(cherry picked from commit b0907a6bb8)
Require the following on battery current:
- skip health info tests if current is 0 (indicates the value is unavailable)
- when charging, positive
- when discharging / not charging, negative
- when unknown, zero
- batteryCurrentAverage should be similar to batteryCurrentNow.
All new tests are executed over
a period of time to avoid effects of fluctuation in
battery current, and ensure battery status is initialized.
Requirements are enforced on devices launching with R
only.
Require the following on battery status:
- if not charging / full / charging, must be connected
- if discharging, must not be connected.
Test: run on coral, tests are skipped
Test: run on cuttlefish, test passes
Bug: 136717180
Change-Id: Ic5a714b830ffeca1dcd000c6cad0fbfe8a8710ed
This is a hack to support the test in Android P. Now that gtest
has been updated, we no longer need this hack.
Test: run it
Bug: 118852225
Bug: 136717180
Change-Id: I81802b6fae0dc7839aa9fd1dd40cb881ff4eefdb
Bug: 151896491
Test: local build
Exempt-From-Owner-Approval: This CL update suite name vts-core to vts as
the suite name is updated. This CL won't change test logic or behavior.
Change-Id: I562b4dc50765e953800a814a8fd84a01c1b9352b
Merged-In: I562b4dc50765e953800a814a8fd84a01c1b9352b
These are a legacy holdover from when libutils String8 couldn't be used
at static time.
Bug: N/A
Test: N/A
Change-Id: I009b2ca53631509072b4085f3f53c0b94e71b13e
Latest update on the ticket to use hard coded thresholds
Test: atest VtsHalHealthV2_1TargetTest
Bug: 149428646
Change-Id: Id7f86ba05a203a926e8d316bf7af4d24c7e0e2f0
Full charge capacity is already included as part of
health HAL 1.0. Concluded in b/149121450 to add a value
that is valuable.
Bug: 149428646
Bug: 149121450
Test: lshal debug android.hardware.health@2.1::IHealth/default
Change-Id: Iadf3c14850df57034378dcc10cdbab0eb43c3aae
This reverts commit ca44707aea.
Reason for revert: charger uses hwbinder health HAL now
Bug: 142674987
Test: none
Change-Id: I2be2d393331ad3c377e0b144cfe0c92d3ab59689
Non A/B devices should install the passthrough health impl
to recovery for IsBatteryOk() check during OTA updates.
Test: pass
Change-Id: Ib83518fd5f8f55f693be88a55fa708459a22417f
... so that it starts up in charger mode.
Test: boot charger and look at serial log
Bug: 142674987
Change-Id: Ic535b86840df1408b76e556f942aebdd9aaba111
getHealthInfo_2_1 reports batteryFullCapacityUah:
- 0 if value is unknown. In such case, no requirement is enforced.
- positive if value is known. In such case, require it to be 50%~120% of
batteryFullCharge.
Test: run on cuttlefish
Bug: 144948996
Change-Id: I7856729aafa3a19a3bfcc00e6e0ad5162f22afea
Convert VtsHalHealthV2_0TargetTest to be parameterized test
and add it to vts-core
Bug: 142397658
Test: $atest VtsHalHealthV2_0TargetTest
Change-Id: I415a494243536f931f168665e1b9196fc83c8de7
Now that libhealthd is no longer recognized as a HAL_STATIC_LIBRARY,
vendors must define their own android.hardware.health@1.0-impl module.
Add a helper and README.md for them to explain this transition.
Test: builds
Bug: 127677771
Change-Id: I65c162e7b5caed93c39a4a1cb6a2893fbb25724b
Now that HAL_STATIC_LIBS are removed, convert to Soong.
Also, avoid using global includes and use libbase_headers instead.
Test: builds
Change-Id: I50ef691e049ed0943de6f384ce7ddba96c0345a5
BOARD_HAL_STATIC_LIBRARIES is deprecated / obsolete. No devices
in our internal tree uses it. Devices that uses it should build
their own HALs and link to the correct libhealthd.(board) in
that vendor-specific module.
Test: pass
Bug: 127677771
Change-Id: I289d020960331e2dc2225ccbd378a73ccc51a056
health HAL is used as passthrough in recovery mode and hence
healthd_main() is not invoked. Add checks in
healthd_battery_update_internal() and healthd_register_event()
to return when health_loop is NULL.
Test: fastboot getvar battery-voltage works in fastbootd.
Bug: 144299329
Change-Id: I0a975a4bfe942813f9c5b3936df91cc3d8fa9674
Convert VtsHalHealthStorageV1_0TargetTest to be parameterized test
and add it to vts-core
Bug: 142397658
Test: $atest VtsHalHealthStorageV1_0TargetTest
Change-Id: I0e91e0958c2dc351a0e9af03fd977f55f418d1f5
Convert VtsHalHealthV1_0TargetTest. to be parameterized test
and add it to vts-core
Bug: 142397658
Test: $atest VtsHalHealthV1_0TargetTest.
Change-Id: I3abfbfe0c20a5fe595f32c4793b2c53f6ad13e28
BatteryMonitor returns HealthInfo structs directly. Modify
code to adapt to this behavior.
Test: health VTS test 2.0
Bug: 142260281
Change-Id: I5e6605e46bb4f8bb08c1356e5f2233880e6f9d14