Add UNSUPPORTED to health 2.1 types
Test: lshal debug android.hardware.health@2.1::IHealth/default
Bug: 149429835
Change-Id: I084d225d49eada022e3f2504bacdb67c0c241697
diff --git a/current.txt b/current.txt
index 1d62165..2aae43d 100644
--- a/current.txt
+++ b/current.txt
@@ -616,7 +616,7 @@
f284ffde7cadf5a1364b75ab313baf22401eeca289bdde2a2dc7a27ea4ab98d7 android.hardware.dumpstate@1.1::IDumpstateDevice
ce8dbe76eb9ee94b46ef98f725be992e760a5751073d4f4912484026541371f3 android.hardware.health@2.1::IHealth
26f04510a0b57aba5167c5c0a7c2f077c2acbb98b81902a072517829fd9fd67f android.hardware.health@2.1::IHealthInfoCallback
-3a4e7462a12589bd219599de59663d0ba9915313f45150774780d09f4e114f74 android.hardware.health@2.1::types
+e2f8bc1868fd4a3fd587c172773ea5a8c2f5a3deaf7958394102ca455252b255 android.hardware.health@2.1::types
0589e410f519e36514e7ece18f283f022df0f70efd2c12821d822f67f74aba98 android.hardware.identity@1.0::types
bbeee9604128ede83ee755b67e73b5ad29e6e1dbac9ec41fea6ffe2745b0c50a android.hardware.identity@1.0::IIdentityCredential
96ce8aad80f4c476f25261f790d357c117e79e18474c7dadd850dac704bbe65e android.hardware.identity@1.0::IIdentityCredentialStore
diff --git a/health/2.1/types.hal b/health/2.1/types.hal
index be1eaf8..d775491 100644
--- a/health/2.1/types.hal
+++ b/health/2.1/types.hal
@@ -19,6 +19,10 @@
import @1.0::HealthConfig;
import @2.0::HealthInfo;
+enum Constants : int64_t {
+ BATTERY_CHARGE_TIME_TO_FULL_NOW_SECONDS_UNSUPPORTED = -1,
+};
+
/**
* Battery capacity level. This enum provides additional information along side
* with the battery capacity.
@@ -27,11 +31,17 @@
*/
enum BatteryCapacityLevel : int32_t {
/**
+ * Battery capacity level is unsupported.
+ * Battery capacity level must be set to this value if and only if the
+ * implementation is unsupported.
+ */
+ UNSUPPORTED = -1,
+ /**
* Battery capacity level is unknown.
* Battery capacity level must be set to this value if and only if battery
- * is not present.
+ * is not present or the battery capacity level is unknown/uninitialized.
*/
- UNKNOWN = 0,
+ UNKNOWN,
/**
* Battery is at critical level. The Android framework must schedule a
* shutdown when it sees this value from the HAL.
@@ -78,6 +88,8 @@
/**
* Estimated time to fully charge the device (in seconds).
+ * Value must be BATTERY_CHARGE_TIME_TO_FULL_NOW_SECONDS_UNSUPPORTED if and
+ * only if the implementation is unsupported.
* Value must be 0 if and only if batteryCapacityLevel is FULL or UNKNOWN.
* Otherwise, value must be positive.
*/