History log of /frameworks/base/services/java/com/android/server/power/WirelessChargerDetector.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
dbcc8a22de0827ecc546e48a1c5b96ecc0da73a0 02-Oct-2013 Jeff Brown <jeffbrown@google.com> Track wireless charger detector timeout explicitly.

Previously we relied on having a continue stream of sensor
events from which to detect whether the device is moving or
at rest. However, if the sensor HAL is broken in some way
then we might not receive enough sensor events to actually
finish the detection process. When this happens, we'll
just sit there holding a wakelock indefinitely.

Instead of relying on the sensor event stream, post a delayed
message to explicitly finish detection.

Bug: 10769163
Change-Id: Ia2ed66fe5e7c41a8832df76da9104c13554e1398
/frameworks/base/services/java/com/android/server/power/WirelessChargerDetector.java
20e287534396655af0d5912d8b272070ad24a93a 11-Sep-2013 Jeff Brown <jeffbrown@google.com> WirelessChargerDetector: Work around bad sensor timestamps.

It turns out that on some devices the sensor event timestamp
may be non-monotonic. This may cause the detector to hold
a wakelock indefinitely if the time jumps backwards. These
timestamps are not well tested in general so there may be
other artifacts as well. Use elapsed realtime instead.

Bug: 9926451
Change-Id: Idb0b316e22b23aac86837bd25b953daf49f9b758
/frameworks/base/services/java/com/android/server/power/WirelessChargerDetector.java
3b971598ed28d45c176e3f9b076fc743a406296d 10-Jan-2013 Jeff Brown <jeffbrown@google.com> Improve heuristics for detecting wireless chargers.

On some devices, we need to apply heuristics to determine whether
the device is docked on a wireless charger because the charging
circuits do not provide sufficient information to know whether
the device is on the charger unless it is actually receiving
power.

The previous heuristics only considered the battery level to
suppress spurious dock signals.

The new heuristics also take into account whether the device
appears to have moved from its previous position on the dock.

Bug: 7744185
Change-Id: I5ba885dac25b37840b6db46b8a0f30968a06776c
/frameworks/base/services/java/com/android/server/power/WirelessChargerDetector.java