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

Commit 5b066725 authored by Gaurav Bhola's avatar Gaurav Bhola Committed by Android (Google) Code Review
Browse files

Merge "Allow IME to attach to the app even with different bounds" into main

parents 570ba8d3 de7e93fa
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -4283,7 +4283,6 @@ class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.Disp
                && mImeLayeringTarget != null
                && mImeLayeringTarget.mActivityRecord != null
                && mImeLayeringTarget.getWindowingMode() == WINDOWING_MODE_FULLSCREEN
                && mImeLayeringTarget.getBounds().equals(mImeWindowsContainer.getBounds())
                // IME is attached to app windows that fill display area. This excludes
                // letterboxed windows.
                && mImeLayeringTarget.matchesDisplayAreaBounds();
+0 −19
Original line number Diff line number Diff line
@@ -1397,25 +1397,6 @@ public class DisplayContentTests extends WindowTestsBase {
        assertEquals(mAppWindow, mDisplayContent.computeImeControlTarget());
    }

    @SetupWindows(addWindows = W_ACTIVITY)
    @Test
    public void testShouldImeAttachedToApp_targetBoundsDifferentFromImeContainer_returnsFalse() {
        Rect imeContainerBounds = new Rect(0, 0, 100, 100);
        Rect imeTargetBounds = new Rect(0, 0, 100, 200);
        spyOn(mAppWindow);
        spyOn(mAppWindow.mActivityRecord);
        doReturn(imeTargetBounds).when(mAppWindow).getBounds();
        doReturn(true).when(mAppWindow.mActivityRecord).matchParentBounds();
        mDisplayContent.setRemoteInsetsController(createDisplayWindowInsetsController());
        mDisplayContent.setImeInputTarget(mAppWindow);
        mDisplayContent.setImeLayeringTarget(mAppWindow);
        final DisplayArea.Tokens imeContainer = mDisplayContent.getImeContainer();
        spyOn(imeContainer);
        doReturn(imeContainerBounds).when(imeContainer).getBounds();

        assertFalse(mDisplayContent.shouldImeAttachedToApp());
    }

    @Test
    public void testUpdateSystemGestureExclusion() {
        final DisplayContent dc = createNewDisplay();