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

Commit 39c56411 authored by AleX Pelosi's avatar AleX Pelosi Committed by Jack Wu
Browse files

health: batteryStateOfHealth should be a property



Move batteryStateOfHealth to HealthData

Bug: 251427118
Test: m android.hardware.health-update-api
Change-Id: I8835489f5c3d75ffc48e198a63eafc52b555ccd4
Signed-off-by: default avatarAleX Pelosi <apelosi@google.com>
parent 9adf6fa9
Loading
Loading
Loading
Loading
+7 −7
Original line number Diff line number Diff line
@@ -34,11 +34,11 @@
package android.hardware.health;
@Backing(type="int") @VintfStability
enum BatteryCapacityLevel {
  UNSUPPORTED = -1,
  UNKNOWN = 0,
  CRITICAL = 1,
  LOW = 2,
  NORMAL = 3,
  HIGH = 4,
  FULL = 5,
  UNSUPPORTED = (-1) /* -1 */,
  UNKNOWN,
  CRITICAL,
  LOW,
  NORMAL,
  HIGH,
  FULL,
}
+1 −0
Original line number Diff line number Diff line
@@ -36,4 +36,5 @@ package android.hardware.health;
parcelable BatteryHealthData {
  long batteryManufacturingDateSeconds;
  long batteryFirstUsageSeconds;
  long batteryStateOfHealth;
}
+1 −2
Original line number Diff line number Diff line
@@ -57,9 +57,8 @@ parcelable HealthInfo {
  android.hardware.health.BatteryCapacityLevel batteryCapacityLevel;
  long batteryChargeTimeToFullNowSeconds;
  int batteryFullChargeDesignCapacityUah;
  int batteryStateOfHealth;
  android.hardware.health.BatteryChargingState chargingState;
  android.hardware.health.BatteryChargingPolicy chargingPolicy;
  @nullable android.hardware.health.BatteryHealthData batteryHealthData;
  const int BATTERY_CHARGE_TIME_TO_FULL_NOW_SECONDS_UNSUPPORTED = -1;
  const int BATTERY_CHARGE_TIME_TO_FULL_NOW_SECONDS_UNSUPPORTED = (-1) /* -1 */;
}
+7 −0
Original line number Diff line number Diff line
@@ -29,4 +29,11 @@ parcelable BatteryHealthData {
     * The date of first usage is reported in epoch.
     */
    long batteryFirstUsageSeconds;
    /**
     * Measured battery state of health (remaining estimate full charge capacity
     * relative to the rated capacity in %).
     * Value must be 0 if batteryStatus is UNKNOWN.
     * Otherwise, value must be in the range 0 to 100.
     */
    long batteryStateOfHealth;
}
+0 −7
Original line number Diff line number Diff line
@@ -136,13 +136,6 @@ parcelable HealthInfo {
     * Value must be less than 100 000 000 µAh if known.
     */
    int batteryFullChargeDesignCapacityUah;
    /**
     * Measured battery state of health (remaining estimate full charge capacity
     * relative to the rated capacity in %).
     * Value must be 0 if batteryStatus is UNKNOWN.
     * Otherwise, value must be in the range 0 to 100.
     */
    int batteryStateOfHealth;
    /**
     * Battery charging state
     */
Loading