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
This commit is contained in:
Vinit Nayak
2023-11-01 16:14:30 -07:00
parent 5a1c88629b
commit febd61fb3f
2 changed files with 13 additions and 1 deletions

View File

@@ -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