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

Commit 4f8a751a authored by Tiger Huang's avatar Tiger Huang Committed by Android (Google) Code Review
Browse files

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

parents b6b55e80 83ed9440
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();