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

Commit 34628833 authored by wilsonshih's avatar wilsonshih Committed by Wei Sheng Shih
Browse files

WindowState isSyncFinished should also check isVisibleRequested

WS#isSyncFinished could pass too early when the visibility is gone,
which make nothing draw on the ActivityRecord. There should also check
isVisibleRequested for that condition.

Bug: 199363064
Test: enable shell transition, quick switch app several times and
verify no flicker happen.
Change-Id: Ia4af7c989159d7f0612a78bfe13853d50955beed
parent e921c7a2
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -6034,7 +6034,8 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP

    @Override
    boolean isSyncFinished() {
        if (mSyncState == SYNC_STATE_WAITING_FOR_DRAW && mViewVisibility == View.GONE) {
        if (mSyncState == SYNC_STATE_WAITING_FOR_DRAW && mViewVisibility == View.GONE
                && !isVisibleRequested()) {
            // Don't wait for GONE windows. However, we don't alter the state in case the window
            // becomes un-gone while the syncset is still active.
            return true;