Skip to content
Commit 83410fbb authored by Charles William Dick's avatar Charles William Dick Committed by Chromium LUCI CQ
Browse files

Disable Battery Saver when charging powered off

When a device is asleep or powered off, we don't get PowerStatus
updates, so we don't disable battery saver when charging.

BatterySaverController now uses a saved pref to detect jumps in charge
while running or across session restore which indicate that charging
occurred. Battery saver is disabled as if charging had been detected
directly.

Bug: b:319462921
Test: ash_unittests, manually charging while off and asleep.

Change-Id: I01d87eb7aaf8d020ffbbf2f851f155cccf71d432
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5377546


Reviewed-by: default avatarMichael Wojcicka <mwoj@google.com>
Reviewed-by: default avatarXiaoqian Dai <xdai@chromium.org>
Commit-Queue: Charles Dick <cwd@google.com>
Reviewed-by: default avatarDavid Padlipsky <dpad@google.com>
Reviewed-by: default avatarJiaming Cheng <jiamingc@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1281664}
parent 8ed99404
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment