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

Commit fb7accfc authored by Andreas Huber's avatar Andreas Huber
Browse files

Import android.hardware.thermal@1.0 constants into HardwarePropertiesManager.

Bug: 32200867
Test: make
Change-Id: I4e63e7c5431b33011b7c334077a5bd0c7edcf3a2
parent 81769558
Loading
Loading
Loading
Loading
+4 −1
Original line number Original line Diff line number Diff line
@@ -503,7 +503,10 @@ LOCAL_ADDITIONAL_DEPENDENCIES := $(framework_res_R_stamp)


LOCAL_NO_STANDARD_LIBRARIES := true
LOCAL_NO_STANDARD_LIBRARIES := true
LOCAL_JAVA_LIBRARIES := core-oj core-libart conscrypt okhttp core-junit bouncycastle ext
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
LOCAL_MODULE := framework


+6 −4
Original line number Original line Diff line number Diff line
@@ -18,6 +18,7 @@ package android.os;
import android.annotation.IntDef;
import android.annotation.IntDef;
import android.annotation.NonNull;
import android.annotation.NonNull;
import android.content.Context;
import android.content.Context;
import android.hardware.thermal.V1_0.Constants;
import android.util.Log;
import android.util.Log;


import java.lang.annotation.Retention;
import java.lang.annotation.Retention;
@@ -56,18 +57,19 @@ public class HardwarePropertiesManager {
    /**
    /**
     * Device temperature types. These must match the values in
     * Device temperature types. These must match the values in
     * frameworks/native/include/hardwareproperties/HardwarePropertiesManager.h
     * frameworks/native/include/hardwareproperties/HardwarePropertiesManager.h
     * TODO(b/32022261) Remove this comment.
     */
     */
    /** Temperature of CPUs in Celsius. */
    /** 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. */
    /** 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. */
    /** 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. */
    /** 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. */
    /** Get current temperature. */
    public static final int TEMPERATURE_CURRENT = 0;
    public static final int TEMPERATURE_CURRENT = 0;