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

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

Clean up shell transition check in WM shell

ENABLE_SHELL_TRANSITIONS is always true.

Bug: 365884835
Flag: EXEMPT remove outdated code
Test: WMShellUnitTests
Change-Id: I9007314b9082d22d2f41b9a522d46e784f078802
parent bccf1b44
Loading
Loading
Loading
Loading
+0 −4
Original line number Diff line number Diff line
@@ -23,10 +23,6 @@
         TODO(b/238217847): This config is temporary until we refactor the base WMComponent. -->
    <bool name="config_registerShellTaskOrganizerOnInit">true</bool>

    <!-- Determines whether to register the shell transitions on init.
         TODO(b/238217847): This config is temporary until we refactor the base WMComponent. -->
    <bool name="config_registerShellTransitionsOnInit">true</bool>

    <!-- Animation duration for PIP when entering. -->
    <integer name="config_pipEnterAnimationDuration">425</integer>

+0 −5
Original line number Diff line number Diff line
@@ -3582,10 +3582,5 @@ public class BubbleController implements ConfigurationChangeListener,
        public void setTaskBounds(TaskViewTaskController taskView, Rect boundsOnScreen) {
            mBaseTransitions.setTaskBounds(taskView, boundsOnScreen);
        }

        @Override
        public boolean isUsingShellTransitions() {
            return mBaseTransitions.isUsingShellTransitions();
        }
    }
}
+0 −4
Original line number Diff line number Diff line
@@ -797,10 +797,6 @@ public abstract class WMShellBaseModule {
            RootTaskDisplayAreaOrganizer rootTaskDisplayAreaOrganizer,
            HomeTransitionObserver homeTransitionObserver,
            FocusTransitionObserver focusTransitionObserver) {
        if (!context.getResources().getBoolean(R.bool.config_registerShellTransitionsOnInit)) {
            // TODO(b/238217847): Force override shell init if registration is disabled
            shellInit = new ShellInit(mainExecutor);
        }
        return new Transitions(context, shellInit, shellCommandHandler, shellController, organizer,
                pool, displayController, displayInsetsController, mainExecutor, mainHandler,
                animExecutor, rootTaskDisplayAreaOrganizer, homeTransitionObserver,
+0 −14
Original line number Diff line number Diff line
@@ -163,20 +163,6 @@ public class TaskView extends SurfaceView implements SurfaceHolder.Callback,
        mTaskViewController.moveTaskViewToFullscreen(mTaskViewTaskController);
    }

    @Override
    public void onTaskAppeared(ActivityManager.RunningTaskInfo taskInfo, SurfaceControl leash) {
        if (mTaskViewController.isUsingShellTransitions()) {
            // No need for additional work as it is already taken care of during
            // prepareOpenAnimation().
            return;
        }
        onLocationChanged();
        if (taskInfo.taskDescription != null) {
            final int bgColor = taskInfo.taskDescription.getBackgroundColor();
            runOnViewThread(() -> setResizeBackgroundColor(bgColor));
        }
    }

    @Override
    public void onTaskInfoChanged(ActivityManager.RunningTaskInfo taskInfo) {
        if (taskInfo.taskDescription != null) {
+0 −3
Original line number Diff line number Diff line
@@ -127,7 +127,4 @@ public interface TaskViewController {
     * @param boundsOnScreen the on screen bounds of the surface view.
     */
    void setTaskBounds(TaskViewTaskController taskView, Rect boundsOnScreen);

    /** Whether shell-transitions are currently enabled. */
    boolean isUsingShellTransitions();
}
Loading