Skip to content

Commit f683b56

Browse files
author
Craig Mautner
committed
Send masked soft input mode into method.
Sending the unmasked soft input mode int setAttachedWindowFrames included the SOFT_INPUT_STATE bits and guaranteed that the adjust test would always pass. Bug 7256294 Change-Id: Iaf5368432c7b350fe70687d08c0a08e814b35e94
1 parent bfbf6e1 commit f683b56

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

policy/src/com/android/internal/policy/impl/PhoneWindowManager.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2568,11 +2568,13 @@ public void layoutWindowLw(WindowState win, WindowManager.LayoutParams attrs,
25682568
final boolean hasNavBar = (isDefaultDisplay && mHasNavigationBar
25692569
&& mNavigationBar != null && mNavigationBar.isVisibleLw());
25702570

2571+
final int adjust = sim & SOFT_INPUT_MASK_ADJUST;
2572+
25712573
if (!isDefaultDisplay) {
25722574
if (attached != null) {
25732575
// If this window is attached to another, our display
25742576
// frame is the same as the one we are attached to.
2575-
setAttachedWindowFrames(win, fl, sim, attached, true, pf, df, cf, vf);
2577+
setAttachedWindowFrames(win, fl, adjust, attached, true, pf, df, cf, vf);
25762578
} else {
25772579
// Give the window full screen.
25782580
pf.left = df.left = cf.left = mUnrestrictedScreenLeft;
@@ -2591,8 +2593,6 @@ public void layoutWindowLw(WindowState win, WindowManager.LayoutParams attrs,
25912593
attrs.gravity = Gravity.BOTTOM;
25922594
mDockLayer = win.getSurfaceLayer();
25932595
} else {
2594-
final int adjust = sim & SOFT_INPUT_MASK_ADJUST;
2595-
25962596
if ((fl & (FLAG_LAYOUT_IN_SCREEN | FLAG_FULLSCREEN | FLAG_LAYOUT_INSET_DECOR))
25972597
== (FLAG_LAYOUT_IN_SCREEN | FLAG_LAYOUT_INSET_DECOR)
25982598
&& (sysUiFl & View.SYSTEM_UI_FLAG_FULLSCREEN) == 0) {
@@ -2606,7 +2606,7 @@ public void layoutWindowLw(WindowState win, WindowManager.LayoutParams attrs,
26062606
if (attached != null) {
26072607
// If this window is attached to another, our display
26082608
// frame is the same as the one we are attached to.
2609-
setAttachedWindowFrames(win, fl, sim, attached, true, pf, df, cf, vf);
2609+
setAttachedWindowFrames(win, fl, adjust, attached, true, pf, df, cf, vf);
26102610
} else {
26112611
if (attrs.type == TYPE_STATUS_BAR_PANEL
26122612
|| attrs.type == TYPE_STATUS_BAR_SUB_PANEL) {

0 commit comments

Comments
 (0)