diff options
author | Winson Chung <winsonc@google.com> | 2018-05-24 15:10:50 -0700 |
---|---|---|
committer | Winson Chung <winsonc@google.com> | 2018-05-24 15:10:50 -0700 |
commit | af41ea2ac52e1dbf57e46c1b02c5ee302ed4cff1 (patch) | |
tree | 9fc016ec46686b048153913ed9c3b226c9681c9f | |
parent | ededa9cce28ec47f4b6a392db165044c3189be64 (diff) | |
download | android_packages_apps_Trebuchet-af41ea2ac52e1dbf57e46c1b02c5ee302ed4cff1.tar.gz android_packages_apps_Trebuchet-af41ea2ac52e1dbf57e46c1b02c5ee302ed4cff1.tar.bz2 android_packages_apps_Trebuchet-af41ea2ac52e1dbf57e46c1b02c5ee302ed4cff1.zip |
Fix recents task view launch animation unclipping issue.
- Don't apply the scale to app window crop (which should be in app window
space)
Bug: 79945202
Change-Id: I68862f7f7d69eab64570ab3b1e3996a2e9a9e2ba
-rw-r--r-- | quickstep/src/com/android/quickstep/util/ClipAnimationHelper.java | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/quickstep/src/com/android/quickstep/util/ClipAnimationHelper.java b/quickstep/src/com/android/quickstep/util/ClipAnimationHelper.java index cc24f1d8a..a654482f9 100644 --- a/quickstep/src/com/android/quickstep/util/ClipAnimationHelper.java +++ b/quickstep/src/com/android/quickstep/util/ClipAnimationHelper.java @@ -227,12 +227,16 @@ public class ClipAnimationHelper { dl.getDescendantRectRelativeToSelf(ttv, targetRect.rect); updateTargetRect(targetRect); - // Transform the clip relative to the target rect. - float scale = mTargetRect.width() / mSourceRect.width(); - mSourceWindowClipInsets.left = mSourceWindowClipInsets.left * scale; - mSourceWindowClipInsets.top = mSourceWindowClipInsets.top * scale; - mSourceWindowClipInsets.right = mSourceWindowClipInsets.right * scale; - mSourceWindowClipInsets.bottom = mSourceWindowClipInsets.bottom * scale; + if (target == null) { + // Transform the clip relative to the target rect. Only do this in the case where we + // aren't applying the insets to the app windows (where the clip should be in target app + // space) + float scale = mTargetRect.width() / mSourceRect.width(); + mSourceWindowClipInsets.left = mSourceWindowClipInsets.left * scale; + mSourceWindowClipInsets.top = mSourceWindowClipInsets.top * scale; + mSourceWindowClipInsets.right = mSourceWindowClipInsets.right * scale; + mSourceWindowClipInsets.bottom = mSourceWindowClipInsets.bottom * scale; + } } private void updateStackBoundsToMultiWindowTaskSize(BaseDraggingActivity activity) { |