diff options
| author | Svet Ganov <svetoslavganov@google.com> | 2015-02-06 21:46:24 +0000 |
|---|---|---|
| committer | Android (Google) Code Review <android-gerrit@google.com> | 2015-02-06 21:46:25 +0000 |
| commit | 060bca7444b8bf34fa95a6a71daf72fa8a85d78e (patch) | |
| tree | a720c099402174097fa6bfadc8ecde9517f408c0 /core/java/android/view/View.java | |
| parent | f789d45b24acc3745ccc97adb687502d488404f6 (diff) | |
| parent | 0a2cceebd5503329f7038847906351af21434048 (diff) | |
Merge "Accessibility: Handle a missed case when clicking focused views." into lmp-mr1-dev
Diffstat (limited to 'core/java/android/view/View.java')
| -rw-r--r-- | core/java/android/view/View.java | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/core/java/android/view/View.java b/core/java/android/view/View.java index e4a8978e3fef..3c058729880a 100644 --- a/core/java/android/view/View.java +++ b/core/java/android/view/View.java @@ -8440,8 +8440,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback, // If the event should be handled by accessibility focus first. if (event.isTargetAccessibilityFocus()) { // We don't have focus or no virtual descendant has it, do not handle the event. - if (!isAccessibilityFocused() && !(getViewRootImpl() != null && getViewRootImpl() - .getAccessibilityFocusedHost() == this)) { + if (!isAccessibilityFocusedViewOrHost()) { return false; } // We have focus and got the event, then use normal event dispatch. @@ -8490,6 +8489,11 @@ public class View implements Drawable.Callback, KeyEvent.Callback, return result; } + boolean isAccessibilityFocusedViewOrHost() { + return isAccessibilityFocused() || (getViewRootImpl() != null && getViewRootImpl() + .getAccessibilityFocusedHost() == this); + } + /** * Filter the touch event to apply security policies. * |
