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

Commit a142834b authored by Ikram Gabiyev's avatar Ikram Gabiyev Committed by Android (Google) Code Review
Browse files

Merge "Increase epsilon for aspect ratio check" into main

parents 87b37093 e6cd51c9
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -44,7 +44,8 @@ object PipUtils {
    private const val TAG = "PipUtils"

    // Minimum difference between two floats (e.g. aspect ratios) to consider them not equal.
    private const val EPSILON = 1e-7
    // TODO b/377530560: Restore epsilon once a long term fix is merged for non-config-at-end issue.
    private const val EPSILON = 0.05f

    /**
     * @return the ComponentName and user id of the top non-SystemUI activity in the pinned stack.
+2 −0
Original line number Diff line number Diff line
@@ -30,6 +30,7 @@ import androidx.annotation.Nullable;

import com.android.internal.annotations.VisibleForTesting;
import com.android.wm.shell.pip2.PipSurfaceTransactionHelper;
import com.android.wm.shell.shared.animation.Interpolators;

/**
 * Animator that handles any resize related animation for PIP.
@@ -128,6 +129,7 @@ public class PipResizeAnimator extends ValueAnimator {
        mRectEvaluator = new RectEvaluator(mAnimatedRect);

        setObjectValues(startBounds, endBounds);
        setInterpolator(Interpolators.FAST_OUT_SLOW_IN);
        addListener(mAnimatorListener);
        addUpdateListener(mAnimatorUpdateListener);
        setEvaluator(mRectEvaluator);
+1 −0
Original line number Diff line number Diff line
@@ -171,6 +171,7 @@ public class PipTaskListener implements ShellTaskOrganizer.TaskListener,
                        "Leash is null for bounds transition.");

                if (mWaitingForAspectRatioChange) {
                    mWaitingForAspectRatioChange = false;
                    PipResizeAnimator animator = new PipResizeAnimator(mContext,
                            mPipTransitionState.mPinnedTaskLeash, startTx, finishTx,
                            destinationBounds,