diff options
author | Svetoslav Ganov <svetoslavganov@google.com> | 2012-10-09 16:25:54 -0700 |
---|---|---|
committer | Svetoslav Ganov <svetoslavganov@google.com> | 2012-10-09 16:32:50 -0700 |
commit | 96985fccdcff69c8410caee23aa088cbd8af34b6 (patch) | |
tree | 2d3109bb2cddb269756da90efc55794252116b64 /core | |
parent | 3b9e7f32380e179aa1e0718762e86ffa24cbab93 (diff) | |
download | frameworks_base-96985fccdcff69c8410caee23aa088cbd8af34b6.zip frameworks_base-96985fccdcff69c8410caee23aa088cbd8af34b6.tar.gz frameworks_base-96985fccdcff69c8410caee23aa088cbd8af34b6.tar.bz2 |
Return true on successful accessiblity action click/long click.
1. If a view is clickable or long clickable perfroming the corresponding
accessiblity action should return true no matter whether there is a
registered on click/long click listener. Currently true is returned
only if there is a listener but it is also possible that a sub-class
overrides performClick and does work there. For example CompoundButton.
Now if the view is clickable or long clickable we will call the
perfrom* method and return true, which is we clicked.
2. Fixed some JavaDoc indentation.
bug:7318777
Change-Id: Id603fee378b8f7d07f1128b5641ede57640bab53
Diffstat (limited to 'core')
-rw-r--r-- | core/java/android/view/View.java | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/core/java/android/view/View.java b/core/java/android/view/View.java index ae51c1d..0d76eac 100644 --- a/core/java/android/view/View.java +++ b/core/java/android/view/View.java @@ -6858,12 +6858,12 @@ public class View implements Drawable.Callback, KeyEvent.Callback, /** * Performs the specified accessibility action on the view. For * possible accessibility actions look at {@link AccessibilityNodeInfo}. - * <p> - * If an {@link AccessibilityDelegate} has been specified via calling - * {@link #setAccessibilityDelegate(AccessibilityDelegate)} its - * {@link AccessibilityDelegate#performAccessibilityAction(View, int, Bundle)} - * is responsible for handling this call. - * </p> + * <p> + * If an {@link AccessibilityDelegate} has been specified via calling + * {@link #setAccessibilityDelegate(AccessibilityDelegate)} its + * {@link AccessibilityDelegate#performAccessibilityAction(View, int, Bundle)} + * is responsible for handling this call. + * </p> * * @param action The action to perform. * @param arguments Optional action arguments. @@ -6886,12 +6886,14 @@ public class View implements Drawable.Callback, KeyEvent.Callback, switch (action) { case AccessibilityNodeInfo.ACTION_CLICK: { if (isClickable()) { - return performClick(); + performClick(); + return true; } } break; case AccessibilityNodeInfo.ACTION_LONG_CLICK: { if (isLongClickable()) { - return performLongClick(); + performLongClick(); + return true; } } break; case AccessibilityNodeInfo.ACTION_FOCUS: { |