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

Commit 1c547cdb authored by Sally Yuen's avatar Sally Yuen Committed by Android (Google) Code Review
Browse files

Merge "Make minor documentation improvements"

parents 926b7ee4 f9a761ed
Loading
Loading
Loading
Loading
+15 −1
Original line number Diff line number Diff line
@@ -1238,7 +1238,21 @@ public abstract class AccessibilityService extends Service {
     * property in its meta-data. For more information, see
     * {@link #SERVICE_META_DATA}.
     * </p>
     *
     * <p>Since many apps do not appropriately support {@link AccessibilityAction#ACTION_CLICK},
     * if this action fails on an element that should be clickable, a service that is not a screen
     * reader may send a tap directly to the element as a fallback. The example below
     * demonstrates this fallback using the gesture dispatch APIs:
     *
     * <pre class="prettyprint"><code>
     *     private void tap(PointF point) {
     *         StrokeDescription tap =  new StrokeDescription(path(point), 0,
     *         ViewConfiguration.getTapTimeout());
     *         GestureDescription.Builder builder = new GestureDescription.Builder();
     *         builder.addStroke(tap);
     *         dispatchGesture(builder.build(), null, null);
     *     }
     *</code>
     * </pre>
     * @param gesture The gesture to dispatch
     * @param callback The object to call back when the status of the gesture is known. If
     * {@code null}, no status is reported.
+3 −0
Original line number Diff line number Diff line
@@ -8075,6 +8075,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
     *
     * @param rectangle The rectangle in the View's content coordinate space
     * @return Whether any parent scrolled.
     * @see AccessibilityAction#ACTION_SHOW_ON_SCREEN
     */
    public boolean requestRectangleOnScreen(Rect rectangle) {
        return requestRectangleOnScreen(rectangle, false);
@@ -11216,6 +11217,8 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
     *
     * @param stateDescription The state description.
     * @see #getStateDescription()
     * @see #setContentDescription(CharSequence) for the difference between content and
     * state descriptions.
     */
    @RemotableViewMethod
    public void setStateDescription(@Nullable CharSequence stateDescription) {
+7 −1
Original line number Diff line number Diff line
@@ -475,6 +475,7 @@ public final class AccessibilityEvent extends AccessibilityRecord implements Par
    /**
     * Represents the event of selecting an item usually in the context of an
     * {@link android.widget.AdapterView}.
     * @see AccessibilityNodeInfo.AccessibilityAction#ACTION_SELECT
     */
    public static final int TYPE_VIEW_SELECTED = 1 << 2;

@@ -487,6 +488,7 @@ public final class AccessibilityEvent extends AccessibilityRecord implements Par

    /**
     * Represents the event of changing the text of an {@link android.widget.EditText}.
     * @see AccessibilityNodeInfo#setText(CharSequence)
     */
    public static final int TYPE_VIEW_TEXT_CHANGED = 1 << 4;

@@ -652,6 +654,7 @@ public final class AccessibilityEvent extends AccessibilityRecord implements Par
    /**
     * Change type for {@link #TYPE_WINDOW_CONTENT_CHANGED} event:
     * The node's text changed.
     * @see AccessibilityNodeInfo#setText(CharSequence)
     */
    public static final int CONTENT_CHANGE_TYPE_TEXT = 1 << 1;

@@ -668,7 +671,7 @@ public final class AccessibilityEvent extends AccessibilityRecord implements Par
     * If this makes the pane appear, {@link #CONTENT_CHANGE_TYPE_PANE_APPEARED} is sent
     * instead. If this makes the pane disappear, {@link #CONTENT_CHANGE_TYPE_PANE_DISAPPEARED}
     * is sent.
     *
     * @see View#setAccessibilityPaneTitle(CharSequence)
     */
    public static final int CONTENT_CHANGE_TYPE_PANE_TITLE = 1 << 3;

@@ -676,6 +679,7 @@ public final class AccessibilityEvent extends AccessibilityRecord implements Par
     * Change type for {@link #TYPE_WINDOW_STATE_CHANGED} event:
     * The node has a pane title, and either just appeared or just was assigned a title when it
     * had none before.
     * @see View#setAccessibilityPaneTitle(CharSequence)
     */
    public static final int CONTENT_CHANGE_TYPE_PANE_APPEARED = 1 << 4;

@@ -687,6 +691,7 @@ public final class AccessibilityEvent extends AccessibilityRecord implements Par
     * No source will be returned if the node is no longer on the screen. To make the change more
     * clear for the user, the first entry in {@link #getText()} will return the value that would
     * have been returned by {@code getSource().getPaneTitle()}.
     * @see View#setAccessibilityPaneTitle(CharSequence)
     */
    public static final int CONTENT_CHANGE_TYPE_PANE_DISAPPEARED = 1 << 5;

@@ -697,6 +702,7 @@ public final class AccessibilityEvent extends AccessibilityRecord implements Par
     * changes, the changed part can be put into event text. For example, if state description
     * changed from "on, wifi signal full" to "on, wifi three bars", "wifi three bars" can be put
     * into the event text.
     * @see View#setStateDescription(CharSequence)
     */
    public static final int CONTENT_CHANGE_TYPE_STATE_DESCRIPTION = 1 << 6;

+4 −0
Original line number Diff line number Diff line
@@ -45,6 +45,10 @@ import java.util.List;
 * View itself. Similarly the returned instance is responsible for performing accessibility
 * actions on any virtual view or the root view itself. For example:
 * </p>
 * <aside class="note">
 * <b>Note:</b> Consider using a {@link androidx.customview.widget.ExploreByTouchHelper}, a utility
 * extension of AccessibilityNodeProvider, to simplify many aspects of providing information to
 * accessibility services and managing accessibility focus. </aside>
 * <div>
 * <div class="ds-selector-tabs"><section><h3 id="kotlin">Kotlin</h3>
 * <pre class="prettyprint lang-kotlin">