From f83324504e0d62f4cba5355459e17cdf9f1100e7 Mon Sep 17 00:00:00 2001 From: Craig Mautner Date: Mon, 4 Nov 2013 10:45:22 -0800 Subject: 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 --- .../src/com/android/keyguard/SlidingChallengeLayout.java | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'packages/Keyguard') diff --git a/packages/Keyguard/src/com/android/keyguard/SlidingChallengeLayout.java b/packages/Keyguard/src/com/android/keyguard/SlidingChallengeLayout.java index 7a9a1c8..3d515ce 100644 --- a/packages/Keyguard/src/com/android/keyguard/SlidingChallengeLayout.java +++ b/packages/Keyguard/src/com/android/keyguard/SlidingChallengeLayout.java @@ -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(); -- cgit v1.1