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

Commit e6e9f620 authored by Riddle Hsu's avatar Riddle Hsu
Browse files

Update surface visibility when transferring starting window

Since prepareSurface no longer updates token level surface visibility,
if the visibility is changed without being collected to a transition,
it needs to schedule surface visibility update manually. Currently the
only case is mVisibleSetFromTransferredStartingWindow.

Though it also work by putting the change to transition, it doesn't
need animation for transferring starting window, so simply schedule
a surface visibility update as it was.

Bug: 415390212
Flag: EXEMPT bugfix
Test: Cold launch a trampoline activity on an existing task.
      After transferring the starting window from the trampoline
      to the existing main activity below, the main activity's
      surface should be visible.
Change-Id: I7542f067e689491f4219b0da20befdbe3af2e696
parent 983bc5f9
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -4590,6 +4590,7 @@ final class ActivityRecord extends WindowToken {
                if (fromActivity.isVisible()) {
                    setVisible(true);
                    setVisibleRequested(true);
                    mWmService.mAnimator.addSurfaceVisibilityUpdate(this);
                    mVisibleSetFromTransferredStartingWindow = true;
                }
                setClientVisible(fromActivity.isClientVisible());
@@ -7094,6 +7095,7 @@ final class ActivityRecord extends WindowToken {
            // window. We now reset it back to false since the starting window was the last
            // window in the token.
            setVisible(false);
            mWmService.mAnimator.addSurfaceVisibilityUpdate(this);
        }
    }