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

Commit 19eaa23f authored by Taran Singh's avatar Taran Singh Committed by Automerger Merge Worker
Browse files

Merge "Update IME parent onConfigurationChanged" into sc-dev am: 7b128781 am: a6c44457

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14315425

Change-Id: Iab3c19c313348f6b4605c06d55543d2485cc76a8
parents d3a7c9a3 a6c44457
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -2411,6 +2411,8 @@ class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.Disp
            mDisplayPolicy.onConfigurationChanged();
            mPinnedTaskController.onPostDisplayConfigurationChanged();
        }
        // Update IME parent if needed.
        updateImeParent();

        if (lastOrientation != getConfiguration().orientation) {
            getMetricsLogger().write(
@@ -3965,7 +3967,8 @@ class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.Disp
        }

        // Otherwise, we just attach it to where the display area policy put it.
        return mImeWindowsContainer.getParent().getSurfaceControl();
        return mImeWindowsContainer.getParent() != null
                ? mImeWindowsContainer.getParent().getSurfaceControl() : null;
    }

    void setLayoutNeeded() {
+3 −1
Original line number Diff line number Diff line
@@ -349,7 +349,9 @@ public class DisplayContentTests extends WindowTestsBase {
        doReturn(imeSurfaceParent).when(mDisplayContent).computeImeParent();
        spyOn(imeContainer);

        mDisplayContent.updateImeParent();
        mDisplayContent.setImeInputTarget(startingWin);
        mDisplayContent.onConfigurationChanged(new Configuration());
        verify(mDisplayContent).updateImeParent();

        // Force reassign the relative layer when the IME surface parent is changed.
        verify(imeContainer).assignRelativeLayer(any(), eq(imeSurfaceParent), anyInt(), eq(true));