Loading libs/WindowManager/Shell/src/com/android/wm/shell/back/CrossTaskBackAnimation.java +9 −1 Original line number Diff line number Diff line Loading @@ -18,6 +18,7 @@ package com.android.wm.shell.back; import static android.view.RemoteAnimationTarget.MODE_CLOSING; import static android.view.RemoteAnimationTarget.MODE_OPENING; import static android.window.BackEvent.EDGE_RIGHT; import static com.android.internal.jank.InteractionJankMonitor.CUJ_PREDICTIVE_BACK_CROSS_TASK; import static com.android.wm.shell.back.BackAnimationConstants.UPDATE_SYSUI_FLAGS_THRESHOLD; Loading Loading @@ -101,6 +102,7 @@ public class CrossTaskBackAnimation extends ShellBackAnimation { private RemoteAnimationTarget mClosingTarget; private final SurfaceControl.Transaction mTransaction = new SurfaceControl.Transaction(); private boolean mBackInProgress = false; private boolean mIsRightEdge; private final PointF mTouchPos = new PointF(); private IRemoteAnimationFinishedCallback mFinishCallback; private final BackProgressAnimator mProgressAnimator = new BackProgressAnimator(); Loading Loading @@ -172,7 +174,12 @@ public class CrossTaskBackAnimation extends ShellBackAnimation { // Move the window along the Y axis. float scaledTop = (height - scaledHeight) * 0.5f + deltaY; // Move the window along the X axis. float right = width - (progress * mVerticalMargin); float right; if (mIsRightEdge) { right = (width - scaledWidth) * 0.5f + scaledWidth; } else { right = width - (progress * mVerticalMargin); } float left = right - scaledWidth; mClosingCurrentRect.set(left, scaledTop, right, scaledTop + scaledHeight); Loading Loading @@ -262,6 +269,7 @@ public class CrossTaskBackAnimation extends ShellBackAnimation { private void onGestureProgress(@NonNull BackEvent backEvent) { if (!mBackInProgress) { mIsRightEdge = backEvent.getSwipeEdge() == EDGE_RIGHT; mInitialTouchPos.set(backEvent.getTouchX(), backEvent.getTouchY()); mBackInProgress = true; } Loading Loading
libs/WindowManager/Shell/src/com/android/wm/shell/back/CrossTaskBackAnimation.java +9 −1 Original line number Diff line number Diff line Loading @@ -18,6 +18,7 @@ package com.android.wm.shell.back; import static android.view.RemoteAnimationTarget.MODE_CLOSING; import static android.view.RemoteAnimationTarget.MODE_OPENING; import static android.window.BackEvent.EDGE_RIGHT; import static com.android.internal.jank.InteractionJankMonitor.CUJ_PREDICTIVE_BACK_CROSS_TASK; import static com.android.wm.shell.back.BackAnimationConstants.UPDATE_SYSUI_FLAGS_THRESHOLD; Loading Loading @@ -101,6 +102,7 @@ public class CrossTaskBackAnimation extends ShellBackAnimation { private RemoteAnimationTarget mClosingTarget; private final SurfaceControl.Transaction mTransaction = new SurfaceControl.Transaction(); private boolean mBackInProgress = false; private boolean mIsRightEdge; private final PointF mTouchPos = new PointF(); private IRemoteAnimationFinishedCallback mFinishCallback; private final BackProgressAnimator mProgressAnimator = new BackProgressAnimator(); Loading Loading @@ -172,7 +174,12 @@ public class CrossTaskBackAnimation extends ShellBackAnimation { // Move the window along the Y axis. float scaledTop = (height - scaledHeight) * 0.5f + deltaY; // Move the window along the X axis. float right = width - (progress * mVerticalMargin); float right; if (mIsRightEdge) { right = (width - scaledWidth) * 0.5f + scaledWidth; } else { right = width - (progress * mVerticalMargin); } float left = right - scaledWidth; mClosingCurrentRect.set(left, scaledTop, right, scaledTop + scaledHeight); Loading Loading @@ -262,6 +269,7 @@ public class CrossTaskBackAnimation extends ShellBackAnimation { private void onGestureProgress(@NonNull BackEvent backEvent) { if (!mBackInProgress) { mIsRightEdge = backEvent.getSwipeEdge() == EDGE_RIGHT; mInitialTouchPos.set(backEvent.getTouchX(), backEvent.getTouchY()); mBackInProgress = true; } Loading