OSDN Git Service

fix [3355413] Gyro calls onAccuracyChanged and reports accuracy as UNRELIABLE
authorMathias Agopian <mathias@google.com>
Mon, 17 Jan 2011 03:11:20 +0000 (19:11 -0800)
committerMathias Agopian <mathias@google.com>
Mon, 17 Jan 2011 03:11:20 +0000 (19:11 -0800)
commitc2b4e21320d85d48e45f6a76e4927adb380c85b8
treef0f5a51a7b19cbde84075980caff30d8ea713f3d
parent4a2e478a5bf6b4650181d1dfa643eadcc387fcec
fix [3355413] Gyro calls onAccuracyChanged and reports accuracy as UNRELIABLE

- make sure to call onAccuracyChanged only when it actually changes
- only call onAccuracyChanged on Magnetic and Orientation sensors, which
  are the only ones to support it.
- for other sensors, call onAccuracyChanged only once with the
  SENSOR_STATUS_ACCURACY_HIGH value

Change-Id: Ic861e3d48d3b98dab74ffebe2746576f5b69f371
core/java/android/hardware/SensorManager.java