@@ -2573,11 +2573,13 @@ public void layoutWindowLw(WindowState win, WindowManager.LayoutParams attrs,
25732573 final boolean hasNavBar = (isDefaultDisplay && mHasNavigationBar
25742574 && mNavigationBar != null && mNavigationBar .isVisibleLw ());
25752575
2576+ final int adjust = sim & SOFT_INPUT_MASK_ADJUST ;
2577+
25762578 if (!isDefaultDisplay ) {
25772579 if (attached != null ) {
25782580 // If this window is attached to another, our display
25792581 // frame is the same as the one we are attached to.
2580- setAttachedWindowFrames (win , fl , sim , attached , true , pf , df , cf , vf );
2582+ setAttachedWindowFrames (win , fl , adjust , attached , true , pf , df , cf , vf );
25812583 } else {
25822584 // Give the window full screen.
25832585 pf .left = df .left = cf .left = mUnrestrictedScreenLeft ;
@@ -2596,8 +2598,6 @@ public void layoutWindowLw(WindowState win, WindowManager.LayoutParams attrs,
25962598 attrs .gravity = Gravity .BOTTOM ;
25972599 mDockLayer = win .getSurfaceLayer ();
25982600 } else {
2599- final int adjust = sim & SOFT_INPUT_MASK_ADJUST ;
2600-
26012601 if ((fl & (FLAG_LAYOUT_IN_SCREEN | FLAG_FULLSCREEN | FLAG_LAYOUT_INSET_DECOR ))
26022602 == (FLAG_LAYOUT_IN_SCREEN | FLAG_LAYOUT_INSET_DECOR )
26032603 && (sysUiFl & View .SYSTEM_UI_FLAG_FULLSCREEN ) == 0 ) {
@@ -2611,7 +2611,7 @@ public void layoutWindowLw(WindowState win, WindowManager.LayoutParams attrs,
26112611 if (attached != null ) {
26122612 // If this window is attached to another, our display
26132613 // frame is the same as the one we are attached to.
2614- setAttachedWindowFrames (win , fl , sim , attached , true , pf , df , cf , vf );
2614+ setAttachedWindowFrames (win , fl , adjust , attached , true , pf , df , cf , vf );
26152615 } else {
26162616 if (attrs .type == TYPE_STATUS_BAR_PANEL
26172617 || attrs .type == TYPE_STATUS_BAR_SUB_PANEL ) {
0 commit comments