OSDN Git Service

[Sensor] Add a constant to match native header
authorPeng Xu <pengxu@google.com>
Fri, 4 Mar 2016 19:09:24 +0000 (11:09 -0800)
committerPeng Xu <pengxu@google.com>
Wed, 23 Mar 2016 17:51:02 +0000 (17:51 +0000)
This CL add private sensor type base constant to java file to match
C header file.

It is defined that all vendor sensor types have to be >= 0x10000.
There is a constant in sensor.h for reference. However, there is
no such constant defined in Sensor.java before. This CL adds it.

Change-Id: Ia8f8c06583c62879e51779815051c346f1a9cd14
(cherry picked from commit 1795e14dab0367fdd77f2c1eee6b4fd39d1c5902)

api/current.txt
api/system-current.txt
api/test-current.txt
core/java/android/hardware/Sensor.java

index cb5d4b3..3fc1673 100644 (file)
@@ -13541,6 +13541,7 @@ package android.hardware {
     field public static final int TYPE_ACCELEROMETER = 1; // 0x1
     field public static final int TYPE_ALL = -1; // 0xffffffff
     field public static final int TYPE_AMBIENT_TEMPERATURE = 13; // 0xd
+    field public static final int TYPE_DEVICE_PRIVATE_BASE = 65536; // 0x10000
     field public static final int TYPE_GAME_ROTATION_VECTOR = 15; // 0xf
     field public static final int TYPE_GEOMAGNETIC_ROTATION_VECTOR = 20; // 0x14
     field public static final int TYPE_GRAVITY = 9; // 0x9
index a59a704..48e1bd0 100644 (file)
@@ -13942,6 +13942,7 @@ package android.hardware {
     field public static final int TYPE_ACCELEROMETER = 1; // 0x1
     field public static final int TYPE_ALL = -1; // 0xffffffff
     field public static final int TYPE_AMBIENT_TEMPERATURE = 13; // 0xd
+    field public static final int TYPE_DEVICE_PRIVATE_BASE = 65536; // 0x10000
     field public static final int TYPE_DYNAMIC_SENSOR_META = 32; // 0x20
     field public static final int TYPE_GAME_ROTATION_VECTOR = 15; // 0xf
     field public static final int TYPE_GEOMAGNETIC_ROTATION_VECTOR = 20; // 0x14
index 87e6e53..c1035af 100644 (file)
@@ -13551,6 +13551,7 @@ package android.hardware {
     field public static final int TYPE_ACCELEROMETER = 1; // 0x1
     field public static final int TYPE_ALL = -1; // 0xffffffff
     field public static final int TYPE_AMBIENT_TEMPERATURE = 13; // 0xd
+    field public static final int TYPE_DEVICE_PRIVATE_BASE = 65536; // 0x10000
     field public static final int TYPE_GAME_ROTATION_VECTOR = 15; // 0xf
     field public static final int TYPE_GEOMAGNETIC_ROTATION_VECTOR = 20; // 0x14
     field public static final int TYPE_GRAVITY = 9; // 0x9
index 841e5b0..63ee8d2 100644 (file)
@@ -652,6 +652,14 @@ public final class Sensor {
 
     public static final int TYPE_ALL = -1;
 
+    /**
+     * The lowest sensor type vendor defined sensors can use.
+     *
+     * All vendor sensor types are greater than or equal to this constant.
+     *
+     */
+    public static final int TYPE_DEVICE_PRIVATE_BASE = 0x10000;
+
     // If this flag is set, the sensor defined as a wake up sensor. This field and REPORTING_MODE_*
     // constants are defined as flags in sensors.h. Modify at both places if needed.
     private static final int SENSOR_FLAG_WAKE_UP_SENSOR = 1;