mirror of
https://github.com/Evolution-X/hardware_interfaces
synced 2026-02-02 02:42:35 +00:00
Merge changes from topic "batteryStateOfHealth" am: a358f7d2f1
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2443774 Change-Id: Ie0cfe97e45c04d556112839349b7b0996bc3997c Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -148,6 +148,11 @@ ndk::ScopedAStatus Health::getBatteryHealthData(BatteryHealthData* out) {
|
||||
!res.isOk()) {
|
||||
LOG(WARNING) << "Cannot get First_usage_date: " << res.getDescription();
|
||||
}
|
||||
if (auto res = GetProperty<int64_t>(&battery_monitor_, ::android::BATTERY_PROP_STATE_OF_HEALTH,
|
||||
0, &out->batteryStateOfHealth);
|
||||
!res.isOk()) {
|
||||
LOG(WARNING) << "Cannot get Battery_state_of_health: " << res.getDescription();
|
||||
}
|
||||
return ndk::ScopedAStatus::ok();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user