424424 * </ul>
425425 * </p>
426426 * <p>
427+ * <b>Touch interaction start</b> - represents the event of starting a touch
428+ * interaction, which is the user starts touching the screen.</br>
429+ * <em>Type:</em> {@link #TYPE_TOUCH_INTERACTION_START}</br>
430+ * <em>Properties:</em></br>
431+ * <ul>
432+ * <li>{@link #getEventType()} - The type of the event.</li>
433+ * </ul>
434+ * <em>Note:</em> This event is fired only by the system and is not passed to the
435+ * view tree to be populated.</br>
436+ * </p>
437+ * <p>
438+ * <b>Touch interaction end</b> - represents the event of ending a touch
439+ * interaction, which is the user stops touching the screen.</br>
440+ * <em>Type:</em> {@link #TYPE_TOUCH_INTERACTION_END}</br>
441+ * <em>Properties:</em></br>
442+ * <ul>
443+ * <li>{@link #getEventType()} - The type of the event.</li>
444+ * </ul>
445+ * <em>Note:</em> This event is fired only by the system and is not passed to the
446+ * view tree to be populated.</br>
447+ * </p>
448+ * <p>
427449 * <b>Touch exploration gesture start</b> - represents the event of starting a touch
428450 * exploring gesture.</br>
429451 * <em>Type:</em> {@link #TYPE_TOUCH_EXPLORATION_GESTURE_START}</br>
430452 * <em>Properties:</em></br>
431453 * <ul>
432454 * <li>{@link #getEventType()} - The type of the event.</li>
433455 * </ul>
434- * <em>Note:</em> This event type is not dispatched to descendants though
435- * {@link android.view.View#dispatchPopulateAccessibilityEvent(AccessibilityEvent)
436- * View.dispatchPopulateAccessibilityEvent(AccessibilityEvent)}, hence the event
437- * source {@link android.view.View} and the sub-tree rooted at it will not receive
438- * calls to {@link android.view.View#onPopulateAccessibilityEvent(AccessibilityEvent)
439- * View.onPopulateAccessibilityEvent(AccessibilityEvent)}. The preferred way to add
440- * text content to such events is by setting the
441- * {@link android.R.styleable#View_contentDescription contentDescription} of the source
442- * view.</br>
456+ * <em>Note:</em> This event is fired only by the system and is not passed to the
457+ * view tree to be populated.</br>
443458 * </p>
444459 * <p>
445460 * <b>Touch exploration gesture end</b> - represents the event of ending a touch
449464 * <ul>
450465 * <li>{@link #getEventType()} - The type of the event.</li>
451466 * </ul>
452- * <em>Note:</em> This event type is not dispatched to descendants though
453- * {@link android.view.View#dispatchPopulateAccessibilityEvent(AccessibilityEvent)
454- * View.dispatchPopulateAccessibilityEvent(AccessibilityEvent)}, hence the event
455- * source {@link android.view.View} and the sub-tree rooted at it will not receive
456- * calls to {@link android.view.View#onPopulateAccessibilityEvent(AccessibilityEvent)
457- * View.onPopulateAccessibilityEvent(AccessibilityEvent)}. The preferred way to add
458- * text content to such events is by setting the
459- * {@link android.R.styleable#View_contentDescription contentDescription} of the source
460- * view.</br>
467+ * <em>Note:</em> This event is fired only by the system and is not passed to the
468+ * view tree to be populated.</br>
469+ * </p>
470+ * <p>
471+ * <b>Touch gesture detection start</b> - represents the event of starting a user
472+ * gesture detection.</br>
473+ * <em>Type:</em> {@link #TYPE_GESTURE_DETECTION_START}</br>
474+ * <em>Properties:</em></br>
475+ * <ul>
476+ * <li>{@link #getEventType()} - The type of the event.</li>
477+ * </ul>
478+ * <em>Note:</em> This event is fired only by the system and is not passed to the
479+ * view tree to be populated.</br>
480+ * </p>
481+ * <p>
482+ * <b>Touch gesture detection end</b> - represents the event of ending a user
483+ * gesture detection.</br>
484+ * <em>Type:</em> {@link #TYPE_GESTURE_DETECTION_END}</br>
485+ * <em>Properties:</em></br>
486+ * <ul>
487+ * <li>{@link #getEventType()} - The type of the event.</li>
488+ * </ul>
489+ * <em>Note:</em> This event is fired only by the system and is not passed to the
490+ * view tree to be populated.</br>
461491 * </p>
462492 * <p>
463493 * <b>MISCELLANEOUS TYPES</b></br>
@@ -609,6 +639,26 @@ public final class AccessibilityEvent extends AccessibilityRecord implements Par
609639 */
610640 public static final int TYPE_VIEW_TEXT_TRAVERSED_AT_MOVEMENT_GRANULARITY = 0x00020000 ;
611641
642+ /**
643+ * Represents the event of beginning gesture detection.
644+ */
645+ public static final int TYPE_GESTURE_DETECTION_START = 0x00040000 ;
646+
647+ /**
648+ * Represents the event of ending gesture detection.
649+ */
650+ public static final int TYPE_GESTURE_DETECTION_END = 0x00080000 ;
651+
652+ /**
653+ * Represents the event of the user starting to touch the screen.
654+ */
655+ public static final int TYPE_TOUCH_INTERACTION_START = 0x00100000 ;
656+
657+ /**
658+ * Represents the event of the user ending to touch the screen.
659+ */
660+ public static final int TYPE_TOUCH_INTERACTION_END = 0x00200000 ;
661+
612662 /**
613663 * Mask for {@link AccessibilityEvent} all types.
614664 *
@@ -628,6 +678,10 @@ public final class AccessibilityEvent extends AccessibilityRecord implements Par
628678 * @see #TYPE_VIEW_TEXT_SELECTION_CHANGED
629679 * @see #TYPE_ANNOUNCEMENT
630680 * @see #TYPE_VIEW_TEXT_TRAVERSED_AT_MOVEMENT_GRANULARITY
681+ * @see #TYPE_GESTURE_DETECTION_START
682+ * @see #TYPE_GESTURE_DETECTION_END
683+ * @see #TYPE_TOUCH_INTERACTION_START
684+ * @see #TYPE_TOUCH_INTERACTION_END
631685 */
632686 public static final int TYPES_ALL_MASK = 0xFFFFFFFF ;
633687
@@ -1120,6 +1174,14 @@ public static String eventTypeToString(int eventType) {
11201174 return "TYPE_VIEW_ACCESSIBILITY_FOCUS_CLEARED" ;
11211175 case TYPE_VIEW_TEXT_TRAVERSED_AT_MOVEMENT_GRANULARITY :
11221176 return "TYPE_CURRENT_AT_GRANULARITY_MOVEMENT_CHANGED" ;
1177+ case TYPE_GESTURE_DETECTION_START :
1178+ return "TYPE_GESTURE_DETECTION_START" ;
1179+ case TYPE_GESTURE_DETECTION_END :
1180+ return "TYPE_GESTURE_DETECTION_END" ;
1181+ case TYPE_TOUCH_INTERACTION_START :
1182+ return "TYPE_TOUCH_INTERACTION_START" ;
1183+ case TYPE_TOUCH_INTERACTION_END :
1184+ return "TYPE_TOUCH_INTERACTION_END" ;
11231185 default :
11241186 return null ;
11251187 }
0 commit comments