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

This commit is contained in:
Jon Miranda
2023-03-20 20:54:27 +00:00
committed by Android (Google) Code Review
8 changed files with 161 additions and 35 deletions

View File

@@ -136,6 +136,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;
@@ -1342,6 +1344,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);
@@ -1357,12 +1360,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);