mirror of
https://github.com/Evolution-X/hardware_interfaces
synced 2026-01-27 14:23:34 +00:00
health HAL: update description + naming
Update some undefined behavior + variable naming Bug: 371322457 Test: th Change-Id: Ic13b275d84b1fef52923afb906ecbff7eee39bfe
This commit is contained in:
@@ -60,6 +60,6 @@ parcelable HealthInfo {
|
||||
android.hardware.health.BatteryChargingState chargingState;
|
||||
android.hardware.health.BatteryChargingPolicy chargingPolicy;
|
||||
@nullable android.hardware.health.BatteryHealthData batteryHealthData;
|
||||
@nullable android.hardware.health.HingeInfo[] foldInfos;
|
||||
@nullable android.hardware.health.HingeInfo[] hingeInfos;
|
||||
const int BATTERY_CHARGE_TIME_TO_FULL_NOW_SECONDS_UNSUPPORTED = (-1) /* -1 */;
|
||||
}
|
||||
|
||||
@@ -151,5 +151,5 @@ parcelable HealthInfo {
|
||||
/**
|
||||
* Information about foldable hinge health. Will be an empty vector if no hinges present
|
||||
*/
|
||||
@nullable HingeInfo[] foldInfos;
|
||||
@nullable HingeInfo[] hingeInfos;
|
||||
}
|
||||
|
||||
@@ -27,7 +27,9 @@ parcelable HingeInfo {
|
||||
/**
|
||||
* returns count of times a given hinge has been folded.
|
||||
*
|
||||
* opening fully counts as 1 fold and closing fully counts as another
|
||||
* opening fully counts as 1 fold and closing fully counts as another.
|
||||
* The hinge has to engage in its full range of motion to be considered
|
||||
* a fold. Partial folds must not be counted.
|
||||
*/
|
||||
int numTimesFolded;
|
||||
/**
|
||||
|
||||
@@ -368,7 +368,8 @@ TEST_P(HealthAidl, getHingeInfo) {
|
||||
ASSERT_THAT(status, AnyOf(IsOk(), ExceptionIs(EX_UNSUPPORTED_OPERATION)));
|
||||
if (!status.isOk()) return;
|
||||
for (auto& hinge : value) {
|
||||
ASSERT_TRUE(hinge.expectedHingeLifespan > 0);
|
||||
ASSERT_TRUE(hinge.expectedHingeLifespan >= 0);
|
||||
ASSERT_TRUE(hinge.numTimesFolded >= 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user