diff options
| author | Svetoslav Ganov <svetoslavganov@google.com> | 2012-05-16 13:26:54 -0700 |
|---|---|---|
| committer | Android (Google) Code Review <android-gerrit@google.com> | 2012-05-16 13:26:54 -0700 |
| commit | c5fb5805c92429b08ca715df37e949f31591466a (patch) | |
| tree | ba42a6db18ff62443d7e22cb5342a1b7b4198b89 /core/java/android | |
| parent | 286298896bd33e7c44bfca881b64262fcab08c9c (diff) | |
| parent | 64899e5c8ff7309e3209454fd4833d1b7a4b57be (diff) | |
Merge "Accessiblity focus not following input focus and text nav broken." into jb-dev
Diffstat (limited to 'core/java/android')
| -rw-r--r-- | core/java/android/view/View.java | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/core/java/android/view/View.java b/core/java/android/view/View.java index a4fcd41f17db..53bb3c621010 100644 --- a/core/java/android/view/View.java +++ b/core/java/android/view/View.java @@ -6159,7 +6159,8 @@ public class View implements Drawable.Callback, Drawable.Callback2, KeyEvent.Cal ViewRootImpl viewRootImpl = getViewRootImpl(); if (viewRootImpl != null) { View focusHost = viewRootImpl.getAccessibilityFocusedHost(); - if (focusHost != null && ViewRootImpl.isViewDescendantOf(focusHost, this)) { + if (focusHost != null && focusHost != this + && ViewRootImpl.isViewDescendantOf(focusHost, this)) { viewRootImpl.setAccessibilityFocusedHost(null); } } @@ -6637,7 +6638,7 @@ public class View implements Drawable.Callback, Drawable.Callback2, KeyEvent.Cal private boolean nextAtGranularity(int granularity) { CharSequence text = getIterableTextForAccessibility(); - if (text != null && text.length() > 0) { + if (text == null || text.length() == 0) { return false; } TextSegmentIterator iterator = getIteratorForGranularity(granularity); @@ -6661,7 +6662,7 @@ public class View implements Drawable.Callback, Drawable.Callback2, KeyEvent.Cal private boolean previousAtGranularity(int granularity) { CharSequence text = getIterableTextForAccessibility(); - if (text != null && text.length() > 0) { + if (text == null || text.length() == 0) { return false; } TextSegmentIterator iterator = getIteratorForGranularity(granularity); |
