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

Commit e852f143 authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Prevent TextView refocus on escape key press" into main

parents 7d1086c3 47824b93
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -8496,8 +8496,9 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
     *            hierarchy
     * @param refocus when propagate is true, specifies whether to request the
     *            root view place new focus
     * @hide
     */
    void clearFocusInternal(View focused, boolean propagate, boolean refocus) {
    public void clearFocusInternal(View focused, boolean propagate, boolean refocus) {
        if ((mPrivateFlags & PFLAG_FOCUSED) != 0) {
            mPrivateFlags &= ~PFLAG_FOCUSED;
            clearParentsWantFocus();
+1 −1
Original line number Diff line number Diff line
@@ -9733,7 +9733,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
                        return KEY_EVENT_HANDLED;
                    }
                    if (hasFocus()) {
                        clearFocus();
                        clearFocusInternal(null, /* propagate */ true, /* refocus */ false);
                        InputMethodManager imm = getInputMethodManager();
                        if (imm != null) {
                            imm.hideSoftInputFromView(this, 0);