OSDN Git Service

Sensors could be disabled by any application
authorMagnus Hallqvist <magnus.hallqvist@sonymobile.com>
Tue, 11 Sep 2012 10:46:15 +0000 (12:46 +0200)
committerJohan Redestig <johan.redestig@sonymobile.com>
Tue, 11 Sep 2012 11:25:20 +0000 (13:25 +0200)
commit6d7a4737643afe05034a36e6ebcd5da1085fbbdc
tree169a3b3d8d6e205d8d6aa35f8daaa37252478a52
parentbfe1ab825731d365fef169deab646d7ceeafc998
Sensors could be disabled by any application

In the SensorManager API unregisterListener any application could
unregister any sensor. This lets any application disable a sensor
which another application is using.
This fix restricts the applications to only be able to unregister
a sensor it has previously registered to.

Change-Id: Ief926dd29f480dd97626160810dff87a8d3ac8dc
core/java/android/hardware/SystemSensorManager.java