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

Commit 462db220 authored by Mathias Agopian's avatar Mathias Agopian
Browse files

fix [4056232] Deprecate Sensor.TYPE_TEMPERATURE and add Sensor.TYPE_AMBIENT_TEMPERATURE

Bug: 4056232
Change-Id: Idf165460fc083f856c320f0f6f8841d73661c829
parent 94d76925
Loading
Loading
Loading
Loading
+12 −1
Original line number Diff line number Diff line
@@ -93386,6 +93386,17 @@
 visibility="public"
>
</field>
<field name="TYPE_AMBIENT_TEMPERATURE"
 type="int"
 transient="false"
 volatile="false"
 value="13"
 static="true"
 final="true"
 deprecated="not deprecated"
 visibility="public"
>
</field>
<field name="TYPE_GRAVITY"
 type="int"
 transient="false"
@@ -93492,7 +93503,7 @@
 value="7"
 static="true"
 final="true"
 deprecated="not deprecated"
 deprecated="deprecated"
 visibility="public"
>
</field>
+11 −1
Original line number Diff line number Diff line
@@ -66,7 +66,14 @@ public class Sensor {
    /** A constant describing a pressure sensor type */
    public static final int TYPE_PRESSURE = 6;

    /** A constant describing a temperature sensor type */
    /**
     * A constant describing a temperature sensor type
     *
     * @deprecated use
     *             {@link android.hardware.Sensor#TYPE_AMBIENT_TEMPERATURE
     *             Sensor.TYPE_AMBIENT_TEMPERATURE} instead.
     */
    @Deprecated
    public static final int TYPE_TEMPERATURE = 7;

    /**
@@ -97,6 +104,9 @@ public class Sensor {
     */
    public static final int TYPE_ROTATION_VECTOR = 11;

    /** A constant describing an ambient temperature sensor type */
    public static final int TYPE_AMBIENT_TEMPERATURE = 13;

    /** 
     * A constant describing all sensor types.
     */
+8 −0
Original line number Diff line number Diff line
@@ -305,6 +305,14 @@ public class SensorEvent {
     * positive in the counter-clockwise direction).
     * </p>
     * 
     * <h4>{@link android.hardware.Sensor#TYPE_AMBIENT_TEMPERATURE Sensor.TYPE_AMBIENT_TEMPERATURE}:
     * </h4>
     *
     * <ul>
     * <p>
     * values[0]: ambient (room) temperature in degree Celsius.
     * </ul>
     *
     * @see SensorEvent
     * @see GeomagneticField
     */