mirror of
https://github.com/etlegacy/etlegacy-android.git
synced 2025-04-13 12:30:57 +00:00
java: remove KEYCODE_BACK as its not needed here and use != operator here
This one propably deserves an SDL Patch Upstream
This commit is contained in:
parent
42506bfe20
commit
b908446c36
2 changed files with 2 additions and 8 deletions
|
@ -490,12 +490,6 @@ public class ETLActivity extends SDLActivity implements JoyStickListener {
|
|||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void superOnBackPressed() {
|
||||
super.superOnBackPressed();
|
||||
mLayout.requestFocus();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String[] getLibraries() {
|
||||
return new String[] {
|
||||
|
|
|
@ -2183,8 +2183,8 @@ class DummyEdit extends View implements View.OnKeyListener {
|
|||
// FIXME: A more effective solution would be to assume our Layout to be RelativeLayout or LinearLayout
|
||||
// FIXME: And determine the keyboard presence doing this: http://stackoverflow.com/questions/2150078/how-to-check-visibility-of-software-keyboard-in-android
|
||||
// FIXME: An even more effective way would be if Android provided this out of the box, but where would the fun be in that :)
|
||||
if (event.getAction()==KeyEvent.ACTION_UP && keyCode == KeyEvent.KEYCODE_BACK) {
|
||||
if (SDLActivity.mTextEdit != null && SDLActivity.mTextEdit.getVisibility() == View.VISIBLE) {
|
||||
if (event.getAction()==KeyEvent.ACTION_UP) {
|
||||
if (SDLActivity.mTextEdit != null && SDLActivity.mTextEdit.getVisibility() != View.VISIBLE) {
|
||||
SDLActivity.onNativeKeyboardFocusLost();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue