Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a40d58c7 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Align PIP dismiss target position/physics config with Bubbles'." into rvc-dev am: de717cbb

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11908613

Change-Id: I54ef4ff5bac75e00f4630b13fe07bd5ba6507a1f
parents 882b1984 de717cbb
Loading
Loading
Loading
Loading
+4 −2
Original line number Original line Diff line number Diff line
@@ -124,7 +124,7 @@ public class PipTouchHandler {
    /** Default configuration to use for springing the dismiss target in/out. */
    /** Default configuration to use for springing the dismiss target in/out. */
    private final PhysicsAnimator.SpringConfig mTargetSpringConfig =
    private final PhysicsAnimator.SpringConfig mTargetSpringConfig =
            new PhysicsAnimator.SpringConfig(
            new PhysicsAnimator.SpringConfig(
                    SpringForce.STIFFNESS_MEDIUM, SpringForce.DAMPING_RATIO_NO_BOUNCY);
                    SpringForce.STIFFNESS_LOW, SpringForce.DAMPING_RATIO_LOW_BOUNCY);


    // The current movement bounds
    // The current movement bounds
    private Rect mMovementBounds = new Rect();
    private Rect mMovementBounds = new Rect();
@@ -324,7 +324,9 @@ public class PipTouchHandler {
        final int targetSize = res.getDimensionPixelSize(R.dimen.dismiss_circle_size);
        final int targetSize = res.getDimensionPixelSize(R.dimen.dismiss_circle_size);
        final FrameLayout.LayoutParams newParams =
        final FrameLayout.LayoutParams newParams =
                new FrameLayout.LayoutParams(targetSize, targetSize);
                new FrameLayout.LayoutParams(targetSize, targetSize);
        newParams.gravity = Gravity.CENTER;
        newParams.gravity = Gravity.CENTER_HORIZONTAL | Gravity.BOTTOM;
        newParams.bottomMargin = mContext.getResources().getDimensionPixelSize(
                R.dimen.floating_dismiss_bottom_margin);
        mTargetView.setLayoutParams(newParams);
        mTargetView.setLayoutParams(newParams);


        // Set the magnetic field radius equal to twice the size of the target.
        // Set the magnetic field radius equal to twice the size of the target.