Merge "Adding new sensor types."
This commit is contained in:
committed by
Android (Google) Code Review
commit
e97a3cc4ca
@@ -13372,11 +13372,13 @@ package android.hardware {
|
||||
field public static final java.lang.String STRING_TYPE_GRAVITY = "android.sensor.gravity";
|
||||
field public static final java.lang.String STRING_TYPE_GYROSCOPE = "android.sensor.gyroscope";
|
||||
field public static final java.lang.String STRING_TYPE_GYROSCOPE_UNCALIBRATED = "android.sensor.gyroscope_uncalibrated";
|
||||
field public static final java.lang.String STRING_TYPE_HEART_BEAT = "android.sensor.heart_beat";
|
||||
field public static final java.lang.String STRING_TYPE_HEART_RATE = "android.sensor.heart_rate";
|
||||
field public static final java.lang.String STRING_TYPE_LIGHT = "android.sensor.light";
|
||||
field public static final java.lang.String STRING_TYPE_LINEAR_ACCELERATION = "android.sensor.linear_acceleration";
|
||||
field public static final java.lang.String STRING_TYPE_MAGNETIC_FIELD = "android.sensor.magnetic_field";
|
||||
field public static final java.lang.String STRING_TYPE_MAGNETIC_FIELD_UNCALIBRATED = "android.sensor.magnetic_field_uncalibrated";
|
||||
field public static final java.lang.String STRING_TYPE_MOTION_DETECT = "android.sensor.motion_detect";
|
||||
field public static final deprecated java.lang.String STRING_TYPE_ORIENTATION = "android.sensor.orientation";
|
||||
field public static final java.lang.String STRING_TYPE_POSE_6DOF = "android.sensor.pose_6dof";
|
||||
field public static final java.lang.String STRING_TYPE_PRESSURE = "android.sensor.pressure";
|
||||
@@ -13384,6 +13386,7 @@ package android.hardware {
|
||||
field public static final java.lang.String STRING_TYPE_RELATIVE_HUMIDITY = "android.sensor.relative_humidity";
|
||||
field public static final java.lang.String STRING_TYPE_ROTATION_VECTOR = "android.sensor.rotation_vector";
|
||||
field public static final java.lang.String STRING_TYPE_SIGNIFICANT_MOTION = "android.sensor.significant_motion";
|
||||
field public static final java.lang.String STRING_TYPE_STATIONARY_DETECT = "android.sensor.stationary_detect";
|
||||
field public static final java.lang.String STRING_TYPE_STEP_COUNTER = "android.sensor.step_counter";
|
||||
field public static final java.lang.String STRING_TYPE_STEP_DETECTOR = "android.sensor.step_detector";
|
||||
field public static final deprecated java.lang.String STRING_TYPE_TEMPERATURE = "android.sensor.temperature";
|
||||
@@ -13395,11 +13398,13 @@ package android.hardware {
|
||||
field public static final int TYPE_GRAVITY = 9; // 0x9
|
||||
field public static final int TYPE_GYROSCOPE = 4; // 0x4
|
||||
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_LIGHT = 5; // 0x5
|
||||
field public static final int TYPE_LINEAR_ACCELERATION = 10; // 0xa
|
||||
field public static final int TYPE_MAGNETIC_FIELD = 2; // 0x2
|
||||
field public static final int TYPE_MAGNETIC_FIELD_UNCALIBRATED = 14; // 0xe
|
||||
field public static final int TYPE_MOTION_DETECT = 30; // 0x1e
|
||||
field public static final deprecated int TYPE_ORIENTATION = 3; // 0x3
|
||||
field public static final int TYPE_POSE_6DOF = 28; // 0x1c
|
||||
field public static final int TYPE_PRESSURE = 6; // 0x6
|
||||
@@ -13407,6 +13412,7 @@ package android.hardware {
|
||||
field public static final int TYPE_RELATIVE_HUMIDITY = 12; // 0xc
|
||||
field public static final int TYPE_ROTATION_VECTOR = 11; // 0xb
|
||||
field public static final int TYPE_SIGNIFICANT_MOTION = 17; // 0x11
|
||||
field public static final int TYPE_STATIONARY_DETECT = 29; // 0x1d
|
||||
field public static final int TYPE_STEP_COUNTER = 19; // 0x13
|
||||
field public static final int TYPE_STEP_DETECTOR = 18; // 0x12
|
||||
field public static final deprecated int TYPE_TEMPERATURE = 7; // 0x7
|
||||
|
||||
@@ -13773,11 +13773,13 @@ package android.hardware {
|
||||
field public static final java.lang.String STRING_TYPE_GRAVITY = "android.sensor.gravity";
|
||||
field public static final java.lang.String STRING_TYPE_GYROSCOPE = "android.sensor.gyroscope";
|
||||
field public static final java.lang.String STRING_TYPE_GYROSCOPE_UNCALIBRATED = "android.sensor.gyroscope_uncalibrated";
|
||||
field public static final java.lang.String STRING_TYPE_HEART_BEAT = "android.sensor.heart_beat";
|
||||
field public static final java.lang.String STRING_TYPE_HEART_RATE = "android.sensor.heart_rate";
|
||||
field public static final java.lang.String STRING_TYPE_LIGHT = "android.sensor.light";
|
||||
field public static final java.lang.String STRING_TYPE_LINEAR_ACCELERATION = "android.sensor.linear_acceleration";
|
||||
field public static final java.lang.String STRING_TYPE_MAGNETIC_FIELD = "android.sensor.magnetic_field";
|
||||
field public static final java.lang.String STRING_TYPE_MAGNETIC_FIELD_UNCALIBRATED = "android.sensor.magnetic_field_uncalibrated";
|
||||
field public static final java.lang.String STRING_TYPE_MOTION_DETECT = "android.sensor.motion_detect";
|
||||
field public static final deprecated java.lang.String STRING_TYPE_ORIENTATION = "android.sensor.orientation";
|
||||
field public static final java.lang.String STRING_TYPE_POSE_6DOF = "android.sensor.pose_6dof";
|
||||
field public static final java.lang.String STRING_TYPE_PRESSURE = "android.sensor.pressure";
|
||||
@@ -13785,6 +13787,7 @@ package android.hardware {
|
||||
field public static final java.lang.String STRING_TYPE_RELATIVE_HUMIDITY = "android.sensor.relative_humidity";
|
||||
field public static final java.lang.String STRING_TYPE_ROTATION_VECTOR = "android.sensor.rotation_vector";
|
||||
field public static final java.lang.String STRING_TYPE_SIGNIFICANT_MOTION = "android.sensor.significant_motion";
|
||||
field public static final java.lang.String STRING_TYPE_STATIONARY_DETECT = "android.sensor.stationary_detect";
|
||||
field public static final java.lang.String STRING_TYPE_STEP_COUNTER = "android.sensor.step_counter";
|
||||
field public static final java.lang.String STRING_TYPE_STEP_DETECTOR = "android.sensor.step_detector";
|
||||
field public static final deprecated java.lang.String STRING_TYPE_TEMPERATURE = "android.sensor.temperature";
|
||||
@@ -13797,11 +13800,13 @@ package android.hardware {
|
||||
field public static final int TYPE_GRAVITY = 9; // 0x9
|
||||
field public static final int TYPE_GYROSCOPE = 4; // 0x4
|
||||
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_LIGHT = 5; // 0x5
|
||||
field public static final int TYPE_LINEAR_ACCELERATION = 10; // 0xa
|
||||
field public static final int TYPE_MAGNETIC_FIELD = 2; // 0x2
|
||||
field public static final int TYPE_MAGNETIC_FIELD_UNCALIBRATED = 14; // 0xe
|
||||
field public static final int TYPE_MOTION_DETECT = 30; // 0x1e
|
||||
field public static final deprecated int TYPE_ORIENTATION = 3; // 0x3
|
||||
field public static final int TYPE_POSE_6DOF = 28; // 0x1c
|
||||
field public static final int TYPE_PRESSURE = 6; // 0x6
|
||||
@@ -13809,6 +13814,7 @@ package android.hardware {
|
||||
field public static final int TYPE_RELATIVE_HUMIDITY = 12; // 0xc
|
||||
field public static final int TYPE_ROTATION_VECTOR = 11; // 0xb
|
||||
field public static final int TYPE_SIGNIFICANT_MOTION = 17; // 0x11
|
||||
field public static final int TYPE_STATIONARY_DETECT = 29; // 0x1d
|
||||
field public static final int TYPE_STEP_COUNTER = 19; // 0x13
|
||||
field public static final int TYPE_STEP_DETECTOR = 18; // 0x12
|
||||
field public static final deprecated int TYPE_TEMPERATURE = 7; // 0x7
|
||||
|
||||
@@ -13380,11 +13380,13 @@ package android.hardware {
|
||||
field public static final java.lang.String STRING_TYPE_GRAVITY = "android.sensor.gravity";
|
||||
field public static final java.lang.String STRING_TYPE_GYROSCOPE = "android.sensor.gyroscope";
|
||||
field public static final java.lang.String STRING_TYPE_GYROSCOPE_UNCALIBRATED = "android.sensor.gyroscope_uncalibrated";
|
||||
field public static final java.lang.String STRING_TYPE_HEART_BEAT = "android.sensor.heart_beat";
|
||||
field public static final java.lang.String STRING_TYPE_HEART_RATE = "android.sensor.heart_rate";
|
||||
field public static final java.lang.String STRING_TYPE_LIGHT = "android.sensor.light";
|
||||
field public static final java.lang.String STRING_TYPE_LINEAR_ACCELERATION = "android.sensor.linear_acceleration";
|
||||
field public static final java.lang.String STRING_TYPE_MAGNETIC_FIELD = "android.sensor.magnetic_field";
|
||||
field public static final java.lang.String STRING_TYPE_MAGNETIC_FIELD_UNCALIBRATED = "android.sensor.magnetic_field_uncalibrated";
|
||||
field public static final java.lang.String STRING_TYPE_MOTION_DETECT = "android.sensor.motion_detect";
|
||||
field public static final deprecated java.lang.String STRING_TYPE_ORIENTATION = "android.sensor.orientation";
|
||||
field public static final java.lang.String STRING_TYPE_POSE_6DOF = "android.sensor.pose_6dof";
|
||||
field public static final java.lang.String STRING_TYPE_PRESSURE = "android.sensor.pressure";
|
||||
@@ -13392,6 +13394,7 @@ package android.hardware {
|
||||
field public static final java.lang.String STRING_TYPE_RELATIVE_HUMIDITY = "android.sensor.relative_humidity";
|
||||
field public static final java.lang.String STRING_TYPE_ROTATION_VECTOR = "android.sensor.rotation_vector";
|
||||
field public static final java.lang.String STRING_TYPE_SIGNIFICANT_MOTION = "android.sensor.significant_motion";
|
||||
field public static final java.lang.String STRING_TYPE_STATIONARY_DETECT = "android.sensor.stationary_detect";
|
||||
field public static final java.lang.String STRING_TYPE_STEP_COUNTER = "android.sensor.step_counter";
|
||||
field public static final java.lang.String STRING_TYPE_STEP_DETECTOR = "android.sensor.step_detector";
|
||||
field public static final deprecated java.lang.String STRING_TYPE_TEMPERATURE = "android.sensor.temperature";
|
||||
@@ -13403,11 +13406,13 @@ package android.hardware {
|
||||
field public static final int TYPE_GRAVITY = 9; // 0x9
|
||||
field public static final int TYPE_GYROSCOPE = 4; // 0x4
|
||||
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_LIGHT = 5; // 0x5
|
||||
field public static final int TYPE_LINEAR_ACCELERATION = 10; // 0xa
|
||||
field public static final int TYPE_MAGNETIC_FIELD = 2; // 0x2
|
||||
field public static final int TYPE_MAGNETIC_FIELD_UNCALIBRATED = 14; // 0xe
|
||||
field public static final int TYPE_MOTION_DETECT = 30; // 0x1e
|
||||
field public static final deprecated int TYPE_ORIENTATION = 3; // 0x3
|
||||
field public static final int TYPE_POSE_6DOF = 28; // 0x1c
|
||||
field public static final int TYPE_PRESSURE = 6; // 0x6
|
||||
@@ -13415,6 +13420,7 @@ package android.hardware {
|
||||
field public static final int TYPE_RELATIVE_HUMIDITY = 12; // 0xc
|
||||
field public static final int TYPE_ROTATION_VECTOR = 11; // 0xb
|
||||
field public static final int TYPE_SIGNIFICANT_MOTION = 17; // 0x11
|
||||
field public static final int TYPE_STATIONARY_DETECT = 29; // 0x1d
|
||||
field public static final int TYPE_STEP_COUNTER = 19; // 0x13
|
||||
field public static final int TYPE_STEP_DETECTOR = 18; // 0x12
|
||||
field public static final deprecated int TYPE_TEMPERATURE = 7; // 0x7
|
||||
|
||||
@@ -557,6 +557,8 @@ public final class Sensor {
|
||||
* Similar to {@link #TYPE_ROTATION_VECTOR}, with additional delta
|
||||
* translation from an arbitrary reference point.
|
||||
*
|
||||
* See {@link android.hardware.SensorEvent#values SensorEvent.values} for more details.
|
||||
*
|
||||
* Can use camera, depth sensor etc to compute output value.
|
||||
*
|
||||
* This is expected to be a high power sensor and expected only to be
|
||||
@@ -574,9 +576,55 @@ public final class Sensor {
|
||||
*/
|
||||
public static final String STRING_TYPE_POSE_6DOF = "android.sensor.pose_6dof";
|
||||
|
||||
/**
|
||||
* A constant describing a stationary detect sensor.
|
||||
*
|
||||
* See {@link android.hardware.SensorEvent#values SensorEvent.values} for more details.
|
||||
*
|
||||
*/
|
||||
public static final int TYPE_STATIONARY_DETECT = 29;
|
||||
|
||||
/**
|
||||
* A constant string describing a stationary detection sensor.
|
||||
*
|
||||
* @see #TYPE_STATIONARY_DETECT
|
||||
*/
|
||||
public static final String STRING_TYPE_STATIONARY_DETECT = "android.sensor.stationary_detect";
|
||||
|
||||
/**
|
||||
* A constant describing a motion detect sensor.
|
||||
*
|
||||
* See {@link android.hardware.SensorEvent#values SensorEvent.values} for more details.
|
||||
*
|
||||
*/
|
||||
public static final int TYPE_MOTION_DETECT = 30;
|
||||
|
||||
/**
|
||||
* A constant string describing a motion detection sensor.
|
||||
*
|
||||
* @see #TYPE_MOTION_DETECT
|
||||
*/
|
||||
public static final String STRING_TYPE_MOTION_DETECT = "android.sensor.motion_detect";
|
||||
|
||||
/**
|
||||
* A constant describing a motion detect sensor.
|
||||
*
|
||||
* See {@link android.hardware.SensorEvent#values SensorEvent.values} for more details.
|
||||
*
|
||||
*/
|
||||
public static final int TYPE_HEART_BEAT = 31;
|
||||
|
||||
/**
|
||||
* A constant string describing a heart beat sensor.
|
||||
*
|
||||
* @see #TYPE_HEART_BEAT
|
||||
*/
|
||||
|
||||
public static final String STRING_TYPE_HEART_BEAT = "android.sensor.heart_beat";
|
||||
/**
|
||||
* A constant describing all sensor types.
|
||||
*/
|
||||
|
||||
public static final int TYPE_ALL = -1;
|
||||
|
||||
// If this flag is set, the sensor defined as a wake up sensor. This field and REPORTING_MODE_*
|
||||
|
||||
@@ -396,7 +396,7 @@ public class SensorEvent {
|
||||
* dv = 216.7 *
|
||||
* (rh / 100.0 * 6.112 * Math.exp(17.62 * t / (243.12 + t)) / (273.15 + t));
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
* <h4>{@link android.hardware.Sensor#TYPE_AMBIENT_TEMPERATURE Sensor.TYPE_AMBIENT_TEMPERATURE}:
|
||||
* </h4>
|
||||
*
|
||||
@@ -531,6 +531,53 @@ public class SensorEvent {
|
||||
*
|
||||
* </ul>
|
||||
*
|
||||
* <h4>{@link android.hardware.Sensor#TYPE_STATIONARY_DETECT
|
||||
* Sensor.TYPE_STATIONARY_DETECT}:</h4>
|
||||
*
|
||||
* A TYPE_STATIONARY_DETECT event is produced if the device has been
|
||||
* stationary for at least 5 seconds with a maximal latency of 5
|
||||
* additional seconds. ie: it may take up anywhere from 5 to 10 seconds
|
||||
* afte the device has been at rest to trigger this event.
|
||||
*
|
||||
* The only allowed value is 1.0.
|
||||
*
|
||||
* <ul>
|
||||
* <li> values[0]: 1.0 </li>
|
||||
* </ul>
|
||||
*
|
||||
* <h4>{@link android.hardware.Sensor#TYPE_MOTION_DETECT
|
||||
* Sensor.TYPE_MOTION_DETECT}:</h4>
|
||||
*
|
||||
* A TYPE_MOTION_DETECT event is produced if the device has been in
|
||||
* motion for at least 5 seconds with a maximal latency of 5
|
||||
* additional seconds. ie: it may take up anywhere from 5 to 10 seconds
|
||||
* afte the device has been at rest to trigger this event.
|
||||
*
|
||||
* The only allowed value is 1.0.
|
||||
*
|
||||
* <ul>
|
||||
* <li> values[0]: 1.0 </li>
|
||||
* </ul>
|
||||
*
|
||||
* <h4>{@link android.hardware.Sensor#TYPE_HEART_BEAT
|
||||
* Sensor.TYPE_HEART_BEAT}:</h4>
|
||||
*
|
||||
* A sensor of this type returns an event everytime a hear beat peak is
|
||||
* detected.
|
||||
*
|
||||
* Peak here ideally corresponds to the positive peak in the QRS complex of
|
||||
* an ECG signal.
|
||||
*
|
||||
* <ul>
|
||||
* <li> values[0]: confidence</li>
|
||||
* </ul>
|
||||
*
|
||||
* <p>
|
||||
* A confidence value of 0.0 indicates complete uncertainty - that a peak
|
||||
* is as likely to be at the indicated timestamp as anywhere else.
|
||||
* A confidence value of 1.0 indicates complete certainly - that a peak is
|
||||
* completely unlikely to be anywhere else on the QRS complex.
|
||||
* </p>
|
||||
*/
|
||||
public final float[] values;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user