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

Commit 52dd2fa1 authored by jorgegil@google.com's avatar jorgegil@google.com
Browse files

Align PIP menu after rotation

Moves the menu and updates its bounds to the post-rotation bounds.

Bug: 173252147
Test: enter Pip, tap to show menu, rotate - verify menu moves with
the Pip window

Change-Id: I19f33d256be6d6d7612cdfafcf0cae9c3620cb25
parent a997c886
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -66,7 +66,6 @@ import com.android.wm.shell.ShellTaskOrganizer;
import com.android.wm.shell.common.DisplayController;
import com.android.wm.shell.common.ShellExecutor;
import com.android.wm.shell.common.annotations.ShellMainThread;
import com.android.wm.shell.legacysplitscreen.LegacySplitScreen;
import com.android.wm.shell.legacysplitscreen.LegacySplitScreenController;
import com.android.wm.shell.pip.phone.PipMotionHelper;
import com.android.wm.shell.transition.Transitions;
@@ -973,7 +972,8 @@ public class PipTaskOrganizer implements ShellTaskOrganizer.TaskListener,
        finishResizeForMenu(destinationBounds);
    }

    private void finishResizeForMenu(Rect destinationBounds) {
    /** Moves the PiP menu to the destination bounds. */
    public void finishResizeForMenu(Rect destinationBounds) {
        mPipMenuController.movePipMenu(null, null, destinationBounds);
        mPipMenuController.updateMenuBounds(destinationBounds);
    }
+1 −0
Original line number Diff line number Diff line
@@ -552,6 +552,7 @@ public class PipController implements PipTransitionController.PipTransitionCallb
        // mTouchHandler would rely on the bounds populated from mPipTaskOrganizer
        mPipTaskOrganizer.onMovementBoundsChanged(outBounds, fromRotation, fromImeAdjustment,
                fromShelfAdjustment, wct);
        mPipTaskOrganizer.finishResizeForMenu(outBounds);
        mTouchHandler.onMovementBoundsChanged(mTmpInsetBounds, mPipBoundsState.getNormalBounds(),
                outBounds, fromImeAdjustment, fromShelfAdjustment, rotation);
    }