diff options
Diffstat (limited to 'services/java/com/android/server/power/PowerManagerService.java')
-rw-r--r-- | services/java/com/android/server/power/PowerManagerService.java | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/services/java/com/android/server/power/PowerManagerService.java b/services/java/com/android/server/power/PowerManagerService.java index 7f83c17c94a6..5a5d91000ef1 100644 --- a/services/java/com/android/server/power/PowerManagerService.java +++ b/services/java/com/android/server/power/PowerManagerService.java @@ -1150,6 +1150,16 @@ public final class PowerManagerService extends IPowerManager.Stub } userActivityNoUpdateLocked( now, PowerManager.USER_ACTIVITY_EVENT_OTHER, 0, Process.SYSTEM_UID); + + // Tell the notifier whether wireless charging has started so that + // it can provide feedback to the user. Refer to + // shouldWakeUpWhenPluggedOrUnpluggedLocked for justification of the + // heuristics used here. + if (!wasPowered && mIsPowered + && mPlugType == BatteryManager.BATTERY_PLUGGED_WIRELESS + && mBatteryLevel < WIRELESS_CHARGER_TURN_ON_BATTERY_LEVEL_LIMIT) { + mNotifier.onWirelessChargingStarted(); + } } } } |