summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author TreeHugger Robot <treehugger-gerrit@google.com> 2017-03-08 05:09:10 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2017-03-08 05:09:10 +0000
commit03e771f84dae4e2f774fd906be338a55d031a253 (patch)
tree6cb048ffb13ce9eb3b43381e80977890afa37393
parent0397b7027dd01d48821200fb53d8a9507bf61789 (diff)
parent37317b63338b68d579cba9c19aac1030e715c704 (diff)
Merge "Fix enum ordering in sensor NDK"
-rw-r--r--include/android/sensor.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/include/android/sensor.h b/include/android/sensor.h
index d9998ba425..186f62c65e 100644
--- a/include/android/sensor.h
+++ b/include/android/sensor.h
@@ -70,6 +70,10 @@ typedef struct AHardwareBuffer AHardwareBuffer;
*/
enum {
/**
+ * Invalid sensor type. Returned by {@link ASensor_getType} as error value.
+ */
+ ASENSOR_TYPE_INVALID = -1,
+ /**
* {@link ASENSOR_TYPE_ACCELEROMETER}
* reporting-mode: continuous
*
@@ -118,11 +122,7 @@ enum {
* All values are in SI units (m/s^2) and measure the acceleration of the
* device not including the force of gravity.
*/
- ASENSOR_TYPE_LINEAR_ACCELERATION = 10,
- /**
- * Invalid sensor type. Returned by {@link ASensor_getType} as error value.
- */
- ASENSOR_TYPE_INVALID = -1
+ ASENSOR_TYPE_LINEAR_ACCELERATION = 10
};
/**
@@ -145,6 +145,8 @@ enum {
* Sensor Reporting Modes.
*/
enum {
+ /** invalid reporting mode */
+ AREPORTING_MODE_INVALID = -1,
/** continuous reporting */
AREPORTING_MODE_CONTINUOUS = 0,
/** reporting on change */
@@ -152,9 +154,7 @@ enum {
/** on shot reporting */
AREPORTING_MODE_ONE_SHOT = 2,
/** special trigger reporting */
- AREPORTING_MODE_SPECIAL_TRIGGER = 3,
- /** invalid reporting mode */
- AREPORTING_MODE_INVALID = -1
+ AREPORTING_MODE_SPECIAL_TRIGGER = 3
};
/**