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

Commit 09dd116c authored by John Reck's avatar John Reck
Browse files

Fix a bug with enterTouchMode removing focus

 Bug: 6347083
 Fix an issue where enterTouchMode would remove focus from the
 view that already has focus and is focusableInTouchMode. This
 causes issues with WebView, as it updates internal state when
 losing and gaining focus.

Change-Id: I5c1f72cc08baf3445e2be9e0496606a53fb9929e
parent a0e9d0f6
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -2977,7 +2977,10 @@ public final class ViewRootImpl implements ViewParent,
                // be when the window is first being added, and mFocused isn't
                // set yet.
                final View focused = mView.findFocus();
                if (focused != null && !focused.isFocusableInTouchMode()) {
                if (focused != null) {
                    if (focused.isFocusableInTouchMode()) {
                        return true;
                    }
                    final ViewGroup ancestorToTakeFocus =
                            findAncestorToTakeFocusInTouchMode(focused);
                    if (ancestorToTakeFocus != null) {