Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 00d97ee6 authored by Yinglei Wang's avatar Yinglei Wang Committed by Android (Google) Code Review
Browse files

Merge "Update view#sendAccessibilityEvent(int eventType) doc"

parents ce49dbc7 85f30de2
Loading
Loading
Loading
Loading
+15 −4
Original line number Original line Diff line number Diff line
@@ -8204,7 +8204,10 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
     * to populate information about the event source (this View), then calls
     * to populate information about the event source (this View), then calls
     * {@link #dispatchPopulateAccessibilityEvent(AccessibilityEvent)} to
     * {@link #dispatchPopulateAccessibilityEvent(AccessibilityEvent)} to
     * populate the text content of the event source including its descendants,
     * populate the text content of the event source including its descendants,
     * and last calls
     * then for events type {@link AccessibilityEvent#TYPE_VIEW_SCROLLED}
     * and {@link AccessibilityEvent#TYPE_WINDOW_CONTENT_CHANGED} with
     * subtype {@link AccessibilityEvent#CONTENT_CHANGE_TYPE_STATE_DESCRIPTION},
     * throttle the events, and last calls
     * {@link ViewParent#requestSendAccessibilityEvent(View, AccessibilityEvent)}
     * {@link ViewParent#requestSendAccessibilityEvent(View, AccessibilityEvent)}
     * on its parent to request sending of the event to interested parties.
     * on its parent to request sending of the event to interested parties.
     * <p>
     * <p>
@@ -8213,11 +8216,19 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
     * {@link AccessibilityDelegate#sendAccessibilityEvent(View, int)} is
     * {@link AccessibilityDelegate#sendAccessibilityEvent(View, int)} is
     * responsible for handling this call.
     * responsible for handling this call.
     * </p>
     * </p>
     * <p>
     * If this view uses {@link AccessibilityNodeProvider} to provide virtual view hierarchy rooted
     * at this view, this method should not be called to send events from virtual children because
     * it will populate the events with wrong information and the events should be throttled per
     * child instead at the virtual root level. To send events from virtual children, call
     * {@link ViewParent#requestSendAccessibilityEvent(View, AccessibilityEvent)} on the view's
     * parent to request sending of the event to interested parties.
     * </p>
     *
     *
     * @param eventType The type of the event to send, as defined by several types from
     * @param eventType The type of the event to send, as defined by several types from
     * {@link android.view.accessibility.AccessibilityEvent}, such as
     * {@link AccessibilityEvent}, such as
     * {@link android.view.accessibility.AccessibilityEvent#TYPE_VIEW_CLICKED} or
     * {@link AccessibilityEvent#TYPE_VIEW_CLICKED} or
     * {@link android.view.accessibility.AccessibilityEvent#TYPE_VIEW_HOVER_ENTER}.
     * {@link AccessibilityEvent#TYPE_VIEW_HOVER_ENTER}.
     *
     *
     * @see #onInitializeAccessibilityEvent(AccessibilityEvent)
     * @see #onInitializeAccessibilityEvent(AccessibilityEvent)
     * @see #dispatchPopulateAccessibilityEvent(AccessibilityEvent)
     * @see #dispatchPopulateAccessibilityEvent(AccessibilityEvent)