Skip to content
Commit 204cb22a authored by Robin Lee's avatar Robin Lee
Browse files

DeviceIdle ignores charging state if no battery.

The behaviour we want if mBatteryPresent = false is exactly the same as
what we already have when mBatteryCharging = false, so we can just do
the same thing instead of introducing more complexity with separate
flags for battery charging vs. plugged.

This might want to change in future if we detect that, for example, the
device is plugged into a charger that does not provide enough power to
charge (eg. a high-powered laptop plugged into an old mobile charger.)

Bug: 111443261
Test: atest com.android.server.DeviceIdleControllerTest
Test: atest BatterySaverPolicyTest
Change-Id: I66004f156352484e183736897d3a2f484415f63a
parent c4d424c2
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment