diff options
Diffstat (limited to 'core/java/android/view/View.java')
| -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); |
