diff options
| author | Mady Mellor <madym@google.com> | 2015-06-08 15:11:31 +0000 |
|---|---|---|
| committer | Android (Google) Code Review <android-gerrit@google.com> | 2015-06-08 15:11:32 +0000 |
| commit | e1f3214e72b63ed7cbe368005622055f80da0e0d (patch) | |
| tree | d592f584415a17f96af296d5ab59df494d2779b7 /core/java/android | |
| parent | a54a8626ed77c5641adfb3dbcfdc9bf463478101 (diff) | |
| parent | e860891b1a7d4c1b581f294fa5831999caac6506 (diff) | |
Merge "Change stylus button press to context click in View - API review feedback" into mnc-dev
Diffstat (limited to 'core/java/android')
| -rw-r--r-- | core/java/android/app/AssistStructure.java | 12 | ||||
| -rw-r--r-- | core/java/android/view/HapticFeedbackConstants.java | 4 | ||||
| -rw-r--r-- | core/java/android/view/View.java | 150 | ||||
| -rw-r--r-- | core/java/android/view/ViewStructure.java | 6 | ||||
| -rw-r--r-- | core/java/android/view/accessibility/AccessibilityEvent.java | 10 | ||||
| -rw-r--r-- | core/java/android/view/accessibility/AccessibilityNodeInfo.java | 28 |
6 files changed, 104 insertions, 106 deletions
diff --git a/core/java/android/app/AssistStructure.java b/core/java/android/app/AssistStructure.java index ef7fde4d9946..0f698172d10b 100644 --- a/core/java/android/app/AssistStructure.java +++ b/core/java/android/app/AssistStructure.java @@ -235,7 +235,7 @@ public class AssistStructure { static final int FLAGS_CHECKED = 0x00000200; static final int FLAGS_CLICKABLE = 0x00004000; static final int FLAGS_LONG_CLICKABLE = 0x00200000; - static final int FLAGS_STYLUS_BUTTON_PRESSABLE = 0x00400000; + static final int FLAGS_CONTEXT_CLICKABLE = 0x00400000; int mFlags; @@ -413,8 +413,8 @@ public class AssistStructure { return (mFlags&ViewNode.FLAGS_LONG_CLICKABLE) != 0; } - public boolean isStylusButtonPressable() { - return (mFlags&ViewNode.FLAGS_STYLUS_BUTTON_PRESSABLE) != 0; + public boolean isContextClickable() { + return (mFlags&ViewNode.FLAGS_CONTEXT_CLICKABLE) != 0; } public String getClassName() { @@ -529,9 +529,9 @@ public class AssistStructure { } @Override - public void setStylusButtonPressable(boolean state) { - mNode.mFlags = (mNode.mFlags&~ViewNode.FLAGS_STYLUS_BUTTON_PRESSABLE) - | (state ? ViewNode.FLAGS_STYLUS_BUTTON_PRESSABLE : 0); + public void setContextClickable(boolean state) { + mNode.mFlags = (mNode.mFlags&~ViewNode.FLAGS_CONTEXT_CLICKABLE) + | (state ? ViewNode.FLAGS_CONTEXT_CLICKABLE : 0); } @Override diff --git a/core/java/android/view/HapticFeedbackConstants.java b/core/java/android/view/HapticFeedbackConstants.java index 6651b8377647..2f87d2e815cb 100644 --- a/core/java/android/view/HapticFeedbackConstants.java +++ b/core/java/android/view/HapticFeedbackConstants.java @@ -52,9 +52,9 @@ public class HapticFeedbackConstants { public static final int CALENDAR_DATE = 5; /** - * The user has touched the screen with a stylus and pressed the stylus button. + * The user has performed a context click on an object. */ - public static final int STYLUS_BUTTON_PRESS = 6; + public static final int CONTEXT_CLICK = 6; /** * This is a private constant. Feel free to renumber as desired. diff --git a/core/java/android/view/View.java b/core/java/android/view/View.java index b038581ec9f9..342315bde55e 100644 --- a/core/java/android/view/View.java +++ b/core/java/android/view/View.java @@ -990,13 +990,13 @@ public class View implements Drawable.Callback, KeyEvent.Callback, /** * <p> - * Indicates this view can be stylus button pressed. When stylus button - * pressable, a View reacts to stylus button presses by notifiying - * the OnStylusButtonPressListener. + * Indicates this view can be context clicked. When context clickable, a View reacts to a + * context click (e.g. a primary stylus button press or right mouse click) by notifying the + * OnContextClickListener. * </p> * {@hide} */ - static final int STYLUS_BUTTON_PRESSABLE = 0x00800000; + static final int CONTEXT_CLICKABLE = 0x00800000; /** @hide */ @@ -3418,11 +3418,11 @@ public class View implements Drawable.Callback, KeyEvent.Callback, protected OnLongClickListener mOnLongClickListener; /** - * Listener used to dispatch stylus touch and button press events. This field should be made - * private, so it is hidden from the SDK. + * Listener used to dispatch context click events. This field should be made private, so it + * is hidden from the SDK. * {@hide} */ - protected OnStylusButtonPressListener mOnStylusButtonPressListener; + protected OnContextClickListener mOnContextClickListener; /** * Listener used to build the context menu. @@ -3515,11 +3515,11 @@ public class View implements Drawable.Callback, KeyEvent.Callback, private boolean mHasPerformedLongPress; /** - * Whether the stylus button is currently pressed down. This is true when - * the stylus is touching the screen and the button has been pressed, this - * is false once the stylus has been lifted. + * Whether a context click button is currently pressed down. This is true when the stylus is + * touching the screen and the primary button has been pressed, or if a mouse's right button is + * pressed. This is false once the button is released or if the stylus has been lifted. */ - private boolean mInStylusButtonPress; + private boolean mInContextButtonPress; /** * Whether the next up event should be ignored for the purposes of gesture recognition. This is @@ -4045,10 +4045,10 @@ public class View implements Drawable.Callback, KeyEvent.Callback, viewFlagMasks |= LONG_CLICKABLE; } break; - case com.android.internal.R.styleable.View_stylusButtonPressable: + case com.android.internal.R.styleable.View_contextClickable: if (a.getBoolean(attr, false)) { - viewFlagValues |= STYLUS_BUTTON_PRESSABLE; - viewFlagMasks |= STYLUS_BUTTON_PRESSABLE; + viewFlagValues |= CONTEXT_CLICKABLE; + viewFlagMasks |= CONTEXT_CLICKABLE; } break; case com.android.internal.R.styleable.View_saveEnabled: @@ -4537,7 +4537,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback, out.append((mViewFlags&SCROLLBARS_VERTICAL) != 0 ? 'V' : '.'); out.append((mViewFlags&CLICKABLE) != 0 ? 'C' : '.'); out.append((mViewFlags&LONG_CLICKABLE) != 0 ? 'L' : '.'); - out.append((mViewFlags & STYLUS_BUTTON_PRESSABLE) != 0 ? 'S' : '.'); + out.append((mViewFlags&CONTEXT_CLICKABLE) != 0 ? 'X' : '.'); out.append(' '); out.append((mPrivateFlags&PFLAG_IS_ROOT_NAMESPACE) != 0 ? 'R' : '.'); out.append((mPrivateFlags&PFLAG_FOCUSED) != 0 ? 'F' : '.'); @@ -5125,17 +5125,17 @@ public class View implements Drawable.Callback, KeyEvent.Callback, } /** - * Register a callback to be invoked when this view is touched with a stylus and the button is - * pressed. + * Register a callback to be invoked when this view is context clicked. If the view is not + * context clickable, it becomes context clickable. * * @param l The callback that will run - * @see #setStylusButtonPressable(boolean) + * @see #setContextClickable(boolean) */ - public void setOnStylusButtonPressListener(@Nullable OnStylusButtonPressListener l) { - if (!isStylusButtonPressable()) { - setStylusButtonPressable(true); + public void setOnContextClickListener(@Nullable OnContextClickListener l) { + if (!isContextClickable()) { + setContextClickable(true); } - getListenerInfo().mOnStylusButtonPressListener = l; + getListenerInfo().mOnContextClickListener = l; } /** @@ -5216,21 +5216,21 @@ public class View implements Drawable.Callback, KeyEvent.Callback, } /** - * Call this view's OnStylusButtonPressListener, if it is defined. + * Call this view's OnContextClickListener, if it is defined. * - * @return True if there was an assigned OnStylusButtonPressListener that consumed the event, - * false otherwise. + * @return True if there was an assigned OnContextClickListener that consumed the event, false + * otherwise. */ - public boolean performStylusButtonPress() { - sendAccessibilityEvent(AccessibilityEvent.TYPE_VIEW_STYLUS_BUTTON_PRESSED); + public boolean performContextClick() { + sendAccessibilityEvent(AccessibilityEvent.TYPE_VIEW_CONTEXT_CLICKED); boolean handled = false; ListenerInfo li = mListenerInfo; - if (li != null && li.mOnStylusButtonPressListener != null) { - handled = li.mOnStylusButtonPressListener.onStylusButtonPress(View.this); + if (li != null && li.mOnContextClickListener != null) { + handled = li.mOnContextClickListener.onContextClick(View.this); } if (handled) { - performHapticFeedback(HapticFeedbackConstants.STYLUS_BUTTON_PRESS); + performHapticFeedback(HapticFeedbackConstants.CONTEXT_CLICK); } return handled; } @@ -6025,7 +6025,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback, * <li>{@link AccessibilityNodeInfo#setFocused(boolean)},</li> * <li>{@link AccessibilityNodeInfo#setLongClickable(boolean)},</li> * <li>{@link AccessibilityNodeInfo#setSelected(boolean)},</li> - * <li>{@link AccessibilityNodeInfo#setStylusButtonPressable(boolean)}</li> + * <li>{@link AccessibilityNodeInfo#setContextClickable(boolean)}</li> * </ul> * <p> * Subclasses should override this method, call the super implementation, @@ -6177,8 +6177,8 @@ public class View implements Drawable.Callback, KeyEvent.Callback, structure.setChecked(true); } } - if (isStylusButtonPressable()) { - structure.setStylusButtonPressable(true); + if (isContextClickable()) { + structure.setContextClickable(true); } structure.setClassName(getAccessibilityClassName().toString()); structure.setContentDescription(getContentDescription()); @@ -6247,8 +6247,8 @@ public class View implements Drawable.Callback, KeyEvent.Callback, structure.setChecked(true); } } - if (info.isStylusButtonPressable()) { - structure.setStylusButtonPressable(true); + if (info.isContextClickable()) { + structure.setContextClickable(true); } CharSequence cname = info.getClassName(); structure.setClassName(cname != null ? cname.toString() : null); @@ -6379,7 +6379,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback, info.setAccessibilityFocused(isAccessibilityFocused()); info.setSelected(isSelected()); info.setLongClickable(isLongClickable()); - info.setStylusButtonPressable(isStylusButtonPressable()); + info.setContextClickable(isContextClickable()); info.setLiveRegion(getAccessibilityLiveRegion()); // TODO: These make sense only if we are in an AdapterView but all @@ -6410,8 +6410,8 @@ public class View implements Drawable.Callback, KeyEvent.Callback, info.addAction(AccessibilityNodeInfo.ACTION_LONG_CLICK); } - if (isStylusButtonPressable() && isEnabled()) { - info.addAction(AccessibilityAction.ACTION_STYLUS_BUTTON_PRESS); + if (isContextClickable() && isEnabled()) { + info.addAction(AccessibilityAction.ACTION_CONTEXT_CLICK); } CharSequence text = getIterableTextForAccessibility(); @@ -7801,28 +7801,25 @@ public class View implements Drawable.Callback, KeyEvent.Callback, } /** - * Indicates whether this view reacts to stylus button press events or not. + * Indicates whether this view reacts to context clicks or not. * - * @return true if the view is stylus button pressable, false otherwise - * @see #setStylusButtonPressable(boolean) - * @attr ref android.R.styleable#View_stylusButtonPressable + * @return true if the view is context clickable, false otherwise + * @see #setContextClickable(boolean) + * @attr ref android.R.styleable#View_contextClickable */ - public boolean isStylusButtonPressable() { - return (mViewFlags & STYLUS_BUTTON_PRESSABLE) == STYLUS_BUTTON_PRESSABLE; + public boolean isContextClickable() { + return (mViewFlags & CONTEXT_CLICKABLE) == CONTEXT_CLICKABLE; } /** - * Enables or disables stylus button press events for this view. When a view is stylus button - * pressable it reacts to the user touching the screen with a stylus and pressing the first - * stylus button. This event can launch the listener. + * Enables or disables context clicking for this view. This event can launch the listener. * - * @param stylusButtonPressable true to make the view react to a stylus button press, false - * otherwise - * @see #isStylusButtonPressable() - * @attr ref android.R.styleable#View_stylusButtonPressable + * @param contextClickable true to make the view react to a context click, false otherwise + * @see #isContextClickable() + * @attr ref android.R.styleable#View_contextClickable */ - public void setStylusButtonPressable(boolean stylusButtonPressable) { - setFlags(stylusButtonPressable ? STYLUS_BUTTON_PRESSABLE : 0, STYLUS_BUTTON_PRESSABLE); + public void setContextClickable(boolean contextClickable) { + setFlags(contextClickable ? CONTEXT_CLICKABLE : 0, CONTEXT_CLICKABLE); } /** @@ -8243,7 +8240,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback, final int viewFlags = mViewFlags; if (((viewFlags & CLICKABLE) == CLICKABLE || (viewFlags & LONG_CLICKABLE) == LONG_CLICKABLE - || (viewFlags & STYLUS_BUTTON_PRESSABLE) == STYLUS_BUTTON_PRESSABLE) + || (viewFlags & CONTEXT_CLICKABLE) == CONTEXT_CLICKABLE) && (viewFlags & ENABLED_MASK) == ENABLED) { views.add(this); } @@ -8976,9 +8973,9 @@ public class View implements Drawable.Callback, KeyEvent.Callback, return requestRectangleOnScreen(r, true); } } break; - case R.id.accessibilityActionStylusButtonPress: { - if (isStylusButtonPressable()) { - performStylusButtonPress(); + case R.id.accessibilityActionContextClick: { + if (isContextClickable()) { + performContextClick(); return true; } } break; @@ -9383,12 +9380,14 @@ public class View implements Drawable.Callback, KeyEvent.Callback, return true; } + final int actionButton = event.getActionButton(); switch (event.getActionMasked()) { case MotionEvent.ACTION_BUTTON_PRESS: - if (isStylusButtonPressable() && !mInStylusButtonPress && !mHasPerformedLongPress - && event.getActionButton() == MotionEvent.BUTTON_STYLUS_PRIMARY) { - if (performStylusButtonPress()) { - mInStylusButtonPress = true; + if (isContextClickable() && !mInContextButtonPress && !mHasPerformedLongPress + && (actionButton == MotionEvent.BUTTON_STYLUS_PRIMARY + || actionButton == MotionEvent.BUTTON_SECONDARY)) { + if (performContextClick()) { + mInContextButtonPress = true; setPressed(true, event.getX(), event.getY()); removeTapCallback(); removeLongPressCallback(); @@ -9398,9 +9397,9 @@ public class View implements Drawable.Callback, KeyEvent.Callback, break; case MotionEvent.ACTION_BUTTON_RELEASE: - if (mInStylusButtonPress - && event.getActionButton() == MotionEvent.BUTTON_STYLUS_PRIMARY) { - mInStylusButtonPress = false; + if (mInContextButtonPress && (actionButton == MotionEvent.BUTTON_STYLUS_PRIMARY + || actionButton == MotionEvent.BUTTON_SECONDARY)) { + mInContextButtonPress = false; mIgnoreNextUpEvent = true; } break; @@ -10159,7 +10158,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback, return (viewFlags & CLICKABLE) == CLICKABLE || (viewFlags & LONG_CLICKABLE) == LONG_CLICKABLE - || (viewFlags & STYLUS_BUTTON_PRESSABLE) == STYLUS_BUTTON_PRESSABLE; + || (viewFlags & CONTEXT_CLICKABLE) == CONTEXT_CLICKABLE; } /** @@ -10252,7 +10251,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback, // events, it just doesn't respond to them. return (((viewFlags & CLICKABLE) == CLICKABLE || (viewFlags & LONG_CLICKABLE) == LONG_CLICKABLE) - || (viewFlags & STYLUS_BUTTON_PRESSABLE) == STYLUS_BUTTON_PRESSABLE); + || (viewFlags & CONTEXT_CLICKABLE) == CONTEXT_CLICKABLE); } if (mTouchDelegate != null) { @@ -10263,7 +10262,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback, if (((viewFlags & CLICKABLE) == CLICKABLE || (viewFlags & LONG_CLICKABLE) == LONG_CLICKABLE) || - (viewFlags & STYLUS_BUTTON_PRESSABLE) == STYLUS_BUTTON_PRESSABLE) { + (viewFlags & CONTEXT_CLICKABLE) == CONTEXT_CLICKABLE) { switch (action) { case MotionEvent.ACTION_UP: boolean prepressed = (mPrivateFlags & PFLAG_PREPRESSED) != 0; @@ -10349,7 +10348,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback, setPressed(false); removeTapCallback(); removeLongPressCallback(); - mInStylusButtonPress = false; + mInContextButtonPress = false; mHasPerformedLongPress = false; mIgnoreNextUpEvent = false; break; @@ -10657,7 +10656,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback, if (accessibilityEnabled) { if ((changed & FOCUSABLE_MASK) != 0 || (changed & VISIBILITY_MASK) != 0 || (changed & CLICKABLE) != 0 || (changed & LONG_CLICKABLE) != 0 - || (changed & STYLUS_BUTTON_PRESSABLE) != 0) { + || (changed & CONTEXT_CLICKABLE) != 0) { if (oldIncludeForAccessibility != includeForAccessibility()) { notifySubtreeAccessibilityStateChangedIfNeeded(); } else { @@ -21316,17 +21315,16 @@ public class View implements Drawable.Callback, KeyEvent.Callback, } /** - * Interface definition for a callback to be invoked when a view is touched with a stylus while - * the stylus button is pressed. + * Interface definition for a callback to be invoked when a view is context clicked. */ - public interface OnStylusButtonPressListener { + public interface OnContextClickListener { /** - * Called when a view is touched with a stylus while the stylus button is pressed. + * Called when a view is context clicked. * - * @param v The view that was touched. - * @return true if the callback consumed the stylus button press, false otherwise. + * @param v The view that has been context clicked. + * @return true if the callback consumed the context click, false otherwise. */ - boolean onStylusButtonPress(View v); + boolean onContextClick(View v); } /** diff --git a/core/java/android/view/ViewStructure.java b/core/java/android/view/ViewStructure.java index e525474bae6c..8ceb166a92d6 100644 --- a/core/java/android/view/ViewStructure.java +++ b/core/java/android/view/ViewStructure.java @@ -75,10 +75,10 @@ public abstract class ViewStructure { public abstract void setLongClickable(boolean state); /** - * Set the stylus button pressable state of this view, as per - * {@link View#isStylusButtonPressable View.isStylusButtonPressable()}. + * Set the context clickable state of this view, as per + * {@link View#isContextClickable View.isContextClickable()}. */ - public abstract void setStylusButtonPressable(boolean state); + public abstract void setContextClickable(boolean state); /** * Set the focusable state of this view, as per {@link View#isFocusable View.isFocusable()}. diff --git a/core/java/android/view/accessibility/AccessibilityEvent.java b/core/java/android/view/accessibility/AccessibilityEvent.java index b0dbecaec67e..ab793e038675 100644 --- a/core/java/android/view/accessibility/AccessibilityEvent.java +++ b/core/java/android/view/accessibility/AccessibilityEvent.java @@ -684,9 +684,9 @@ public final class AccessibilityEvent extends AccessibilityRecord implements Par public static final int TYPE_WINDOWS_CHANGED = 0x00400000; /** - * Represents the event of a stylus button press on a {@link android.view.View}. + * Represents the event of a context click on a {@link android.view.View}. */ - public static final int TYPE_VIEW_STYLUS_BUTTON_PRESSED = 0x00800000; + public static final int TYPE_VIEW_CONTEXT_CLICKED = 0x00800000; /** * Change type for {@link #TYPE_WINDOW_CONTENT_CHANGED} event: @@ -736,7 +736,7 @@ public final class AccessibilityEvent extends AccessibilityRecord implements Par * @see #TYPE_TOUCH_INTERACTION_START * @see #TYPE_TOUCH_INTERACTION_END * @see #TYPE_WINDOWS_CHANGED - * @see #TYPE_VIEW_STYLUS_BUTTON_PRESSED + * @see #TYPE_VIEW_CONTEXT_CLICKED */ public static final int TYPES_ALL_MASK = 0xFFFFFFFF; @@ -1402,11 +1402,11 @@ public final class AccessibilityEvent extends AccessibilityRecord implements Par builder.append("TYPE_WINDOWS_CHANGED"); eventTypeCount++; } break; - case TYPE_VIEW_STYLUS_BUTTON_PRESSED: { + case TYPE_VIEW_CONTEXT_CLICKED: { if (eventTypeCount > 0) { builder.append(", "); } - builder.append("TYPE_VIEW_STYLUS_BUTTON_PRESSED"); + builder.append("TYPE_VIEW_CONTEXT_CLICKED"); eventTypeCount++; } break; diff --git a/core/java/android/view/accessibility/AccessibilityNodeInfo.java b/core/java/android/view/accessibility/AccessibilityNodeInfo.java index b454d1c0e68a..36de8f3689bf 100644 --- a/core/java/android/view/accessibility/AccessibilityNodeInfo.java +++ b/core/java/android/view/accessibility/AccessibilityNodeInfo.java @@ -520,7 +520,7 @@ public class AccessibilityNodeInfo implements Parcelable { private static final int BOOLEAN_PROPERTY_CONTENT_INVALID = 0x00010000; - private static final int BOOLEAN_PROPERTY_STYLUS_BUTTON_PRESSABLE = 0x00020000; + private static final int BOOLEAN_PROPERTY_CONTEXT_CLICKABLE = 0x00020000; /** * Bits that provide the id of a virtual descendant of a view. @@ -1945,27 +1945,27 @@ public class AccessibilityNodeInfo implements Parcelable { } /** - * Gets whether this node is stylus button pressable. + * Gets whether this node is context clickable. * - * @return True if the node is stylus button pressable. + * @return True if the node is context clickable. */ - public boolean isStylusButtonPressable() { - return getBooleanProperty(BOOLEAN_PROPERTY_STYLUS_BUTTON_PRESSABLE); + public boolean isContextClickable() { + return getBooleanProperty(BOOLEAN_PROPERTY_CONTEXT_CLICKABLE); } /** - * Sets whether this node is stylus button pressable. + * Sets whether this node is context clickable. * <p> * <strong>Note:</strong> Cannot be called from an * {@link android.accessibilityservice.AccessibilityService}. This class is made immutable * before being delivered to an AccessibilityService. * </p> * - * @param stylusButtonPressable True if the node is stylus button pressable. + * @param contextClickable True if the node is context clickable. * @throws IllegalStateException If called from an AccessibilityService. */ - public void setStylusButtonPressable(boolean stylusButtonPressable) { - setBooleanProperty(BOOLEAN_PROPERTY_STYLUS_BUTTON_PRESSABLE, stylusButtonPressable); + public void setContextClickable(boolean contextClickable) { + setBooleanProperty(BOOLEAN_PROPERTY_CONTEXT_CLICKABLE, contextClickable); } /** @@ -3156,7 +3156,7 @@ public class AccessibilityNodeInfo implements Parcelable { builder.append("; selected: ").append(isSelected()); builder.append("; clickable: ").append(isClickable()); builder.append("; longClickable: ").append(isLongClickable()); - builder.append("; stylusButtonPressable: ").append(isStylusButtonPressable()); + builder.append("; contextClickable: ").append(isContextClickable()); builder.append("; enabled: ").append(isEnabled()); builder.append("; password: ").append(isPassword()); builder.append("; scrollable: ").append(isScrollable()); @@ -3537,10 +3537,10 @@ public class AccessibilityNodeInfo implements Parcelable { new AccessibilityAction(R.id.accessibilityActionScrollRight, null); /** - * Action that stylus button presses the node. + * Action that context clicks the node. */ - public static final AccessibilityAction ACTION_STYLUS_BUTTON_PRESS = - new AccessibilityAction(R.id.accessibilityActionStylusButtonPress, null); + public static final AccessibilityAction ACTION_CONTEXT_CLICK = + new AccessibilityAction(R.id.accessibilityActionContextClick, null); private static final ArraySet<AccessibilityAction> sStandardActions = new ArraySet<>(); static { @@ -3572,7 +3572,7 @@ public class AccessibilityNodeInfo implements Parcelable { sStandardActions.add(ACTION_SCROLL_LEFT); sStandardActions.add(ACTION_SCROLL_DOWN); sStandardActions.add(ACTION_SCROLL_RIGHT); - sStandardActions.add(ACTION_STYLUS_BUTTON_PRESS); + sStandardActions.add(ACTION_CONTEXT_CLICK); } private final int mActionId; |
