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

Commit 89aa8b92 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

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

parents d5dc2d72 fb7accfc
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -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

+6 −4
Original line number Diff line number Diff line
@@ -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;