Health: write wireless capacity am: 3f56fd7e7d
Original change: https://googleplex-android-review.googlesource.com/c/device/google/gs201/+/18369779 Change-Id: I9cecc37f6e9b957c341c731ea562be43745f8ce3 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
commit
44d0bfda6d
1 changed files with 3 additions and 1 deletions
|
@ -145,6 +145,7 @@ void private_healthd_board_init(struct healthd_config *hc) {
|
||||||
}
|
}
|
||||||
|
|
||||||
int private_healthd_board_battery_update(HealthInfo *health_info) {
|
int private_healthd_board_battery_update(HealthInfo *health_info) {
|
||||||
|
int batt_level;
|
||||||
deviceHealth.update(health_info);
|
deviceHealth.update(health_info);
|
||||||
battThermalControl.updateThermalState(*health_info);
|
battThermalControl.updateThermalState(*health_info);
|
||||||
battMetricsLogger.logBatteryProperties(*health_info);
|
battMetricsLogger.logBatteryProperties(*health_info);
|
||||||
|
@ -153,8 +154,9 @@ int private_healthd_board_battery_update(HealthInfo *health_info) {
|
||||||
ChargerDetect::onlineUpdate(health_info);
|
ChargerDetect::onlineUpdate(health_info);
|
||||||
battDefender.update(health_info);
|
battDefender.update(health_info);
|
||||||
|
|
||||||
|
batt_level = (health_info->batteryStatus == ::aidl::android::hardware::health::BatteryStatus::FULL) ? 101 : health_info->batteryLevel;
|
||||||
if (needs_wlc_updates &&
|
if (needs_wlc_updates &&
|
||||||
!android::base::WriteStringToFile(std::to_string(health_info->batteryLevel), kWlcCapacity))
|
!android::base::WriteStringToFile(std::to_string(batt_level), kWlcCapacity))
|
||||||
LOG(INFO) << "Unable to write battery level to wireless capacity";
|
LOG(INFO) << "Unable to write battery level to wireless capacity";
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue