Skip to content

Commit 4391b0b

Browse files
committed
Prevent IME from being closed by the notification panel.
Bug: 6450921 Change-Id: I124c3776728456fdd71e57cfcf898b11a8dfc7ec
1 parent 7b8523a commit 4391b0b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -991,13 +991,12 @@ private void makeExpandedVisible() {
991991
// Expand the window to encompass the full screen in anticipation of the drag.
992992
// This is only possible to do atomically because the status bar is at the top of the screen!
993993
WindowManager.LayoutParams lp = (WindowManager.LayoutParams) mStatusBarWindow.getLayoutParams();
994-
lp.flags &= (~WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE);
994+
lp.flags &= ~WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE;
995+
lp.flags |= WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM;
995996
lp.height = ViewGroup.LayoutParams.MATCH_PARENT;
996997
final WindowManager wm = WindowManagerImpl.getDefault();
997998
wm.updateViewLayout(mStatusBarWindow, lp);
998999

999-
mStatusBarWindow.requestFocus(View.FOCUS_FORWARD);
1000-
10011000
visibilityChanged(true);
10021001
}
10031002

@@ -1084,7 +1083,8 @@ void performCollapse() {
10841083
// Shrink the window to the size of the status bar only
10851084
WindowManager.LayoutParams lp = (WindowManager.LayoutParams) mStatusBarWindow.getLayoutParams();
10861085
lp.height = getStatusBarHeight();
1087-
lp.flags |= (WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE);
1086+
lp.flags |= WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE;
1087+
lp.flags &= ~WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM;
10881088
final WindowManager wm = WindowManagerImpl.getDefault();
10891089
wm.updateViewLayout(mStatusBarWindow, lp);
10901090

0 commit comments

Comments
 (0)