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

Commit febd61fb authored by Vinit Nayak's avatar Vinit Nayak
Browse files

Prevent taskbar animation for contextual split from home

* Ideal animation TODO, this is to help
unblock for now.

Flag: Flag: ACONFIG com.android.wm.shell.enable_split_contextual DEVELOPMENT
Test: With flag on and off, from home, overview, all apps
Bug: 296351434
Change-Id: Ida743a881519796ed8ce3e5966aa708c84521c51
parent 5a1c8862
Loading
Loading
Loading
Loading
+9 −1
Original line number Diff line number Diff line
@@ -16,6 +16,7 @@
package com.android.launcher3.taskbar;

import static com.android.launcher3.QuickstepTransitionManager.TRANSIENT_TASKBAR_TRANSITION_DURATION;
import static com.android.launcher3.config.FeatureFlags.enableSplitContextually;
import static com.android.launcher3.statemanager.BaseState.FLAG_NON_INTERACTIVE;
import static com.android.launcher3.taskbar.TaskbarEduTooltipControllerKt.TOOLTIP_STEP_FEATURES;
import static com.android.launcher3.taskbar.TaskbarLauncherStateController.FLAG_VISIBLE;
@@ -214,7 +215,14 @@ public class LauncherTaskbarUIController extends TaskbarUIController {
        }

        mTaskbarLauncherStateController.updateStateForFlag(FLAG_VISIBLE, isVisible);
        return mTaskbarLauncherStateController.applyState(fromInit ? 0 : duration, startAnimation);
        // TODO(b/308851855): Skip animation for launching split from home, will refine later
        boolean skipAnimForSplit = enableSplitContextually() &&
                mLauncher.areBothSplitAppsConfirmed() &&
                mLauncher.getStateManager().getState() == LauncherState.NORMAL;
        if (skipAnimForSplit || fromInit) {
            duration = 0;
        }
        return mTaskbarLauncherStateController.applyState(duration, startAnimation);
    }

    @Override
+4 −0
Original line number Diff line number Diff line
@@ -729,6 +729,10 @@ public class QuickstepLauncher extends Launcher {
        return mSplitSelectStateController.isSplitSelectActive();
    }

    public boolean areBothSplitAppsConfirmed() {
        return mSplitSelectStateController.isBothSplitAppsConfirmed();
    }

    @Override
    public void onStateTransitionCompletedAfterSwipeToHome(LauncherState finalState) {
        if (mTaskbarUIController != null) {