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

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

PiP: Double-tap to maximum, again to go back to last resized size.

When double tapping, it now maximizes PiP to the biggest size possible,
but doesn't save the maximized bounds as a user resize. Instead, save
the current bounds before maximizing, and then restore that if user
double taps again.

Bug: 178881304
Test: Double-tap on PiP
Change-Id: Ib1dfb07e1ee1134759309213089504bb1eb97279
parent 621abeb8
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -30,7 +30,6 @@ import android.content.res.Resources;
import android.graphics.Point;
import android.graphics.PointF;
import android.graphics.Rect;
import android.os.Handler;
import android.provider.DeviceConfig;
import android.util.Size;
import android.view.InputEvent;
@@ -846,11 +845,11 @@ public class PipTouchHandler {
                            && mPipBoundsState.getBounds().height()
                            < mPipBoundsState.getMaxSize().y;
                    if (toExpand) {
                        mPipResizeGestureHandler.setUserResizeBounds(mPipBoundsState.getBounds());
                        animateToMaximizedState(null);
                    } else {
                        animateToMinimizedState();
                        animateToUnexpandedState(getUserResizeBounds());
                    }
                    mPipResizeGestureHandler.setUserResizeBounds(mPipBoundsState.getBounds());
                } else {
                    // Expand to fullscreen if this is a double tap
                    // the PiP should be frozen until the transition ends