diff options
| author | Alan Viverette <alanv@google.com> | 2014-12-12 14:13:24 -0800 |
|---|---|---|
| committer | Alan Viverette <alanv@google.com> | 2014-12-12 14:13:24 -0800 |
| commit | cd305ae3ceef14dd5de807d75aa6167dfcd69c86 (patch) | |
| tree | 92235c6c044ca4895b0e1d534fa75d3d860e1be3 /core/java/android/widget/TextView.java | |
| parent | 4357d4eabc375c392190cf2d1dfc3aeba9718ceb (diff) | |
Give accessibility delegate the first pass at handling ACTION_CLICK
Delegation is broken for widgets, but this fixes the most egregious issue
where TextViews that are top-level list items weren't handling CLICK
actions correctly. This will still need work, since now the focus action
won't run, but it's an improvement.
BUG: 18736135
Change-Id: I808ef628198946cc87f13c53d6245cd162a1e517
Diffstat (limited to 'core/java/android/widget/TextView.java')
| -rw-r--r-- | core/java/android/widget/TextView.java | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/core/java/android/widget/TextView.java b/core/java/android/widget/TextView.java index 34b3a7290d0b..765d196509c5 100644 --- a/core/java/android/widget/TextView.java +++ b/core/java/android/widget/TextView.java @@ -8475,8 +8475,14 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener } } + /** + * Performs an accessibility action after it has been offered to the + * delegate. + * + * @hide + */ @Override - public boolean performAccessibilityAction(int action, Bundle arguments) { + public boolean performAccessibilityActionInternal(int action, Bundle arguments) { switch (action) { case AccessibilityNodeInfo.ACTION_CLICK: { boolean handled = false; @@ -8557,10 +8563,10 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener case AccessibilityNodeInfo.ACTION_NEXT_AT_MOVEMENT_GRANULARITY: case AccessibilityNodeInfo.ACTION_PREVIOUS_AT_MOVEMENT_GRANULARITY: { ensureIterableTextForAccessibilitySelectable(); - return super.performAccessibilityAction(action, arguments); + return super.performAccessibilityActionInternal(action, arguments); } default: { - return super.performAccessibilityAction(action, arguments); + return super.performAccessibilityActionInternal(action, arguments); } } } |
