Fix navbar to home for All Apps.

It reuses the predictive back animation now. In addition, if All
Apps entered directly into the Search state (i.e. via QSB), the
back gesture now scales the whole panel to indicate it will close
and return to the home screen (as opposed to closing Search within
All Apps).

Demo: https://drive.google.com/file/d/1wpaZg3JaSxDMMc62uU-1miP9RaIO10EB/view?usp=drive_link&resourcekey=0-h8qKzuDguwIE2vUDr0H6lQ

Fix: 406523972
Flag: EXEMPT bugfix
Test: Manual
Change-Id: I470d67e03b2d8bbbaa39aea76c7dde639cff62f5
This commit is contained in:
Andy Wickham committed 2025-04-16 18:58:47 -07:00
1 parent 3a245f5fc2
commit f0d3ce8bfd
6 files changed
+59 -10

No files matched your search

@@ -28,6 +28,7 @@ import static com.android.launcher3.allapps.AllAppsTransitionController.ALL_APPS
import static com.android.launcher3.anim.AnimatorListeners.forSuccessCallback;
import static com.android.launcher3.logging.StatsLogManager.LauncherEvent.LAUNCHER_HOME_GESTURE;
import static com.android.launcher3.util.NavigationMode.THREE_BUTTONS;
import static com.android.launcher3.util.ScrollableLayoutManager.PREDICTIVE_BACK_MIN_SCALE;
import static com.android.systemui.shared.system.ActivityManagerWrapper.CLOSE_SYSTEM_WINDOWS_REASON_RECENTS;
import android.animation.AnimatorSet;
@@ -44,7 +45,6 @@ import com.android.launcher3.allapps.AllAppsTransitionController;
import com.android.launcher3.anim.AnimatorPlaybackController;
import com.android.launcher3.anim.PendingAnimation;
import com.android.launcher3.compat.AccessibilityManagerCompat;
import com.android.launcher3.config.FeatureFlags;
import com.android.launcher3.statemanager.StateManager;
import com.android.launcher3.touch.SingleAxisSwipeDetector;
import com.android.launcher3.util.DisplayController;
@@ -157,10 +157,16 @@ public class NavBarToHomeTouchController implements TouchController,
AbstractFloatingView.closeOpenContainer(mLauncher, AbstractFloatingView.TYPE_TASK_MENU);
} else if (mStartState == ALL_APPS) {
AllAppsTransitionController allAppsController = mLauncher.getAllAppsController();
builder.setFloat(allAppsController, ALL_APPS_PULL_BACK_TRANSLATION,
-mPullbackDistance, PULLBACK_INTERPOLATOR);
builder.setFloat(allAppsController, ALL_APPS_PULL_BACK_ALPHA,
0.5f, PULLBACK_INTERPOLATOR);
if (mLauncher.getDeviceProfile().shouldShowAllAppsOnSheet()) {
allAppsController.setShouldScaleHeader(true);
builder.addAnimatedFloat(allAppsController.getAllAppScale(), 1f,
PREDICTIVE_BACK_MIN_SCALE, PULLBACK_INTERPOLATOR);
} else {
builder.setFloat(allAppsController, ALL_APPS_PULL_BACK_TRANSLATION,
-mPullbackDistance, PULLBACK_INTERPOLATOR);
builder.setFloat(allAppsController, ALL_APPS_PULL_BACK_ALPHA,
0.5f, PULLBACK_INTERPOLATOR);
}
}
AbstractFloatingView topView = AbstractFloatingView.getTopOpenView(mLauncher);
if (topView != null) {
@@ -144,7 +144,7 @@ public class BaseDepthController {
}
public void pauseBlursOnWindows(boolean pause) {
if (pause == mPauseBlurs) {
if (mPauseBlurs == pause) {
return;
}
mPauseBlurs = pause;