cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dase...@apache.org
Subject cordova-plugin-device-motion git commit: CB-11531 Restart Accelerometer on CyanogenMod 13
Date Thu, 07 Jul 2016 09:24:48 GMT
Repository: cordova-plugin-device-motion
Updated Branches:
  refs/heads/master 57dfb5f90 -> 293dcb922


CB-11531 Restart Accelerometer on CyanogenMod 13

Reset sensor accuracy after setting it to SENSOR_STATUS_UNRELIABLE in stop


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-device-motion/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-device-motion/commit/293dcb92
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-device-motion/tree/293dcb92
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-device-motion/diff/293dcb92

Branch: refs/heads/master
Commit: 293dcb9220ac379a9e4cd7776d02969367df6dca
Parents: 57dfb5f
Author: daserge <v-seshak@microsoft.com>
Authored: Wed Jul 6 11:17:17 2016 +0300
Committer: daserge <v-seshak@microsoft.com>
Committed: Wed Jul 6 11:17:17 2016 +0300

----------------------------------------------------------------------
 src/android/AccelListener.java | 3 +++
 1 file changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugin-device-motion/blob/293dcb92/src/android/AccelListener.java
----------------------------------------------------------------------
diff --git a/src/android/AccelListener.java b/src/android/AccelListener.java
index e36f0db..3932c0f 100755
--- a/src/android/AccelListener.java
+++ b/src/android/AccelListener.java
@@ -148,6 +148,9 @@ public class AccelListener extends CordovaPlugin implements SensorEventListener
 
         this.setStatus(AccelListener.STARTING);
 
+        // CB-11531: Reset accuracy to the default level
+        this.accuracy = SensorManager.SENSOR_STATUS_ACCURACY_MEDIUM;
+
         // Get accelerometer from sensor manager
         List<Sensor> list = this.sensorManager.getSensorList(Sensor.TYPE_ACCELEROMETER);
 


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


Mime
View raw message