health HAL: update description + naming

Update some undefined behavior + variable naming

Bug: 371322457
Test: th
Change-Id: Ic13b275d84b1fef52923afb906ecbff7eee39bfe
diff --git a/health/aidl/aidl_api/android.hardware.health/current/android/hardware/health/HealthInfo.aidl b/health/aidl/aidl_api/android.hardware.health/current/android/hardware/health/HealthInfo.aidl
index 548a793..d993040 100644
--- a/health/aidl/aidl_api/android.hardware.health/current/android/hardware/health/HealthInfo.aidl
+++ b/health/aidl/aidl_api/android.hardware.health/current/android/hardware/health/HealthInfo.aidl
@@ -60,6 +60,6 @@
   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 */;
 }
diff --git a/health/aidl/android/hardware/health/HealthInfo.aidl b/health/aidl/android/hardware/health/HealthInfo.aidl
index 12a397a..1c953ee 100644
--- a/health/aidl/android/hardware/health/HealthInfo.aidl
+++ b/health/aidl/android/hardware/health/HealthInfo.aidl
@@ -151,5 +151,5 @@
     /**
      * Information about foldable hinge health. Will be an empty vector if no hinges present
      */
-    @nullable HingeInfo[] foldInfos;
+    @nullable HingeInfo[] hingeInfos;
 }
diff --git a/health/aidl/android/hardware/health/HingeInfo.aidl b/health/aidl/android/hardware/health/HingeInfo.aidl
index 19b46df..ad38821 100644
--- a/health/aidl/android/hardware/health/HingeInfo.aidl
+++ b/health/aidl/android/hardware/health/HingeInfo.aidl
@@ -27,7 +27,9 @@
     /**
      * 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;
     /**
diff --git a/health/aidl/vts/functional/VtsHalHealthTargetTest.cpp b/health/aidl/vts/functional/VtsHalHealthTargetTest.cpp
index c47ddca..a44cd5e 100644
--- a/health/aidl/vts/functional/VtsHalHealthTargetTest.cpp
+++ b/health/aidl/vts/functional/VtsHalHealthTargetTest.cpp
@@ -368,7 +368,8 @@
     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);
     }
 }