summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Android.mk5
-rw-r--r--core/java/android/os/HardwarePropertiesManager.java10
2 files changed, 10 insertions, 5 deletions
diff --git a/Android.mk b/Android.mk
index 5fef91e704c3..9844a1584955 100644
--- a/Android.mk
+++ b/Android.mk
@@ -503,7 +503,10 @@ LOCAL_ADDITIONAL_DEPENDENCIES := $(framework_res_R_stamp)
LOCAL_NO_STANDARD_LIBRARIES := true
LOCAL_JAVA_LIBRARIES := core-oj core-libart conscrypt okhttp core-junit bouncycastle ext
-LOCAL_STATIC_JAVA_LIBRARIES := framework-protos
+
+LOCAL_STATIC_JAVA_LIBRARIES := \
+ framework-protos \
+ android.hardware.thermal@1.0-java-constants \
LOCAL_MODULE := framework
diff --git a/core/java/android/os/HardwarePropertiesManager.java b/core/java/android/os/HardwarePropertiesManager.java
index 9d362d61d9d4..6dec0dc1c3cf 100644
--- a/core/java/android/os/HardwarePropertiesManager.java
+++ b/core/java/android/os/HardwarePropertiesManager.java
@@ -18,6 +18,7 @@ package android.os;
import android.annotation.IntDef;
import android.annotation.NonNull;
import android.content.Context;
+import android.hardware.thermal.V1_0.Constants;
import android.util.Log;
import java.lang.annotation.Retention;
@@ -56,18 +57,19 @@ public class HardwarePropertiesManager {
/**
* Device temperature types. These must match the values in
* frameworks/native/include/hardwareproperties/HardwarePropertiesManager.h
+ * TODO(b/32022261) Remove this comment.
*/
/** Temperature of CPUs in Celsius. */
- public static final int DEVICE_TEMPERATURE_CPU = 0;
+ public static final int DEVICE_TEMPERATURE_CPU = Constants.TemperatureType.CPU;
/** Temperature of GPUs in Celsius. */
- public static final int DEVICE_TEMPERATURE_GPU = 1;
+ public static final int DEVICE_TEMPERATURE_GPU = Constants.TemperatureType.GPU;
/** Temperature of battery in Celsius. */
- public static final int DEVICE_TEMPERATURE_BATTERY = 2;
+ public static final int DEVICE_TEMPERATURE_BATTERY = Constants.TemperatureType.BATTERY;
/** Temperature of device skin in Celsius. */
- public static final int DEVICE_TEMPERATURE_SKIN = 3;
+ public static final int DEVICE_TEMPERATURE_SKIN = Constants.TemperatureType.SKIN;
/** Get current temperature. */
public static final int TEMPERATURE_CURRENT = 0;