From 89283aa3298fab44a2bc5937c3349e1ed11a1533 Mon Sep 17 00:00:00 2001 From: Alex Chau Date: Tue, 1 Oct 2024 15:41:14 +0100 Subject: [PATCH] Override pivot in TaskViewSimulator as well for zoom in launch animation - When launching large tiles, we zoom in RecentsView into the task we're launching, override pivot of RecentsView in the process - This pivot override to be applied to TaskViewSimulator if a live tile is on screen, to avoid live tile animating to wrong position - Also ensure the live tile draws above RecentsView, to avoid wallpaper blur from applying on the live tile Fix: 361744056 Test: Launch central/side large tile with different live tile combinations Flag: com.android.launcher3.enable_large_desktop_windowing_tile Change-Id: I804edb988fb157d939dba34bc596c8b43aac8a45 --- .../src/com/android/quickstep/util/TaskViewSimulator.java | 8 ++++++++ .../src/com/android/quickstep/views/RecentsView.java | 7 +++++++ 2 files changed, 15 insertions(+) diff --git a/quickstep/src/com/android/quickstep/util/TaskViewSimulator.java b/quickstep/src/com/android/quickstep/util/TaskViewSimulator.java index c7777d86a5..f5be1039f5 100644 --- a/quickstep/src/com/android/quickstep/util/TaskViewSimulator.java +++ b/quickstep/src/com/android/quickstep/util/TaskViewSimulator.java @@ -304,6 +304,14 @@ public class TaskViewSimulator implements TransformParams.BuilderProxy { calculateTaskSize(); } + /** + * Override the pivot used to apply scale changes. + */ + public void setPivotOverride(PointF pivotOverride) { + mPivotOverride = pivotOverride; + getFullScreenScale(); + } + /** * Adds animation for all the components corresponding to transition from an app to overview. */ diff --git a/quickstep/src/com/android/quickstep/views/RecentsView.java b/quickstep/src/com/android/quickstep/views/RecentsView.java index 0d2acf0dab..36d8f45856 100644 --- a/quickstep/src/com/android/quickstep/views/RecentsView.java +++ b/quickstep/src/com/android/quickstep/views/RecentsView.java @@ -5418,6 +5418,13 @@ public abstract class RecentsView< mTempPointF); setPivotX(mTempPointF.x); setPivotY(mTempPointF.y); + runActionOnRemoteHandles( + remoteTargetHandle -> { + remoteTargetHandle.getTaskViewSimulator().setPivotOverride( + mTempPointF); + remoteTargetHandle.getTaskViewSimulator().setDrawsBelowRecents( + false); + }); } }); } else if (!showAsGrid) {