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

Commit 5f8dd202 authored by Jeremy Sim's avatar Jeremy Sim
Browse files

Fix transition animations for launch-from-staged operation

This change makes it so that a smoother animation will play when the user cancels the splitscreen flow by tapping the staged app to launch the app in fullscreen. Since this was the only blocker to activating the feature, this change also enables launch-from-staged by default and removes the flag.

Fixes: 257513449
Test: Manual
Change-Id: Iabff2fc72bfcd6975d216b5cd86e0df7a772b308
parent 2da05f36
Loading
Loading
Loading
Loading
+4 −12
Original line number Diff line number Diff line
@@ -2966,7 +2966,7 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
                    false /* fadeWithThumbnail */, true /* isStagedTask */);
        }

        // TODO (b/257513449): Launch animation not fully complete. OK to remove flag once it is.
        // Allow user to click staged app to launch into fullscreen
        if (ENABLE_LAUNCH_FROM_STAGED_APP.get()) {
            mFirstFloatingTaskView.setOnClickListener(this::animateToFullscreen);
        }
@@ -3037,7 +3037,9 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
                false /* fadeWithThumbnail */,
                true /* isStagedTask */);

        pendingAnimation.addEndListener(success -> launchStagedTask());
        pendingAnimation.addEndListener(animationSuccess ->
                mSplitSelectStateController.launchSplitTasks(launchSuccess ->
                        resetFromSplitSelectionState()));

        pendingAnimation.buildAnim().start();
    }
@@ -4744,16 +4746,6 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
        return mPendingAnimation;
    }

    protected void launchStagedTask() {
        if (mSplitHiddenTaskView != null) {
            // Split staging was started from an existing running task (in Overview)
            mSplitHiddenTaskView.launchTask(success -> resetFromSplitSelectionState());
        } else {
            // Split staging was started from a new intent (from app menu in Home/AllApps)
            mActivity.startActivity(mSplitSelectSource.intent);
        }
    }

    protected void onTaskLaunchAnimationEnd(boolean success) {
        if (success) {
            resetTaskVisuals();
+1 −1
Original line number Diff line number Diff line
@@ -364,7 +364,7 @@ public final class FeatureFlags {
            "ENABLE_DEVICE_PROFILE_LOGGING", false, "Allows DeviceProfile logging");

    public static final BooleanFlag ENABLE_LAUNCH_FROM_STAGED_APP = getDebugFlag(
            "ENABLE_LAUNCH_FROM_STAGED_APP", false,
            "ENABLE_LAUNCH_FROM_STAGED_APP", true,
            "Enable the ability to tap a staged app during split select to launch it in full screen"
    );