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

Commit 0078150d authored by Riddle Hsu's avatar Riddle Hsu
Browse files

Finish sync for relayout a drawn window

An activity may change visibility in a short time as visible
-> invisible -> visible without reset drawn state. E.g. scene
transition convert to translucent. Then if its window relayout
to clear mRedrawForSyncReported, the window will stuck by
SYNC_STATE_WAITING_FOR_DRAW until it becomes invisible or timeout.

This also relates to non-sync blast so maybeSyncSeqId is -1 then
the window won't report drawn.

Bug: 260093427
Test: Enable shell transition.
      Launch Messages and click its search bar.
      There should be fade out/in animation for activity switch.
Change-Id: I49746b56e7dda76c530366663000b0d11ae779f3
parent 58de71a4
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -2587,6 +2587,12 @@ public class WindowManagerService extends IWindowManager.Stub
                        && win.mSyncSeqId > lastSyncSeqId) {
                    maybeSyncSeqId = win.shouldSyncWithBuffers() ? win.mSyncSeqId : -1;
                    win.markRedrawForSyncReported();
                    if (win.mSyncState == WindowContainer.SYNC_STATE_WAITING_FOR_DRAW
                            && winAnimator.mDrawState == WindowStateAnimator.HAS_DRAWN
                            && maybeSyncSeqId < 0) {
                        // Do not wait for a drawn window which won't report draw.
                        win.onSyncFinishedDrawing();
                    }
                } else {
                    maybeSyncSeqId = -1;
                }