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

Commit 011f438c authored by Hyunyoung Song's avatar Hyunyoung Song
Browse files

When KEYCODE_BACK is received, hide keyboard

Bug: 191845409
Bug: 190351740

Test: manual
Change-Id: I9e3a55f7eb81b2c2a668532ebb991cefbf248163
parent 23415e21
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();
            }