BatteryMonitor: support battery health NOT_AVAILABLE from health status am: 5be6ec751c
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/core/+/23343940 Change-Id: Icd0d78cfb546799f8e47ba649ecf9b7ef7a226bc Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
commit
9b7b09cb6b
2 changed files with 3 additions and 0 deletions
|
|
@ -242,6 +242,8 @@ BatteryHealth getBatteryHealthStatus(int status) {
|
|||
value = BatteryHealth::DEAD;
|
||||
else if (status == BatteryMonitor::BH_FAILED)
|
||||
value = BatteryHealth::UNSPECIFIED_FAILURE;
|
||||
else if (status == BatteryMonitor::BH_NOT_AVAILABLE)
|
||||
value = BatteryHealth::NOT_AVAILABLE;
|
||||
else
|
||||
value = BatteryHealth::UNKNOWN;
|
||||
|
||||
|
|
|
|||
|
|
@ -62,6 +62,7 @@ class BatteryMonitor {
|
|||
BH_MARGINAL,
|
||||
BH_NEEDS_REPLACEMENT,
|
||||
BH_FAILED,
|
||||
BH_NOT_AVAILABLE,
|
||||
};
|
||||
|
||||
BatteryMonitor();
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue