Loading quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java +2 −0 Original line number Diff line number Diff line Loading @@ -1796,6 +1796,8 @@ public abstract class AbsSwipeUpHandler<T extends RecentsViewContainer, && (windowRotation == ROTATION_90 || windowRotation == ROTATION_270)) { builder.setFromRotation(mRemoteTargetHandles[0].getTaskViewSimulator(), windowRotation, taskInfo.displayCutoutInsets); } else if (taskInfo.displayCutoutInsets != null) { builder.setDisplayCutoutInsets(taskInfo.displayCutoutInsets); } final SwipePipToHomeAnimator swipePipToHomeAnimator = builder.build(); AnimatorPlaybackController activityAnimationToHome = Loading quickstep/src/com/android/quickstep/util/SwipePipToHomeAnimator.java +10 −11 Original line number Diff line number Diff line Loading @@ -442,13 +442,21 @@ public class SwipePipToHomeAnimator extends RectFSpringAnim { return this; } public Builder setDisplayCutoutInsets(@NonNull Rect displayCutoutInsets) { mDisplayCutoutInsets = new Rect(displayCutoutInsets); return this; } public SwipePipToHomeAnimator build() { if (mDestinationBoundsTransformed.isEmpty()) { mDestinationBoundsTransformed.set(mDestinationBounds); } // adjust the mSourceRectHint / mAppBounds by display cutout if applicable. if (mSourceRectHint != null && mDisplayCutoutInsets != null) { if (mFromRotation == Surface.ROTATION_90) { if (mFromRotation == Surface.ROTATION_0 && mDisplayCutoutInsets.top >= 0) { // TODO: this is to special case the issues on Pixel Foldable device(s). mSourceRectHint.offset(mDisplayCutoutInsets.left, mDisplayCutoutInsets.top); } else if (mFromRotation == Surface.ROTATION_90) { mSourceRectHint.offset(mDisplayCutoutInsets.left, mDisplayCutoutInsets.top); } else if (mFromRotation == Surface.ROTATION_270) { mAppBounds.inset(mDisplayCutoutInsets); Loading @@ -462,15 +470,6 @@ public class SwipePipToHomeAnimator extends RectFSpringAnim { } } private static class RotatedPosition { private final float degree; private final float positionX; private final float positionY; private RotatedPosition(float degree, float positionX, float positionY) { this.degree = degree; this.positionX = positionX; this.positionY = positionY; } private record RotatedPosition(float degree, float positionX, float positionY) { } } Loading
quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java +2 −0 Original line number Diff line number Diff line Loading @@ -1796,6 +1796,8 @@ public abstract class AbsSwipeUpHandler<T extends RecentsViewContainer, && (windowRotation == ROTATION_90 || windowRotation == ROTATION_270)) { builder.setFromRotation(mRemoteTargetHandles[0].getTaskViewSimulator(), windowRotation, taskInfo.displayCutoutInsets); } else if (taskInfo.displayCutoutInsets != null) { builder.setDisplayCutoutInsets(taskInfo.displayCutoutInsets); } final SwipePipToHomeAnimator swipePipToHomeAnimator = builder.build(); AnimatorPlaybackController activityAnimationToHome = Loading
quickstep/src/com/android/quickstep/util/SwipePipToHomeAnimator.java +10 −11 Original line number Diff line number Diff line Loading @@ -442,13 +442,21 @@ public class SwipePipToHomeAnimator extends RectFSpringAnim { return this; } public Builder setDisplayCutoutInsets(@NonNull Rect displayCutoutInsets) { mDisplayCutoutInsets = new Rect(displayCutoutInsets); return this; } public SwipePipToHomeAnimator build() { if (mDestinationBoundsTransformed.isEmpty()) { mDestinationBoundsTransformed.set(mDestinationBounds); } // adjust the mSourceRectHint / mAppBounds by display cutout if applicable. if (mSourceRectHint != null && mDisplayCutoutInsets != null) { if (mFromRotation == Surface.ROTATION_90) { if (mFromRotation == Surface.ROTATION_0 && mDisplayCutoutInsets.top >= 0) { // TODO: this is to special case the issues on Pixel Foldable device(s). mSourceRectHint.offset(mDisplayCutoutInsets.left, mDisplayCutoutInsets.top); } else if (mFromRotation == Surface.ROTATION_90) { mSourceRectHint.offset(mDisplayCutoutInsets.left, mDisplayCutoutInsets.top); } else if (mFromRotation == Surface.ROTATION_270) { mAppBounds.inset(mDisplayCutoutInsets); Loading @@ -462,15 +470,6 @@ public class SwipePipToHomeAnimator extends RectFSpringAnim { } } private static class RotatedPosition { private final float degree; private final float positionX; private final float positionY; private RotatedPosition(float degree, float positionX, float positionY) { this.degree = degree; this.positionX = positionX; this.positionY = positionY; } private record RotatedPosition(float degree, float positionX, float positionY) { } }