mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 729429 - The system search key should not dismiss the awesomescreen [r=mbrubeck]
This commit is contained in:
parent
2cf7559644
commit
23400d4805
@ -367,7 +367,6 @@ public class AwesomeBar extends GeckoActivity implements GeckoEventListener {
|
||||
// by any of the views, which usually means the edit box lost focus
|
||||
if (keyCode == KeyEvent.KEYCODE_BACK ||
|
||||
keyCode == KeyEvent.KEYCODE_MENU ||
|
||||
keyCode == KeyEvent.KEYCODE_SEARCH ||
|
||||
keyCode == KeyEvent.KEYCODE_DPAD_UP ||
|
||||
keyCode == KeyEvent.KEYCODE_DPAD_DOWN ||
|
||||
keyCode == KeyEvent.KEYCODE_DPAD_LEFT ||
|
||||
@ -377,6 +376,12 @@ public class AwesomeBar extends GeckoActivity implements GeckoEventListener {
|
||||
keyCode == KeyEvent.KEYCODE_VOLUME_UP ||
|
||||
keyCode == KeyEvent.KEYCODE_VOLUME_DOWN) {
|
||||
return super.onKeyDown(keyCode, event);
|
||||
} else if (keyCode == KeyEvent.KEYCODE_SEARCH ){
|
||||
mText.setText("");
|
||||
mText.requestFocus();
|
||||
InputMethodManager imm = (InputMethodManager) mText.getContext().getSystemService(Context.INPUT_METHOD_SERVICE);
|
||||
imm.showSoftInput(mText, InputMethodManager.SHOW_IMPLICIT);
|
||||
return true;
|
||||
} else {
|
||||
int selStart = -1;
|
||||
int selEnd = -1;
|
||||
|
Loading…
Reference in New Issue
Block a user