Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4117f1e5 authored by Daniel Zheng's avatar Daniel Zheng Committed by Android (Google) Code Review
Browse files

Merge "health HAL: update description + naming" into main

parents 1a78a20f b4f5c0fc
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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 */;
}
+1 −1
Original line number Diff line number Diff line
@@ -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;
}
+3 −1
Original line number Diff line number Diff line
@@ -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;
    /**
+2 −1
Original line number Diff line number Diff line
@@ -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);
    }
}