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

Skip to content
Commit aadc62d7 authored by Leon Scroggins III's avatar Leon Scroggins III
Browse files

Fix subtle bug in disableHardwareVsync

I54a1304a3428968134cc707b24d5b325927c31df introduced a bug in
disableHardwareVsync. If you pass false for `disallow`, it can switch
from the `Disallowed` state to the `Disabled` state, which is not
intended. Correct this by leaving the state unchanged if it's already
`Disallowed`.

Add tests. DisableDoesNotMakeAllowed catches the failure. While we're at
it, add a test that verifies that it disallows when it's intended to,
versions of the existing tests calling disableHardwareVsync that
pass true for `disallow`, and a test verifying that disable leaves it
allowed when passing `false`.

Bug: 241286146
Test: VsyncScheduleTest
Change-Id: I0036ba97b28bef64f9bae7c1c93f3c31e8733f48
parent 1af0fb6e
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