diff options
| author | Evan Rosky <erosky@google.com> | 2017-04-19 18:08:23 +0000 |
|---|---|---|
| committer | Android (Google) Code Review <android-gerrit@google.com> | 2017-04-19 18:08:29 +0000 |
| commit | f4c31bf67b60e24dfd56249bbcfdc640f2d842ce (patch) | |
| tree | 3bdb2bfe412b79dec7cabb79b3139585ab4742e5 /core/java/android | |
| parent | e262cc234b264656946fc340d26aa03709b4c929 (diff) | |
| parent | 5b860719a30862a457f8c8aa9222272a3b43a433 (diff) | |
Merge "Handle edge-case where no focusables exist" into oc-dev
Diffstat (limited to 'core/java/android')
| -rw-r--r-- | core/java/android/view/ViewRootImpl.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/core/java/android/view/ViewRootImpl.java b/core/java/android/view/ViewRootImpl.java index 080ffeb011f8..9ecced61c917 100644 --- a/core/java/android/view/ViewRootImpl.java +++ b/core/java/android/view/ViewRootImpl.java @@ -4675,7 +4675,8 @@ public final class ViewRootImpl implements ViewParent, if (focused == null && mView.restoreDefaultFocus()) { return true; } - View cluster = focused.keyboardNavigationClusterSearch(null, direction); + View cluster = focused == null ? keyboardNavigationClusterSearch(null, direction) + : focused.keyboardNavigationClusterSearch(null, direction); // Since requestFocus only takes "real" focus directions (and therefore also // restoreFocusInCluster), convert forward/backward focus into FOCUS_DOWN. |
