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
Loading
Please register or sign in to comment