diff options
author | Mathias Agopian <mathias@google.com> | 2011-03-22 18:44:26 -0700 |
---|---|---|
committer | Mathias Agopian <mathias@google.com> | 2011-03-22 19:12:13 -0700 |
commit | 462db220a2986f7d9fc3d7e3e6af6615570eaa0b (patch) | |
tree | 88f7788c50bff315dd55172bfb52ccf0f6d83057 /core/java/android | |
parent | 94d76925c285b8788bdc31ca5a667a32c245ca78 (diff) | |
download | frameworks_base-462db220a2986f7d9fc3d7e3e6af6615570eaa0b.zip frameworks_base-462db220a2986f7d9fc3d7e3e6af6615570eaa0b.tar.gz frameworks_base-462db220a2986f7d9fc3d7e3e6af6615570eaa0b.tar.bz2 |
fix [4056232] Deprecate Sensor.TYPE_TEMPERATURE and add Sensor.TYPE_AMBIENT_TEMPERATURE
Bug: 4056232
Change-Id: Idf165460fc083f856c320f0f6f8841d73661c829
Diffstat (limited to 'core/java/android')
-rw-r--r-- | core/java/android/hardware/Sensor.java | 12 | ||||
-rw-r--r-- | core/java/android/hardware/SensorEvent.java | 8 |
2 files changed, 19 insertions, 1 deletions
diff --git a/core/java/android/hardware/Sensor.java b/core/java/android/hardware/Sensor.java index f2b907b..a4ba3bd 100644 --- a/core/java/android/hardware/Sensor.java +++ b/core/java/android/hardware/Sensor.java @@ -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. */ diff --git a/core/java/android/hardware/SensorEvent.java b/core/java/android/hardware/SensorEvent.java index 78d7991..91f0098 100644 --- a/core/java/android/hardware/SensorEvent.java +++ b/core/java/android/hardware/SensorEvent.java @@ -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 */ |