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

Commit a21c4276 authored by Sandeep Patil's avatar Sandeep Patil
Browse files

health: import android.hardware.health@1.0 constants into BatteryManager



Test: make
Bug: b/32724915

Change-Id: I7ca7507b7be54442dc3250b02db3e4f7e95f0685
Signed-off-by: default avatarSandeep Patil <sspatil@google.com>
parent 1183883b
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -517,6 +517,7 @@ LOCAL_JAVA_LIBRARIES := core-oj core-libart conscrypt okhttp core-junit bouncyca
LOCAL_STATIC_JAVA_LIBRARIES :=                          \
LOCAL_STATIC_JAVA_LIBRARIES :=                          \
    framework-protos                                    \
    framework-protos                                    \
    android.hardware.thermal@1.0-java-constants         \
    android.hardware.thermal@1.0-java-constants         \
    android.hardware.health@1.0-java-constants          \


LOCAL_MODULE := framework
LOCAL_MODULE := framework


+13 −12
Original line number Original line Diff line number Diff line
@@ -16,6 +16,7 @@


package android.os;
package android.os;


import android.hardware.health.V1_0.Constants;
import com.android.internal.app.IBatteryStats;
import com.android.internal.app.IBatteryStats;


/**
/**
@@ -118,20 +119,20 @@ public class BatteryManager {
     public static final String EXTRA_CHARGE_COUNTER = "charge_counter";
     public static final String EXTRA_CHARGE_COUNTER = "charge_counter";


    // values for "status" field in the ACTION_BATTERY_CHANGED Intent
    // values for "status" field in the ACTION_BATTERY_CHANGED Intent
    public static final int BATTERY_STATUS_UNKNOWN = 1;
    public static final int BATTERY_STATUS_UNKNOWN = Constants.BATTERY_STATUS_UNKNOWN;
    public static final int BATTERY_STATUS_CHARGING = 2;
    public static final int BATTERY_STATUS_CHARGING = Constants.BATTERY_STATUS_CHARGING;
    public static final int BATTERY_STATUS_DISCHARGING = 3;
    public static final int BATTERY_STATUS_DISCHARGING = Constants.BATTERY_STATUS_DISCHARGING;
    public static final int BATTERY_STATUS_NOT_CHARGING = 4;
    public static final int BATTERY_STATUS_NOT_CHARGING = Constants.BATTERY_STATUS_NOT_CHARGING;
    public static final int BATTERY_STATUS_FULL = 5;
    public static final int BATTERY_STATUS_FULL = Constants.BATTERY_STATUS_FULL;


    // values for "health" field in the ACTION_BATTERY_CHANGED Intent
    // values for "health" field in the ACTION_BATTERY_CHANGED Intent
    public static final int BATTERY_HEALTH_UNKNOWN = 1;
    public static final int BATTERY_HEALTH_UNKNOWN = Constants.BATTERY_HEALTH_UNKNOWN;
    public static final int BATTERY_HEALTH_GOOD = 2;
    public static final int BATTERY_HEALTH_GOOD = Constants.BATTERY_HEALTH_GOOD;
    public static final int BATTERY_HEALTH_OVERHEAT = 3;
    public static final int BATTERY_HEALTH_OVERHEAT = Constants.BATTERY_HEALTH_OVERHEAT;
    public static final int BATTERY_HEALTH_DEAD = 4;
    public static final int BATTERY_HEALTH_DEAD = Constants.BATTERY_HEALTH_DEAD;
    public static final int BATTERY_HEALTH_OVER_VOLTAGE = 5;
    public static final int BATTERY_HEALTH_OVER_VOLTAGE = Constants.BATTERY_HEALTH_OVER_VOLTAGE;
    public static final int BATTERY_HEALTH_UNSPECIFIED_FAILURE = 6;
    public static final int BATTERY_HEALTH_UNSPECIFIED_FAILURE = Constants.BATTERY_HEALTH_UNSPECIFIED_FAILURE;
    public static final int BATTERY_HEALTH_COLD = 7;
    public static final int BATTERY_HEALTH_COLD = Constants.BATTERY_HEALTH_COLD;


    // values of the "plugged" field in the ACTION_BATTERY_CHANGED intent.
    // values of the "plugged" field in the ACTION_BATTERY_CHANGED intent.
    // These must be powers of 2.
    // These must be powers of 2.