Merge "Fix weird split-screen secondary task animation" into ub-launcher3-rvc-dev

This commit is contained in:
TreeHugger Robot
2020-05-20 01:57:15 +00:00
committed by Android (Google) Code Review
3 changed files with 5 additions and 11 deletions
@@ -99,9 +99,6 @@ public class AppWindowAnimationHelper implements TransformParams.BuilderProxy {
private void updateSourceStack(RemoteAnimationTargetCompat target) {
mSourceInsets.set(target.contentInsets);
mSourceStackBounds.set(target.screenSpaceBounds);
// TODO: Should sourceContainerBounds already have this offset?
mSourceStackBounds.offsetTo(target.position.x, target.position.y);
}
public void updateTargetRect(Rect targetRect) {
@@ -169,14 +166,14 @@ public class AppWindowAnimationHelper implements TransformParams.BuilderProxy {
crop.offsetTo(0, 0);
float cornerRadius = 0f;
float scale = Math.max(mCurrentRect.width(), mTargetRect.width()) / crop.width();
mTmpMatrix.setTranslate(0, 0);
if (app.activityType == RemoteAnimationTargetCompat.ACTIVITY_TYPE_HOME) {
mTmpMatrix.setTranslate(app.localBounds.left, app.localBounds.top);
}
if (app.mode == targetMode
&& app.activityType != RemoteAnimationTargetCompat.ACTIVITY_TYPE_HOME) {
mTmpMatrix.setRectToRect(mSourceRect, mCurrentRect, ScaleToFit.FILL);
if (app.localBounds != null) {
mTmpMatrix.postTranslate(app.localBounds.left, app.localBounds.top);
} else {
mTmpMatrix.postTranslate(app.position.x, app.position.y);
}
mTmpMatrix.postTranslate(app.localBounds.left, app.localBounds.top);
mCurrentClipRectF.roundOut(crop);
if (mSupportsRoundedCornersOnWindows) {
if (params.getCornerRadius() > -1) {
@@ -132,8 +132,6 @@ public class TaskViewSimulator implements TransformParams.BuilderProxy {
mThumbnailData.windowingMode = WINDOWING_MODE_FULLSCREEN;
mThumbnailPosition.set(runningTarget.screenSpaceBounds);
// TODO: Should sourceContainerBounds already have this offset?
mThumbnailPosition.offset(-mRunningTarget.position.x, -mRunningTarget.position.y);
mLayoutValid = false;
}
@@ -472,7 +472,6 @@ public class TaskThumbnailView extends View implements PluginListener<OverviewSc
} else {
setThumbnailRotation(deltaRotate, thumbnailInsets, scale, thumbnailPosition);
}
mMatrix.postTranslate(-thumbnailPosition.left, -thumbnailPosition.top);
final float widthWithInsets;
final float heightWithInsets;