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

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

Merge "Update WINDOW_STATE_CHANGE documentation"

parents fde330e1 bf2073eb
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -8524,13 +8524,19 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
     * actions like a button press. Label your controls concisely and precisely instead, and for
     * significant UI changes like window changes, use
     * {@link android.app.Activity#setTitle(CharSequence)} and
     * {@link View#setAccessibilityPaneTitle(CharSequence)}.
     * {@link #setAccessibilityPaneTitle(CharSequence)}.
     *
     * <p>
     * Use {@link View#setAccessibilityLiveRegion(int)} to inform the user of changes to critical
     * Use {@link #setAccessibilityLiveRegion(int)} to inform the user of changes to critical
     * views within the user interface. These should still be used sparingly as they may generate
     * announcements every time a View is updated.
     *
     * <p>
     * Use {@link #setStateDescription(CharSequence)} to convey state changes to views within the
     * user interface. While a live region may send different types of events generated by the view,
     * state description will send {@link AccessibilityEvent#TYPE_WINDOW_CONTENT_CHANGED} events of
     * type {@link AccessibilityEvent#CONTENT_CHANGE_TYPE_STATE_DESCRIPTION}.
     *
     * @param text The announcement text.
     */
    public void announceForAccessibility(CharSequence text) {
+6 −0
Original line number Diff line number Diff line
@@ -486,9 +486,15 @@ public final class AccessibilityEvent extends AccessibilityRecord implements Par

    /**
     * Represents the event of a change to a visually distinct section of the user interface.
     * <p>
     * These events should only be dispatched from {@link android.view.View}s that have
     * accessibility pane titles, and replaces {@link #TYPE_WINDOW_CONTENT_CHANGED} for those
     * sources. Details about the change are available from {@link #getContentChangeTypes()}.
     * <p>
     * Do not use this to get an accessibility service to make non-pane announcements. Instead,
     * follow the practices described in {@link View#announceForAccessibility(CharSequence)}.
     * <b>Note:</b> this does not suggest calling announceForAccessibility(), but using the
     * suggestions listed in its documentation.
     */
    public static final int TYPE_WINDOW_STATE_CHANGED = 1 << 5;