Loading libs/WindowManager/Shell/src/com/android/wm/shell/pip/phone/PipMotionHelper.java +11 −0 Original line number Diff line number Diff line Loading @@ -416,6 +416,17 @@ public class PipMotionHelper implements PipAppOpsListener.Callback, // location now. mSpringingToTouch = false; // Boost the velocityX if it's zero to forcefully push it towards the nearest edge. // We don't simply change the xEndValue below since the PhysicsAnimator would rely on the // same velocityX to find out which edge to snap to. if (velocityX == 0) { final int motionCenterX = mPipBoundsState .getMotionBoundsState().getBoundsInMotion().centerX(); final int displayCenterX = mPipBoundsState .getDisplayBounds().centerX(); velocityX = (motionCenterX < displayCenterX) ? -0.001f : 0.001f; } mTemporaryBoundsPhysicsAnimator .spring(FloatProperties.RECT_WIDTH, getBounds().width(), mSpringConfig) .spring(FloatProperties.RECT_HEIGHT, getBounds().height(), mSpringConfig) Loading libs/WindowManager/Shell/src/com/android/wm/shell/pip2/phone/PipMotionHelper.java +11 −0 Original line number Diff line number Diff line Loading @@ -416,6 +416,17 @@ public class PipMotionHelper implements PipAppOpsListener.Callback, // location now. mSpringingToTouch = false; // Boost the velocityX if it's zero to forcefully push it towards the nearest edge. // We don't simply change the xEndValue below since the PhysicsAnimator would rely on the // same velocityX to find out which edge to snap to. if (velocityX == 0) { final int motionCenterX = mPipBoundsState .getMotionBoundsState().getBoundsInMotion().centerX(); final int displayCenterX = mPipBoundsState .getDisplayBounds().centerX(); velocityX = (motionCenterX < displayCenterX) ? -0.001f : 0.001f; } mTemporaryBoundsPhysicsAnimator .spring(FloatProperties.RECT_WIDTH, getBounds().width(), mSpringConfig) .spring(FloatProperties.RECT_HEIGHT, getBounds().height(), mSpringConfig) Loading Loading
libs/WindowManager/Shell/src/com/android/wm/shell/pip/phone/PipMotionHelper.java +11 −0 Original line number Diff line number Diff line Loading @@ -416,6 +416,17 @@ public class PipMotionHelper implements PipAppOpsListener.Callback, // location now. mSpringingToTouch = false; // Boost the velocityX if it's zero to forcefully push it towards the nearest edge. // We don't simply change the xEndValue below since the PhysicsAnimator would rely on the // same velocityX to find out which edge to snap to. if (velocityX == 0) { final int motionCenterX = mPipBoundsState .getMotionBoundsState().getBoundsInMotion().centerX(); final int displayCenterX = mPipBoundsState .getDisplayBounds().centerX(); velocityX = (motionCenterX < displayCenterX) ? -0.001f : 0.001f; } mTemporaryBoundsPhysicsAnimator .spring(FloatProperties.RECT_WIDTH, getBounds().width(), mSpringConfig) .spring(FloatProperties.RECT_HEIGHT, getBounds().height(), mSpringConfig) Loading
libs/WindowManager/Shell/src/com/android/wm/shell/pip2/phone/PipMotionHelper.java +11 −0 Original line number Diff line number Diff line Loading @@ -416,6 +416,17 @@ public class PipMotionHelper implements PipAppOpsListener.Callback, // location now. mSpringingToTouch = false; // Boost the velocityX if it's zero to forcefully push it towards the nearest edge. // We don't simply change the xEndValue below since the PhysicsAnimator would rely on the // same velocityX to find out which edge to snap to. if (velocityX == 0) { final int motionCenterX = mPipBoundsState .getMotionBoundsState().getBoundsInMotion().centerX(); final int displayCenterX = mPipBoundsState .getDisplayBounds().centerX(); velocityX = (motionCenterX < displayCenterX) ? -0.001f : 0.001f; } mTemporaryBoundsPhysicsAnimator .spring(FloatProperties.RECT_WIDTH, getBounds().width(), mSpringConfig) .spring(FloatProperties.RECT_HEIGHT, getBounds().height(), mSpringConfig) Loading