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

Commit 3708fe21 authored by Riddle Hsu's avatar Riddle Hsu Committed by Android (Google) Code Review
Browse files

Merge "Remove waitingToShow of WindowToken" into main

parents e69e5d0c 0e87891a
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -404,7 +404,7 @@ message WindowTokenProto {
    optional WindowContainerProto window_container = 1;
    optional int32 hash_code = 2;
    repeated WindowStateProto windows = 3 [deprecated=true];
    optional bool waiting_to_show = 5;
    optional bool waiting_to_show = 5 [deprecated=true];
    optional bool paused = 6;
}

+10 −21
Original line number Diff line number Diff line
@@ -4312,7 +4312,6 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
        mTaskSupervisor.getActivityMetricsLogger().notifyActivityRemoved(this);
        mTaskSupervisor.mStoppingActivities.remove(this);
        mLetterboxUiController.destroy();
        waitingToShow = false;

        // Defer removal of this activity when either a child is animating, or app transition is on
        // going. App transition animation might be applied on the parent task not on the activity,
@@ -5386,7 +5385,6 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
        final DisplayContent displayContent = getDisplayContent();
        displayContent.mOpeningApps.remove(this);
        displayContent.mClosingApps.remove(this);
        waitingToShow = false;
        setVisibleRequested(visible);
        mLastDeferHidingClient = deferHidingClient;

@@ -5411,27 +5409,18 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
            // stopped, then we need to set up to wait for its windows to be ready.
            if (!isVisible() || mAppStopped) {
                clearAllDrawn();

                // If the app was already visible, don't reset the waitingToShow state.
                if (!isVisible()) {
                    waitingToShow = true;

                    // If the client isn't hidden, we don't need to reset the drawing state.
                    if (!isClientVisible()) {
                        // Let's reset the draw state in order to prevent the starting window to be
                        // immediately dismissed when the app still has the surface.
                // Reset the draw state in order to prevent the starting window to be immediately
                // dismissed when the app still has the surface.
                if (!isVisible() && !isClientVisible()) {
                    forAllWindows(w -> {
                        if (w.mWinAnimator.mDrawState == HAS_DRAWN) {
                            w.mWinAnimator.resetDrawState();

                                // Force add to mResizingWindows, so that we are guaranteed to get
                                // another reportDrawn callback.
                            // Force add to mResizingWindows, so the window will report drawn.
                            w.forceReportingResized();
                        }
                    }, true /* traverseTopToBottom */);
                }
            }
            }

            // In the case where we are making an app visible but holding off for a transition,
            // we still need to tell the client to make its windows visible so they get drawn.
+0 −1
Original line number Diff line number Diff line
@@ -1176,7 +1176,6 @@ public class AppTransitionController {
                mDisplayContent.mNoAnimationNotifyOnTransitionFinished.add(app.token);
            }
            app.updateReportedVisibilityLocked();
            app.waitingToShow = false;
            app.showAllWindowsLocked();

            if (mDisplayContent.mAppTransition.isNextAppTransitionThumbnailUp()) {
+0 −1
Original line number Diff line number Diff line
@@ -1906,7 +1906,6 @@ class Transition implements BLASTSyncEngine.TransactionReadyListener {
        for (int i = mParticipants.size() - 1; i >= 0; --i) {
            final WallpaperWindowToken wallpaper = mParticipants.valueAt(i).asWallpaperToken();
            if (wallpaper != null) {
                wallpaper.waitingToShow = false;
                if (!wallpaper.isVisible() && wallpaper.isVisibleRequested()) {
                    wallpaper.commitVisibility(showWallpaper);
                }
+0 −3
Original line number Diff line number Diff line
@@ -1929,9 +1929,6 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP
     * of a transition that has not yet been started.
     */
    boolean isReadyForDisplay() {
        if (mToken.waitingToShow && getDisplayContent().mAppTransition.isTransitionSet()) {
            return false;
        }
        final boolean parentAndClientVisible = !isParentWindowHidden()
                && mViewVisibility == View.VISIBLE && mToken.isVisible();
        return mHasSurface && isVisibleByPolicy() && !mDestroying
Loading