Loading api/current.txt +2 −0 Original line number Diff line number Diff line Loading @@ -16737,6 +16737,7 @@ package android.hardware { field public static final String STRING_TYPE_GYROSCOPE_UNCALIBRATED = "android.sensor.gyroscope_uncalibrated"; field public static final String STRING_TYPE_HEART_BEAT = "android.sensor.heart_beat"; field public static final String STRING_TYPE_HEART_RATE = "android.sensor.heart_rate"; field public static final String STRING_TYPE_HINGE_ANGLE = "android.sensor.hinge_angle"; field public static final String STRING_TYPE_LIGHT = "android.sensor.light"; field public static final String STRING_TYPE_LINEAR_ACCELERATION = "android.sensor.linear_acceleration"; field public static final String STRING_TYPE_LOW_LATENCY_OFFBODY_DETECT = "android.sensor.low_latency_offbody_detect"; Loading Loading @@ -16766,6 +16767,7 @@ package android.hardware { field public static final int TYPE_GYROSCOPE_UNCALIBRATED = 16; // 0x10 field public static final int TYPE_HEART_BEAT = 31; // 0x1f field public static final int TYPE_HEART_RATE = 21; // 0x15 field public static final int TYPE_HINGE_ANGLE = 36; // 0x24 field public static final int TYPE_LIGHT = 5; // 0x5 field public static final int TYPE_LINEAR_ACCELERATION = 10; // 0xa field public static final int TYPE_LOW_LATENCY_OFFBODY_DETECT = 34; // 0x22 core/java/android/hardware/Sensor.java +19 −0 Original line number Diff line number Diff line Loading @@ -692,6 +692,22 @@ public final class Sensor { public static final String STRING_TYPE_ACCELEROMETER_UNCALIBRATED = "android.sensor.accelerometer_uncalibrated"; /** * A constant describing a hinge angle sensor. * * See {@link android.hardware.SensorEvent#values SensorEvent.values} for more details. * */ public static final int TYPE_HINGE_ANGLE = 36; /** * A constant string describing a hinge angle sensor. * * @see #TYPE_HINGE_ANGLE * */ public static final String STRING_TYPE_HINGE_ANGLE = "android.sensor.hinge_angle"; /** * A constant describing all sensor types. */ Loading Loading @@ -811,6 +827,7 @@ public final class Sensor { 16, // skip over additional sensor info type 1, // SENSOR_TYPE_LOW_LATENCY_OFFBODY_DETECT 6, // SENSOR_TYPE_ACCELEROMETER_UNCALIBRATED 1, // SENSOR_TYPE_HINGE_ANGLE }; /** Loading Loading @@ -1226,6 +1243,8 @@ public final class Sensor { case TYPE_ACCELEROMETER_UNCALIBRATED: mStringType = STRING_TYPE_ACCELEROMETER_UNCALIBRATED; return true; case TYPE_HINGE_ANGLE: mStringType = STRING_TYPE_HINGE_ANGLE; default: return false; } Loading core/java/android/hardware/SensorEvent.java +10 −0 Original line number Diff line number Diff line Loading @@ -630,6 +630,16 @@ public class SensorEvent { * x_bias, y_bias, z_bias are the estimated biases. * </p> * * <h4>{@link android.hardware.Sensor#TYPE_HINGE_ANGLE Sensor.TYPE_HINGE_ANGLE}:</h4> * * A sensor of this type measures the angle, in degrees, between two integral parts of the * device. Movement of a hinge measured by this sensor type is expected to alter the ways in * which the user may interact with the device, for example by unfolding or revealing a display. * * <ul> * <li> values[0]: Measured hinge angle between 0 and 360 degrees inclusive</li> * </ul> * * @see GeomagneticField */ public final float[] values; Loading Loading
api/current.txt +2 −0 Original line number Diff line number Diff line Loading @@ -16737,6 +16737,7 @@ package android.hardware { field public static final String STRING_TYPE_GYROSCOPE_UNCALIBRATED = "android.sensor.gyroscope_uncalibrated"; field public static final String STRING_TYPE_HEART_BEAT = "android.sensor.heart_beat"; field public static final String STRING_TYPE_HEART_RATE = "android.sensor.heart_rate"; field public static final String STRING_TYPE_HINGE_ANGLE = "android.sensor.hinge_angle"; field public static final String STRING_TYPE_LIGHT = "android.sensor.light"; field public static final String STRING_TYPE_LINEAR_ACCELERATION = "android.sensor.linear_acceleration"; field public static final String STRING_TYPE_LOW_LATENCY_OFFBODY_DETECT = "android.sensor.low_latency_offbody_detect"; Loading Loading @@ -16766,6 +16767,7 @@ package android.hardware { field public static final int TYPE_GYROSCOPE_UNCALIBRATED = 16; // 0x10 field public static final int TYPE_HEART_BEAT = 31; // 0x1f field public static final int TYPE_HEART_RATE = 21; // 0x15 field public static final int TYPE_HINGE_ANGLE = 36; // 0x24 field public static final int TYPE_LIGHT = 5; // 0x5 field public static final int TYPE_LINEAR_ACCELERATION = 10; // 0xa field public static final int TYPE_LOW_LATENCY_OFFBODY_DETECT = 34; // 0x22
core/java/android/hardware/Sensor.java +19 −0 Original line number Diff line number Diff line Loading @@ -692,6 +692,22 @@ public final class Sensor { public static final String STRING_TYPE_ACCELEROMETER_UNCALIBRATED = "android.sensor.accelerometer_uncalibrated"; /** * A constant describing a hinge angle sensor. * * See {@link android.hardware.SensorEvent#values SensorEvent.values} for more details. * */ public static final int TYPE_HINGE_ANGLE = 36; /** * A constant string describing a hinge angle sensor. * * @see #TYPE_HINGE_ANGLE * */ public static final String STRING_TYPE_HINGE_ANGLE = "android.sensor.hinge_angle"; /** * A constant describing all sensor types. */ Loading Loading @@ -811,6 +827,7 @@ public final class Sensor { 16, // skip over additional sensor info type 1, // SENSOR_TYPE_LOW_LATENCY_OFFBODY_DETECT 6, // SENSOR_TYPE_ACCELEROMETER_UNCALIBRATED 1, // SENSOR_TYPE_HINGE_ANGLE }; /** Loading Loading @@ -1226,6 +1243,8 @@ public final class Sensor { case TYPE_ACCELEROMETER_UNCALIBRATED: mStringType = STRING_TYPE_ACCELEROMETER_UNCALIBRATED; return true; case TYPE_HINGE_ANGLE: mStringType = STRING_TYPE_HINGE_ANGLE; default: return false; } Loading
core/java/android/hardware/SensorEvent.java +10 −0 Original line number Diff line number Diff line Loading @@ -630,6 +630,16 @@ public class SensorEvent { * x_bias, y_bias, z_bias are the estimated biases. * </p> * * <h4>{@link android.hardware.Sensor#TYPE_HINGE_ANGLE Sensor.TYPE_HINGE_ANGLE}:</h4> * * A sensor of this type measures the angle, in degrees, between two integral parts of the * device. Movement of a hinge measured by this sensor type is expected to alter the ways in * which the user may interact with the device, for example by unfolding or revealing a display. * * <ul> * <li> values[0]: Measured hinge angle between 0 and 360 degrees inclusive</li> * </ul> * * @see GeomagneticField */ public final float[] values; Loading