Workaround for a bug in LG devices
This commit is contained in:
parent
f4078cce33
commit
4711fa696a
@ -716,10 +716,25 @@ public class BrowserActivity extends ThemableActivity implements BrowserControll
|
||||
if (mSearch.hasFocus()) {
|
||||
searchTheWeb(mSearch.getText().toString());
|
||||
}
|
||||
} else if ((keyCode == KeyEvent.KEYCODE_MENU) && (Build.VERSION.SDK_INT <= 16)
|
||||
&& (Build.MANUFACTURER.compareTo("LGE") == 0)) {
|
||||
// Workaround for stupid LG devices that crash
|
||||
return true;
|
||||
}
|
||||
return super.onKeyDown(keyCode, event);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onKeyUp(int keyCode, KeyEvent event) {
|
||||
if ((keyCode == KeyEvent.KEYCODE_MENU) && (Build.VERSION.SDK_INT <= 16)
|
||||
&& (Build.MANUFACTURER.compareTo("LGE") == 0)) {
|
||||
// Workaround for stupid LG devices that crash
|
||||
openOptionsMenu();
|
||||
return true;
|
||||
}
|
||||
return super.onKeyUp(keyCode, event);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onCreateOptionsMenu(Menu menu) {
|
||||
return super.onCreateOptionsMenu(menu);
|
||||
|
Loading…
x
Reference in New Issue
Block a user