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

Commit 10afe4ee authored by Nader Jawad's avatar Nader Jawad
Browse files

Updated EdgeEffect stretch distance

Updated stretch constant from 0.1f to 1f
Updated distance to be maximum of width/height

Bug: 182567334
Test: Re-ran CTS tests
Change-Id: I943c7d1013cfabd86bb678fa7b408f0f97a17075
parent d4481aec
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -177,7 +177,7 @@ public class EdgeEffect {
    private long mStartTime;
    private float mDuration;
    private float mStretchIntensity = DEFAULT_MAX_STRETCH_INTENSITY;
    private float mStretchDistanceFraction = 0.1f;
    private float mStretchDistanceFraction = 1f;
    private float mStretchDistance = -1f;

    private final Interpolator mInterpolator = new DecelerateInterpolator();
@@ -656,7 +656,7 @@ public class EdgeEffect {
                    //  for now leverage placeholder logic if no stretch distance is provided to
                    //  consume the displacement ratio times the minimum of the width or height
                    mStretchDistance > 0 ? mStretchDistance :
                            (mStretchDistanceFraction * Math.min(mWidth, mHeight))
                            (mStretchDistanceFraction * Math.max(mWidth, mHeight))
            );
        }