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

Commit b0ec57cb authored by Nikolas Havrikov's avatar Nikolas Havrikov
Browse files

Fix PIP window moving outside screen bounds

Bug: 162343657
Test: atest CtsSystemUiTestCases:FlickerPipTests#pipWindow_doesNotLeaveTheScreen_onKeyboardOpenClose
Change-Id: I046f09ea73f2a17a563b9bd19b389c8c7595dd16
parent 5fed70ab
Loading
Loading
Loading
Loading
+15 −12
Original line number Diff line number Diff line
@@ -186,6 +186,8 @@ public class PipManager implements BasePipManager, PipTaskOrganizer.PipTransitio
    private class PipManagerPinnedStackListener extends PinnedStackListener {
        @Override
        public void onImeVisibilityChanged(boolean imeVisible, int imeHeight) {
            mHandler.post(() -> {
                mPipBoundsHandler.onImeVisibilityChanged(imeVisible, imeHeight);
                if (mState == STATE_PIP) {
                    if (mImeVisible != imeVisible) {
                        if (imeVisible) {
@@ -200,6 +202,7 @@ public class PipManager implements BasePipManager, PipTaskOrganizer.PipTransitio
                        resizePinnedStack(STATE_PIP);
                    }
                }
            });
        }

        @Override