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

Commit 5012ebbc authored by Svetoslav Ganov's avatar Svetoslav Ganov
Browse files

Minor twaek to the focus behavior.

bug:6296603

Change-Id: I3bd0b291e6013cae019ca9049d9d3dc506845ab0
parent b39e509f
Loading
Loading
Loading
Loading
+1 −8
Original line number Original line Diff line number Diff line
@@ -4059,14 +4059,7 @@ public class View implements Drawable.Callback, Drawable.Callback2, KeyEvent.Cal
    void ensureInputFocusOnFirstFocusable() {
    void ensureInputFocusOnFirstFocusable() {
        View root = getRootView();
        View root = getRootView();
        if (root != null) {
        if (root != null) {
            // Find the first focusble from the top.
            root.requestFocus(FOCUS_FORWARD);
            View next = root.focusSearch(FOCUS_FORWARD);
            if (next != null) {
                // Giving focus to the found focusable will not
                // perform a search since we found a view that is
                // guaranteed to be able to take focus.
                next.requestFocus(FOCUS_FORWARD);
            }
        }
        }
    }
    }