commit | d8e2ddfaabc294f1778166f54bbb13cacbe59485 | [log] [tgz] |
---|---|---|
author | Winson Chung <winsonc@google.com> | Sun Jun 13 23:12:53 2021 +0000 |
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | Sun Jun 13 23:12:53 2021 +0000 |
tree | c041ca45f14812015a24706410e4de2706f3f4ac | |
parent | b6fb28c041ec91e5e6a4e1f42566df9e53df9cd8 [diff] | |
parent | 443d89cec537fe9acfd8f75f3e36609b90c58a32 [diff] |
Merge "Ignore source hint rect if it is too small" into sc-dev am: a50c38c457 am: 443d89cec5 Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/14930117 Change-Id: Ibe48e0a5fb7d38cdf46a9172a721b3a30ee2c654
diff --git a/quickstep/src/com/android/quickstep/util/SwipePipToHomeAnimator.java b/quickstep/src/com/android/quickstep/util/SwipePipToHomeAnimator.java index 3631130..1062652 100644 --- a/quickstep/src/com/android/quickstep/util/SwipePipToHomeAnimator.java +++ b/quickstep/src/com/android/quickstep/util/SwipePipToHomeAnimator.java
@@ -121,6 +121,15 @@ mDestinationBoundsAnimation.set(mDestinationBounds); mSurfaceTransactionHelper = new PipSurfaceTransactionHelper(cornerRadius); + if (sourceRectHint != null && (sourceRectHint.width() < destinationBounds.width() + || sourceRectHint.height() < destinationBounds.height())) { + // This is a situation in which the source hint rect on at least one axis is smaller + // than the destination bounds, which presents a problem because we would have to scale + // up that axis to fit the bounds. So instead, just fallback to the non-source hint + // animation in this case. + sourceRectHint = null; + } + if (sourceRectHint == null) { mSourceHintRectInsets = null;