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

Skip to content
Commit b8e4c135 authored by Qi Jing's avatar Qi Jing Committed by Cherrypicker Worker
Browse files

Update LayerVector if the mirrorRoot is already inside

Mirror display creation and commitment are executed in different
threads. The mMirrorDisplays may not have been updated when
commitMirrorDisplays, so do the commitCreatedLayers first. If
handleLayerCreatedLocked adding mirrorRoot to LayerVector of
mCurrentState is executed before commitMirrorDisplays updating the
LayerStack of the mirrorRoot as -1, The order of LayerVector will
be disordered. Finally, the mirrorRoot cannot be found when removing.

In order to fix this problem. Before commitMirrorDisplays sets the
LayerStack of mirrorRoot, it needs to confirm whether the mirrorRoot
is in LayerVector. If it is in LayerVector, re-add the layer to
ensure that it is on the tail.

Bug: 294942764
Test: Monkey test with 10 screen recording
(cherry picked from https://partner-android-review.googlesource.com/q/commit:dd3d3ef5a393ee331c14de707321b3e7e3f60446)
Merged-In: Iebcab7249ddbab31e8549c6d51a9b09c4c3549f4
Change-Id: Iebcab7249ddbab31e8549c6d51a9b09c4c3549f4
parent d88ba914
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