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

Commit ae5daa21 authored by Ben Lin's avatar Ben Lin
Browse files

Deprecate PipBoundsHandler#mLastDestinationBounds.

It's only used in one place, and just for setShelfHeight. We will just
use PipTaskOrganizer's bounds instead.

Bug: 147155783
Test: atest PinnedStackTests
Change-Id: I3a200a5df65e4e602286e9397b3b4586f9c2952f
parent 5400de35
Loading
Loading
Loading
Loading
+0 −13
Original line number Diff line number Diff line
@@ -61,12 +61,6 @@ public class PipBoundsHandler {
    private final DisplayInfo mDisplayInfo = new DisplayInfo();
    private final Rect mTmpInsets = new Rect();

    /**
     * Tracks the destination bounds, used for any following
     * {@link #onMovementBoundsChanged(Rect, Rect, Rect, DisplayInfo)} calculations.
     */
    private final Rect mLastDestinationBounds = new Rect();

    private ComponentName mLastPipComponentName;
    private float mReentrySnapFraction = INVALID_SNAP_FRACTION;
    private Size mReentrySize;
@@ -198,11 +192,6 @@ public class PipBoundsHandler {
        mReentrySnapFraction = INVALID_SNAP_FRACTION;
        mReentrySize = null;
        mLastPipComponentName = null;
        mLastDestinationBounds.setEmpty();
    }

    public Rect getLastDestinationBounds() {
        return mLastDestinationBounds;
    }

    public Rect getDisplayBounds() {
@@ -258,7 +247,6 @@ public class PipBoundsHandler {
                    false /* useCurrentMinEdgeSize */);
        }
        mAspectRatio = aspectRatio;
        mLastDestinationBounds.set(destinationBounds);
        return destinationBounds;
    }

@@ -309,7 +297,6 @@ public class PipBoundsHandler {
                snapFraction);

        outBounds.set(postChangeStackBounds);
        mLastDestinationBounds.set(outBounds);
        t.setBounds(pinnedStackInfo.stackToken, outBounds);
        return true;
    }
+1 −1
Original line number Diff line number Diff line
@@ -295,7 +295,7 @@ public class PipManager implements BasePipManager, PipTaskOrganizer.PipTransitio
            final boolean changed = mPipBoundsHandler.setShelfHeight(visible, height);
            if (changed) {
                mTouchHandler.onShelfVisibilityChanged(visible, height);
                updateMovementBounds(mPipBoundsHandler.getLastDestinationBounds(),
                updateMovementBounds(mPipTaskOrganizer.getLastReportedBounds(),
                        false /* fromRotation */, false /* fromImeAdjustment */,
                        true /* fromShelfAdjustment */);
            }