diff options
author | Jeff Brown <jeffbrown@google.com> | 2013-01-09 18:46:37 -0800 |
---|---|---|
committer | Jeff Brown <jeffbrown@google.com> | 2013-01-10 10:01:56 -0800 |
commit | 3b971598ed28d45c176e3f9b076fc743a406296d (patch) | |
tree | bf1911234e5906757f80496b754a27a6e08eb748 /services/java/com/android/server/power/DisplayPowerController.java | |
parent | 93a4ab2fa2efd8908c30298796af710c1ec0f85f (diff) |
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
Diffstat (limited to 'services/java/com/android/server/power/DisplayPowerController.java')
-rw-r--r-- | services/java/com/android/server/power/DisplayPowerController.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/services/java/com/android/server/power/DisplayPowerController.java b/services/java/com/android/server/power/DisplayPowerController.java index 724e1260249d..b5010f2ac7b0 100644 --- a/services/java/com/android/server/power/DisplayPowerController.java +++ b/services/java/com/android/server/power/DisplayPowerController.java @@ -344,7 +344,7 @@ final class DisplayPowerController { * Creates the display power controller. */ public DisplayPowerController(Looper looper, Context context, Notifier notifier, - LightsService lights, TwilightService twilight, + LightsService lights, TwilightService twilight, SensorManager sensorManager, DisplayManagerService displayManager, DisplayBlanker displayBlanker, Callbacks callbacks, Handler callbackHandler) { @@ -356,7 +356,7 @@ final class DisplayPowerController { mLights = lights; mTwilight = twilight; - mSensorManager = new SystemSensorManager(mHandler.getLooper()); + mSensorManager = sensorManager; mDisplayManager = displayManager; final Resources resources = context.getResources(); |