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

Commit 43cba792 authored by Hongwei Wang's avatar Hongwei Wang Committed by Automerger Merge Worker
Browse files

Merge "Retain current position and expand state on `next video`" into rvc-dev...

Merge "Retain current position and expand state on `next video`" into rvc-dev am: 7d4bad92 am: af9218f1

Change-Id: I6f6bce8d4316f71939cb31bdf58f024135b714f1
parents 362a5673 af9218f1
Loading
Loading
Loading
Loading
+11 −3
Original line number Diff line number Diff line
@@ -250,10 +250,19 @@ public class PipBoundsHandler {
    }

    /**
     * @return {@link Rect} of the destination PiP window bounds.
     * See {@link #getDestinationBounds(ComponentName, float, Rect, Size, boolean)}
     */
    Rect getDestinationBounds(ComponentName componentName, float aspectRatio, Rect bounds,
            Size minimalSize) {
        return getDestinationBounds(componentName, aspectRatio, bounds, minimalSize,
                false /* useCurrentMinEdgeSize */);
    }

    /**
     * @return {@link Rect} of the destination PiP window bounds.
     */
    Rect getDestinationBounds(ComponentName componentName, float aspectRatio, Rect bounds,
            Size minimalSize, boolean useCurrentMinEdgeSize) {
        if (!componentName.equals(mLastPipComponentName)) {
            onResetReentryBoundsUnchecked();
            mLastPipComponentName = componentName;
@@ -269,8 +278,7 @@ public class PipBoundsHandler {
            destinationBounds = new Rect(bounds);
        }
        if (isValidPictureInPictureAspectRatio(aspectRatio)) {
            transformBoundsToAspectRatio(destinationBounds, aspectRatio,
                    false /* useCurrentMinEdgeSize */);
            transformBoundsToAspectRatio(destinationBounds, aspectRatio, useCurrentMinEdgeSize);
        }
        mAspectRatio = aspectRatio;
        return destinationBounds;
+2 −1
Original line number Diff line number Diff line
@@ -459,7 +459,8 @@ public class PipTaskOrganizer extends TaskOrganizer implements
        }
        final Rect destinationBounds = mPipBoundsHandler.getDestinationBounds(
                info.topActivity, getAspectRatioOrDefault(newParams),
                null /* bounds */, getMinimalSize(info.topActivityInfo));
                mLastReportedBounds, getMinimalSize(info.topActivityInfo),
                true /* userCurrentMinEdgeSize */);
        Objects.requireNonNull(destinationBounds, "Missing destination bounds");
        scheduleAnimateResizePip(destinationBounds, mEnterExitAnimationDuration,
                null /* updateBoundsCallback */);