diff options
Diffstat (limited to 'quickstep/src/com/android/quickstep/util/SwipePipToHomeAnimator.java')
-rw-r--r-- | quickstep/src/com/android/quickstep/util/SwipePipToHomeAnimator.java | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/quickstep/src/com/android/quickstep/util/SwipePipToHomeAnimator.java b/quickstep/src/com/android/quickstep/util/SwipePipToHomeAnimator.java index 7cc2c468fa..fe6ce46072 100644 --- a/quickstep/src/com/android/quickstep/util/SwipePipToHomeAnimator.java +++ b/quickstep/src/com/android/quickstep/util/SwipePipToHomeAnimator.java @@ -145,6 +145,12 @@ public class SwipePipToHomeAnimator extends RectFSpringAnim { sourceRectHint = null; } + if (sourceRectHint != null && !appBounds.contains(sourceRectHint)) { + // This is a situation in which the source hint rect is outside the app bounds, so it is + // not a valid rectangle to use for cropping app surface + sourceRectHint = null; + } + if (sourceRectHint == null) { mSourceRectHint.setEmpty(); mSourceHintRectInsets = null; @@ -153,8 +159,8 @@ public class SwipePipToHomeAnimator extends RectFSpringAnim { // to other classes like PipTaskOrganizer / RecentsAnimationController to complete // the cleanup. mPipContentOverlay = new PipContentOverlay.PipAppIconOverlay(view.getContext(), - mAppBounds, new IconProvider(context).getIcon(mActivityInfo), - appIconSizePx); + mAppBounds, mDestinationBounds, + new IconProvider(context).getIcon(mActivityInfo), appIconSizePx); final SurfaceControl.Transaction tx = new SurfaceControl.Transaction(); mPipContentOverlay.attach(tx, mLeash); } else { |