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

Commit da9875f9 authored by Wei Sheng Shih's avatar Wei Sheng Shih Committed by Android (Google) Code Review
Browse files

Merge "Clean up remove_starting_in_transition flag" into main

parents 7c803107 15e60da7
Loading
Loading
Loading
Loading
+0 −11
Original line number Diff line number Diff line
@@ -363,17 +363,6 @@ flag {
    bug: "382774299"
}

flag {
    name: "remove_starting_in_transition"
    namespace: "windowing_frontend"
    description: "Allows the starting window to be removed while a transition is in progress."
    bug: "397353053"
    is_fixed_read_only: true
    metadata {
        purpose: PURPOSE_BUGFIX
    }
}

flag {
    name: "transition_handler_cuj_tags"
    namespace: "windowing_frontend"
+1 −1
Original line number Diff line number Diff line
@@ -44,7 +44,7 @@ public enum ShellProtoLogGroup implements IProtoLogGroup {
            "ShellDragAndDrop"),
    WM_SHELL_STARTING_WINDOW(Consts.ENABLE_DEBUG, Consts.ENABLE_LOG_TO_PROTO_DEBUG, false,
            Consts.TAG_WM_STARTING_WINDOW),
    WM_SHELL_REMOVE_STARTING_TRACKER(Consts.ENABLE_DEBUG, Consts.ENABLE_LOG_TO_PROTO_DEBUG, true,
    WM_SHELL_REMOVE_STARTING_TRACKER(Consts.ENABLE_DEBUG, Consts.ENABLE_LOG_TO_PROTO_DEBUG, false,
            Consts.TAG_WM_STARTING_WINDOW),
    WM_SHELL_BACK_PREVIEW(Consts.ENABLE_DEBUG, Consts.ENABLE_LOG_TO_PROTO_DEBUG, true,
            "ShellBackPreview"),
+8 −19
Original line number Diff line number Diff line
@@ -51,7 +51,6 @@ import com.android.internal.annotations.GuardedBy;
import com.android.internal.protolog.ProtoLog;
import com.android.internal.util.function.TriConsumer;
import com.android.launcher3.icons.IconProvider;
import com.android.window.flags.Flags;
import com.android.wm.shell.ShellTaskOrganizer;
import com.android.wm.shell.common.ExternalInterfaceBinder;
import com.android.wm.shell.common.RemoteCallable;
@@ -144,10 +143,8 @@ public class StartingWindowController implements RemoteCallable<StartingWindowCo
        mShellTaskOrganizer.initStartingWindow(this);
        mShellController.addExternalInterface(IStartingWindow.DESCRIPTOR,
                this::createExternalInterface, this);
        if (Flags.removeStartingInTransition()) {
        mTransitions.registerObserver(mRemoveStartingObserver);
    }
    }

    @VisibleForTesting
    @ShellMainThread
@@ -363,10 +360,8 @@ public class StartingWindowController implements RemoteCallable<StartingWindowCo
     * Called when a task need a starting window.
     */
    public void addStartingWindow(StartingWindowInfo windowInfo) {
        if (Flags.removeStartingInTransition()) {
        mShellMainExecutor.execute(() -> mRemoveStartingObserver.onAddingWindow(
                windowInfo.taskInfo.taskId, windowInfo.transitionToken, windowInfo.appToken));
        }
        mSplashScreenExecutor.execute(() -> {
            Trace.traceBegin(TRACE_TAG_WINDOW_MANAGER, "addStartingWindow");

@@ -396,12 +391,10 @@ public class StartingWindowController implements RemoteCallable<StartingWindowCo
                    mTaskLaunchingCallback.accept(taskId, suggestionType, color);
                }
            }
            if (Flags.removeStartingInTransition()) {
            if (!mStartingSurfaceDrawer.hasStartingWindow(taskId, isWindowless)) {
                mShellMainExecutor.execute(() ->
                        mRemoveStartingObserver.forceRemoveWindow(taskId, windowInfo.appToken));
            }
            }
            Trace.traceEnd(TRACE_TAG_WINDOW_MANAGER);
        });
    }
@@ -438,12 +431,8 @@ public class StartingWindowController implements RemoteCallable<StartingWindowCo
     */
    public void removeStartingWindow(StartingWindowRemovalInfo removalInfo) {
        final int taskId = removalInfo.taskId;
        if (Flags.removeStartingInTransition()) {
        mShellMainExecutor.execute(() ->
                mRemoveStartingObserver.requestRemoval(taskId, removalInfo));
        } else {
            removeStartingWindowInner(removalInfo);
        }
    }

    void removeStartingWindowInner(StartingWindowRemovalInfo removalInfo) {
+0 −2
Original line number Diff line number Diff line
@@ -37,7 +37,6 @@ import android.os.Binder;
import android.os.Bundle;
import android.os.IBinder;
import android.os.UserManager;
import android.platform.test.annotations.EnableFlags;
import android.view.Display;
import android.window.StartingWindowRemovalInfo;
import android.window.TransitionInfo;
@@ -134,7 +133,6 @@ public class StartingWindowControllerTests extends ShellTestCase {
    }

    @Test
    @EnableFlags(com.android.window.flags.Flags.FLAG_REMOVE_STARTING_IN_TRANSITION)
    public void testRemoveStartingInShell() {
        final int taskId = 1;
        final IBinder token = new Binder();
+1 −7
Original line number Diff line number Diff line
@@ -2769,13 +2769,7 @@ final class ActivityRecord extends WindowToken {
        final boolean animate;
        final boolean hasImeSurface;
        if (mStartingData != null) {
            if (!Flags.removeStartingInTransition()) {
                if (getSyncTransactionCommitCallbackDepth() > 0 || mSyncState != SYNC_STATE_NONE) {
                    mStartingData.mRemoveAfterTransaction = AFTER_TRANSACTION_REMOVE_DIRECTLY;
                    mStartingData.mPrepareRemoveAnimation = prepareAnimation;
                    return;
                }
            } else if (mSyncState != SYNC_STATE_NONE) {
            if (mSyncState != SYNC_STATE_NONE) {
                mStartingData.mRemoveAfterTransaction = AFTER_TRANSACTION_REMOVE_DIRECTLY;
                mStartingData.mPrepareRemoveAnimation = prepareAnimation;
                return;
Loading