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

Commit f8332450 authored by Craig Mautner's avatar Craig Mautner
Browse files

Focus security fields before widgets.

Focus normally proceeds top down through the view tree. Change the
order of focus so that the security fields have a chance to receive
focus before the widget fields.

Fixes bug 11203748.

Change-Id: Ie7f16e59652edbe64fa8342197fda81b53976360
parent 0a1988b6
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -1003,6 +1003,16 @@ public class SlidingChallengeLayout extends ViewGroup implements ChallengeLayout
        }
    }

    @Override
    protected boolean onRequestFocusInDescendants(int direction, Rect previouslyFocusedRect) {
        // Focus security fileds before widgets.
        if (mChallengeView != null &&
                mChallengeView.requestFocus(direction, previouslyFocusedRect)) {
            return true;
        }
        return super.onRequestFocusInDescendants(direction, previouslyFocusedRect);
    }

    public void computeScroll() {
        super.computeScroll();