Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f4d19d20 authored by Darrell Shi's avatar Darrell Shi
Browse files

Prioritize checks in canDreamLocked when device is kept awake

Previously, the canDreamLocked function would immediately return true if
the device was kept awake, bypassing other crucial checks like whether
the device is powered. This could lead to unintended behaviors, such as
starting a dream even when the device was not powered but the proximity
sensor returned a positive value.

This change modifies canDreamLocked to ensure that all relevant
condition checks are evaluated *before* allowing a dream to start.

Test: atest PowerManagerServiceTest
Test: manually tested dream starting while powered and not powered
Bug: 404968947
Flag: EXEMPT bugfix
Change-Id: I5c3f529db95e9a2f006e600ddea24f20a182a3fc
parent e835c3b4
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