From 376cde95d04acd50515fee328ff5f9d2ff3eb4ca Mon Sep 17 00:00:00 2001 From: Johannes Gallmann Date: Tue, 9 Jan 2024 16:11:44 +0100 Subject: [PATCH] Align window clipping logic of back-to-home to cross-task-back Bug: 315461656 Flag: ACONFIG com.android.systemui.predictive_back_system_animations STAGING Test: Manual, i.e. visually verifying back to home behaviour on Felix Change-Id: I075c38fc58c56108128fdf895c62b2f626da36ad --- .../quickstep/LauncherBackAnimationController.java | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/quickstep/src/com/android/quickstep/LauncherBackAnimationController.java b/quickstep/src/com/android/quickstep/LauncherBackAnimationController.java index b9029ea9f8..df4dd4a3cf 100644 --- a/quickstep/src/com/android/quickstep/LauncherBackAnimationController.java +++ b/quickstep/src/com/android/quickstep/LauncherBackAnimationController.java @@ -23,8 +23,6 @@ import static com.android.launcher3.AbstractFloatingView.TYPE_REBIND_SAFE; import static com.android.launcher3.BaseActivity.INVISIBLE_ALL; import static com.android.launcher3.BaseActivity.INVISIBLE_BY_PENDING_FLAGS; import static com.android.launcher3.BaseActivity.PENDING_INVISIBLE_BY_WALLPAPER_ANIMATION; -import static com.android.launcher3.LauncherPrefs.TASKBAR_PINNING; -import static com.android.launcher3.config.FeatureFlags.enableTaskbarPinning; import android.animation.Animator; import android.animation.AnimatorListenerAdapter; @@ -301,11 +299,10 @@ public class LauncherBackAnimationController { mInitialTouchPos.set(backEvent.getTouchX(), backEvent.getTouchY()); mStartRect.set(appTarget.windowConfiguration.getMaxBounds()); - if (mLauncher.getDeviceProfile().isTaskbarPresent && enableTaskbarPinning() - && LauncherPrefs.get(mLauncher).get(TASKBAR_PINNING)) { - int insetBottom = mStartRect.bottom - appTarget.contentInsets.bottom; - mStartRect.set(mStartRect.left, mStartRect.top, mStartRect.right, insetBottom); - } + + // inset bottom in case of pinned taskbar being present + mStartRect.inset(0, 0, 0, appTarget.contentInsets.bottom); + mLauncherTargetView = mQuickstepTransitionManager.findLauncherView( new RemoteAnimationTarget[]{ mBackTarget }); setLauncherTargetViewVisible(false);