Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 24c8ebd8 authored by Hyunyoung Song's avatar Hyunyoung Song Committed by Android (Google) Code Review
Browse files

Merge "When KEYCODE_BACK is received, hide keyboard" into sc-dev

parents 50401e31 011f438c
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -70,6 +70,9 @@ public class ExtendedEditText extends EditText {
    public boolean onKeyPreIme(int keyCode, KeyEvent event) {
        // If this is a back key, propagate the key back to the listener
        if (keyCode == KeyEvent.KEYCODE_BACK && event.getAction() == KeyEvent.ACTION_UP) {
            if (TextUtils.isEmpty(getText())) {
                hideKeyboard();
            }
            if (mBackKeyListener != null) {
                return mBackKeyListener.onBackKey();
            }