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

Skip to content
Unverified Commit 8f75bfa0 authored by Tommy Webb's avatar Tommy Webb Committed by Michael Bestas
Browse files

Fix stuck screen from display change timeout

Occasionally, a remote display change is not processed within the
timeout period. One prominent example is when a device is not able
to complete its rotation from landscape back to portrait in time after
the display is turned off. When this happens, and the callback is
called after the timeout instead, DisplayContent.sendNewConfiguration
abandons its effort when it sees there are pending display changes, but
this callback itself might be the pending display change, and it does
not expect itself to be included as part of this decision. Remove all
callbacks before calling the last one to prevent this.

Test: Manual: Build and run with REMOTE_DISPLAY_CHANGE_TIMEOUT_MS = 50,
or some other low value. Enter landscape mode, e.g. by playing a video.
Turn off the screen. Wait 3 seconds. Turn the screen back on. The lock
screen will appear as normal. Previously, the screen would remain
black until a restart or `adb shell wm` change interaction.

Issue: calyxos#1392
Change-Id: I53659d5580cdd70b4c7138dcca770b11f5397194
parent 52f39a1c
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