diff options
| author | 2010-11-29 17:26:51 -0800 | |
|---|---|---|
| committer | 2010-11-30 15:41:16 -0800 | |
| commit | b483d5cd134cda393824fd8e9c1a5443bd868ae6 (patch) | |
| tree | 69874006f190dd4a8407f297a04538f61ea27267 /libs/ui/InputReader.cpp | |
| parent | 186b68b74417e8ef73f2083769166e7785df6c30 (diff) | |
fix [3237242] sensormanager sensor active count gets out of sync
whether a physical sensor needed to be active or not was managed by
a simpe reference counter; unfortunatelly nothing prevented it to
get out of sync if a sensor was disabled more than once.
sensorservice already maintainted a list of all the "clients"
connected to a physical sensor; we now use that list to determine if
a sensor should be enabled. This can never be "out-of-sync" since
this is the only data structure linking a sensor to a user of that
sensor.
also removed the isEnabled() method, which was never used and
implemented wrongly (since it didn't take into account that a sensor
could be disabled for a client but not of another).
Change-Id: I789affb877728ca957e99f7ba749def37c4db1c7
Diffstat (limited to 'libs/ui/InputReader.cpp')
0 files changed, 0 insertions, 0 deletions