Minor twaek to the focus behavior.

bug:6296603

Change-Id: I3bd0b291e6013cae019ca9049d9d3dc506845ab0
This commit is contained in:
Svetoslav Ganov
2012-04-05 17:08:46 -07:00
parent b39e509f43
commit 5012ebbc5c

View File

@@ -4059,14 +4059,7 @@ public class View implements Drawable.Callback, Drawable.Callback2, KeyEvent.Cal
void ensureInputFocusOnFirstFocusable() {
View root = getRootView();
if (root != null) {
// Find the first focusble from the top.
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);
}
root.requestFocus(FOCUS_FORWARD);
}
}