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

Commit 37cc3c41 authored by Phil Weaver's avatar Phil Weaver
Browse files

Improve a11y pane title javadoc

Bug: 74123987
Test: Just changing comments.
Change-Id: I7f21947a35d1baccf171346979164718386c5b71
(cherry picked from commit 50d2808b)
parent 13da2a77
Loading
Loading
Loading
Loading
+9 −7
Original line number Diff line number Diff line
@@ -7289,16 +7289,18 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
    }
    /**
     * If this view is a visually distinct portion of a window, for example the content view of
     * a fragment that is replaced, it is considered a pane for accessibility purposes. In order
     * for accessibility services to understand the views role, and to announce its title as
     * appropriate, such views should have pane titles.
     * Visually distinct portion of a window with window-like semantics are considered panes for
     * accessibility purposes. One example is the content view of a fragment that is replaced.
     * In order for accessibility services to understand a pane's window-like behavior, panes
     * should have descriptive titles. Views with pane titles produce {@link AccessibilityEvent}s
     * when they appear, disappear, or change title.
     *
     * @param accessibilityPaneTitle The pane's title.
     * @param accessibilityPaneTitle The pane's title. Setting to {@code null} indicates that this
     *                               View is not a pane.
     *
     * {@see AccessibilityNodeInfo#setPaneTitle(CharSequence)}
     */
    public void setAccessibilityPaneTitle(CharSequence accessibilityPaneTitle) {
    public void setAccessibilityPaneTitle(@Nullable CharSequence accessibilityPaneTitle) {
        if (!TextUtils.equals(accessibilityPaneTitle, mAccessibilityPaneTitle)) {
            mAccessibilityPaneTitle = accessibilityPaneTitle;
            notifyViewAccessibilityStateChangedIfNeeded(
@@ -7313,7 +7315,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
     *
     * {@see #setAccessibilityPaneTitle}.
     */
    public CharSequence getAccessibilityPaneTitle() {
    @Nullable public CharSequence getAccessibilityPaneTitle() {
        return mAccessibilityPaneTitle;
    }