diff options
author | Jaikumar Ganesh <jaikumar@google.com> | 2013-04-16 18:59:31 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2013-04-16 18:59:32 +0000 |
commit | 37f58dccecd778f5af1f1f1db492c75ec5fcabd6 (patch) | |
tree | f220114f4a2e5ed0240facbbac4fbc9305c74a8c /core/java/android | |
parent | cfd48d77a2d11324ce8641a9cc178fb9f12500a3 (diff) | |
parent | edb5242355023c6f16d46be32bdfef8471f88890 (diff) | |
download | frameworks_base-37f58dccecd778f5af1f1f1db492c75ec5fcabd6.zip frameworks_base-37f58dccecd778f5af1f1f1db492c75ec5fcabd6.tar.gz frameworks_base-37f58dccecd778f5af1f1f1db492c75ec5fcabd6.tar.bz2 |
Merge "Fix wrong index value." into jb-mr2-dev
Diffstat (limited to 'core/java/android')
-rw-r--r-- | core/java/android/hardware/Sensor.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/core/java/android/hardware/Sensor.java b/core/java/android/hardware/Sensor.java index 074f8fe..71a5382 100644 --- a/core/java/android/hardware/Sensor.java +++ b/core/java/android/hardware/Sensor.java @@ -188,6 +188,8 @@ public final class Sensor { // Upon detection of an event, the sensor deactivates itself and then sends a single event. static int REPORTING_MODE_ONE_SHOT = 3; + // TODO(): The following arrays are fragile and error-prone. This needs to be refactored. + // Note: This needs to be updated, whenever a new sensor is added. private static int[] sSensorReportingModes = { REPORTING_MODE_CONTINUOUS, REPORTING_MODE_CONTINUOUS, REPORTING_MODE_CONTINUOUS, @@ -201,7 +203,7 @@ public final class Sensor { // Holds the maximum length of the values array associated with {@link SensorEvent} or // {@link TriggerEvent} for the Sensor private static int[] sMaxLengthValuesArray = { - 3, 3, 3, 3, 3, 3, 3, 3, 3, 5, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 5, 3, 3, 6, 4, 6, 1 }; static int getReportingMode(Sensor sensor) { |