Fix IME displayed behind the notification shade
The Back key isn't dispatched to IME. Refine the logic of onKeyPreIme. Test: manual test Test: atest Change-Id: I6cf5402e70e91d74e5843beb390b306146159e4d Fixes:80250543
This commit is contained in:
@@ -565,10 +565,12 @@ public class RemoteInputView extends LinearLayout implements View.OnClickListene
|
||||
|
||||
@Override
|
||||
public boolean onKeyPreIme(int keyCode, KeyEvent event) {
|
||||
if (event.getKeyCode() == KeyEvent.KEYCODE_BACK) {
|
||||
mRemoteInputView.mRemoteInputQuickSettingsDisabler.setRemoteInputActive(false);
|
||||
// When BACK key is pressed, this method would be invoked twice.
|
||||
if (event.getKeyCode() == KeyEvent.KEYCODE_BACK &&
|
||||
event.getAction() == KeyEvent.ACTION_UP) {
|
||||
defocusIfNeeded(true /* animate */);
|
||||
}
|
||||
return super.dispatchKeyEvent(event);
|
||||
return super.onKeyPreIme(keyCode, event);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user