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

Commit 27acbf2a authored by Automerger Merge Worker's avatar Automerger Merge Worker
Browse files

Merge "Reset IME insets source frame at begin layout" into rvc-dev am:...

Merge "Reset IME insets source frame at begin layout" into rvc-dev am: 4f8a751a am: 713b5472 am: 4d2baf2a am: 864eda9f

Change-Id: I6418fce5bf34b52e221706769607c6e83c831590
parents faa8b3f2 864eda9f
Loading
Loading
Loading
Loading
+9 −2
Original line number Diff line number Diff line
@@ -28,6 +28,7 @@ import static android.view.Display.TYPE_INTERNAL;
import static android.view.InsetsState.ITYPE_BOTTOM_DISPLAY_CUTOUT;
import static android.view.InsetsState.ITYPE_BOTTOM_GESTURES;
import static android.view.InsetsState.ITYPE_BOTTOM_TAPPABLE_ELEMENT;
import static android.view.InsetsState.ITYPE_IME;
import static android.view.InsetsState.ITYPE_LEFT_DISPLAY_CUTOUT;
import static android.view.InsetsState.ITYPE_LEFT_GESTURES;
import static android.view.InsetsState.ITYPE_NAVIGATION_BAR;
@@ -1469,8 +1470,14 @@ public class DisplayPolicy {
     */
    public void beginLayoutLw(DisplayFrames displayFrames, int uiMode) {
        displayFrames.onBeginLayout();
        updateInsetsStateForDisplayCutout(displayFrames,
                mDisplayContent.getInsetsStateController().getRawInsetsState());
        final InsetsState insetsState =
                mDisplayContent.getInsetsStateController().getRawInsetsState();

        // Reset the frame of IME so that the layout of windows above IME won't get influenced.
        // Once we layout the IME, frames will be set again on the source.
        insetsState.getSource(ITYPE_IME).setFrame(0, 0, 0, 0);

        updateInsetsStateForDisplayCutout(displayFrames, insetsState);
        mSystemGestures.screenWidth = displayFrames.mUnrestricted.width();
        mSystemGestures.screenHeight = displayFrames.mUnrestricted.height();