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

Commit 112fe310 authored by Saho Kobayashi's avatar Saho Kobayashi Committed by Android (Google) Code Review
Browse files

Merge "Fix focus transition when the direction is backward."

parents 2f51e804 a891919a
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -492,6 +492,13 @@ public class SearchView extends LinearLayout implements CollapsibleActionView {
        if (!isFocusable()) return false;
        // If it is not iconified, then give the focus to the text field
        if (!isIconified()) {
            if (direction == FOCUS_BACKWARD) {
                final View found = focusSearch(FOCUS_BACKWARD);
                if (found != null) {
                    return found.requestFocus(FOCUS_BACKWARD, previouslyFocusedRect);
                }
                return false;
            }
            boolean result = mSearchSrcTextView.requestFocus(direction, previouslyFocusedRect);
            if (result) {
                updateViewsVisibility(false);