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

Commit 4d2baf2a 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: 4f8a751a am: 713b5472

Change-Id: I3c0361ff85194dbf3355316100acba19c0499492
parents 23904af8 713b5472
Loading
Loading
Loading
Loading
+9 −2
Original line number Original line 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_DISPLAY_CUTOUT;
import static android.view.InsetsState.ITYPE_BOTTOM_GESTURES;
import static android.view.InsetsState.ITYPE_BOTTOM_GESTURES;
import static android.view.InsetsState.ITYPE_BOTTOM_TAPPABLE_ELEMENT;
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_DISPLAY_CUTOUT;
import static android.view.InsetsState.ITYPE_LEFT_GESTURES;
import static android.view.InsetsState.ITYPE_LEFT_GESTURES;
import static android.view.InsetsState.ITYPE_NAVIGATION_BAR;
import static android.view.InsetsState.ITYPE_NAVIGATION_BAR;
@@ -1469,8 +1470,14 @@ public class DisplayPolicy {
     */
     */
    public void beginLayoutLw(DisplayFrames displayFrames, int uiMode) {
    public void beginLayoutLw(DisplayFrames displayFrames, int uiMode) {
        displayFrames.onBeginLayout();
        displayFrames.onBeginLayout();
        updateInsetsStateForDisplayCutout(displayFrames,
        final InsetsState insetsState =
                mDisplayContent.getInsetsStateController().getRawInsetsState());
                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.screenWidth = displayFrames.mUnrestricted.width();
        mSystemGestures.screenHeight = displayFrames.mUnrestricted.height();
        mSystemGestures.screenHeight = displayFrames.mUnrestricted.height();