Merge "Tune springs when app animates home into the hotseat on devices with a taskbar." into tm-qpr-dev am: fad8c1c449 am: 03bb5fe49c

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/22146526

Change-Id: I0adde19b10d0bf6c25c5025453fd361a0804cf62
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Jon Miranda
2023-03-20 22:12:54 +00:00
committed by Automerger Merge Worker
8 changed files with 161 additions and 35 deletions

View File

@@ -137,6 +137,8 @@ import com.android.quickstep.SystemUiProxy;
import com.android.quickstep.TaskViewUtils;
import com.android.quickstep.util.MultiValueUpdateListener;
import com.android.quickstep.util.RectFSpringAnim;
import com.android.quickstep.util.RectFSpringAnim.DefaultSpringConfig;
import com.android.quickstep.util.RectFSpringAnim.TaskbarHotseatSpringConfig;
import com.android.quickstep.util.RemoteAnimationProvider;
import com.android.quickstep.util.StaggeredWorkspaceAnim;
import com.android.quickstep.util.SurfaceTransaction;
@@ -1349,6 +1351,7 @@ public class QuickstepTransitionManager implements OnDeviceProfileChangeListener
}
// Get floating view and target rect.
boolean isInHotseat = false;
if (launcherView instanceof LauncherAppWidgetHostView) {
Size windowSize = new Size(mDeviceProfile.availableWidthPx,
mDeviceProfile.availableHeightPx);
@@ -1364,12 +1367,17 @@ public class QuickstepTransitionManager implements OnDeviceProfileChangeListener
? null
: mLauncher.getTaskbarUIController().findMatchingView(launcherView),
true /* hideOriginal */, targetRect, false /* isOpening */);
isInHotseat = launcherView.getTag() instanceof ItemInfo
&& ((ItemInfo) launcherView.getTag()).isInHotseat();
} else {
targetRect.set(getDefaultWindowTargetRect());
}
RectFSpringAnim anim = new RectFSpringAnim(closingWindowStartRect, targetRect, mLauncher,
mDeviceProfile);
boolean useTaskbarHotseatParams = mDeviceProfile.isTaskbarPresent && isInHotseat;
RectFSpringAnim anim = new RectFSpringAnim(useTaskbarHotseatParams
? new TaskbarHotseatSpringConfig(mLauncher, closingWindowStartRect, targetRect)
: new DefaultSpringConfig(mLauncher, mDeviceProfile, closingWindowStartRect,
targetRect));
// Hook up floating views to the closing window animators.
final int rotationChange = getRotationChange(targets);