Loading api/current.txt +6 −0 Original line number Diff line number Diff line Loading @@ -212,6 +212,7 @@ package android { field public static final int accessibilityFeedbackType = 16843650; // 0x1010382 field public static final int accessibilityFlags = 16843652; // 0x1010384 field public static final int accessibilityLiveRegion = 16843758; // 0x10103ee field public static final int accessibilityPaneTitle = 16844156; // 0x101057c field public static final int accessibilityTraversalAfter = 16843986; // 0x10104d2 field public static final int accessibilityTraversalBefore = 16843985; // 0x10104d1 field public static final int accountPreferences = 16843423; // 0x101029f Loading Loading @@ -46291,6 +46292,7 @@ package android.view { method public java.lang.CharSequence getAccessibilityClassName(); method public int getAccessibilityLiveRegion(); method public android.view.accessibility.AccessibilityNodeProvider getAccessibilityNodeProvider(); method public java.lang.CharSequence getAccessibilityPaneTitle(); method public int getAccessibilityTraversalAfter(); method public int getAccessibilityTraversalBefore(); method public float getAlpha(); Loading Loading @@ -46614,6 +46616,7 @@ package android.view { method public void sendAccessibilityEventUnchecked(android.view.accessibility.AccessibilityEvent); method public void setAccessibilityDelegate(android.view.View.AccessibilityDelegate); method public void setAccessibilityLiveRegion(int); method public void setAccessibilityPaneTitle(java.lang.CharSequence); method public void setAccessibilityTraversalAfter(int); method public void setAccessibilityTraversalBefore(int); method public void setActivated(boolean); Loading Loading @@ -48011,6 +48014,7 @@ package android.view.accessibility { method public void setPackageName(java.lang.CharSequence); method public void writeToParcel(android.os.Parcel, int); field public static final int CONTENT_CHANGE_TYPE_CONTENT_DESCRIPTION = 4; // 0x4 field public static final int CONTENT_CHANGE_TYPE_PANE_TITLE = 8; // 0x8 field public static final int CONTENT_CHANGE_TYPE_SUBTREE = 1; // 0x1 field public static final int CONTENT_CHANGE_TYPE_TEXT = 2; // 0x2 field public static final int CONTENT_CHANGE_TYPE_UNDEFINED = 0; // 0x0 Loading Loading @@ -48121,6 +48125,7 @@ package android.view.accessibility { method public int getMaxTextLength(); method public int getMovementGranularities(); method public java.lang.CharSequence getPackageName(); method public java.lang.CharSequence getPaneTitle(); method public android.view.accessibility.AccessibilityNodeInfo getParent(); method public android.view.accessibility.AccessibilityNodeInfo.RangeInfo getRangeInfo(); method public java.lang.CharSequence getText(); Loading Loading @@ -48198,6 +48203,7 @@ package android.view.accessibility { method public void setMovementGranularities(int); method public void setMultiLine(boolean); method public void setPackageName(java.lang.CharSequence); method public void setPaneTitle(java.lang.CharSequence); method public void setParent(android.view.View); method public void setParent(android.view.View, int); method public void setPassword(boolean); core/java/android/view/View.java +44 −1 Original line number Diff line number Diff line Loading @@ -4044,6 +4044,12 @@ public class View implements Drawable.Callback, KeyEvent.Callback, */ private CharSequence mContentDescription; /** * If this view represents a distinct part of the window, it can have a title that labels the * area. */ private CharSequence mAccessibilityPaneTitle; /** * Specifies the id of a view for which this view serves as a label for * accessibility purposes. Loading Loading @@ -5409,6 +5415,11 @@ public class View implements Drawable.Callback, KeyEvent.Callback, setScreenReaderFocusable(a.getBoolean(attr, false)); } break; case R.styleable.View_accessibilityPaneTitle: if (a.peekValue(attr) != null) { setAccessibilityPaneTitle(a.getString(attr)); } break; } } Loading Loading @@ -7217,6 +7228,35 @@ 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. * * @param accessibilityPaneTitle The pane's title. * * {@see AccessibilityNodeInfo#setPaneTitle(CharSequence)} */ public void setAccessibilityPaneTitle(CharSequence accessibilityPaneTitle) { if (!TextUtils.equals(accessibilityPaneTitle, mAccessibilityPaneTitle)) { mAccessibilityPaneTitle = accessibilityPaneTitle; notifyViewAccessibilityStateChangedIfNeeded( AccessibilityEvent.CONTENT_CHANGE_TYPE_PANE_TITLE); } } /** * Get the title of the pane for purposes of accessibility. * * @return The current pane title. * * {@see #setAccessibilityPaneTitle}. */ public CharSequence getAccessibilityPaneTitle() { return mAccessibilityPaneTitle; } /** * Sends an accessibility event of the given type. If accessibility is * not enabled this method has no effect. The default implementation calls Loading Loading @@ -8514,6 +8554,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback, info.addAction(AccessibilityAction.ACTION_SHOW_ON_SCREEN); populateAccessibilityNodeInfoDrawingOrderInParent(info); info.setPaneTitle(mAccessibilityPaneTitle); } /** Loading Loading @@ -11405,6 +11446,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback, * {@link #getAccessibilityLiveRegion()} is not * {@link #ACCESSIBILITY_LIVE_REGION_NONE}. * </ul> * <li>Has an accessibility pane title, see {@link #setAccessibilityPaneTitle}</li> * </ol> * * @return Whether the view is exposed for accessibility. Loading @@ -11431,7 +11473,8 @@ public class View implements Drawable.Callback, KeyEvent.Callback, return mode == IMPORTANT_FOR_ACCESSIBILITY_YES || isActionableForAccessibility() || hasListenersForAccessibility() || getAccessibilityNodeProvider() != null || getAccessibilityLiveRegion() != ACCESSIBILITY_LIVE_REGION_NONE; || getAccessibilityLiveRegion() != ACCESSIBILITY_LIVE_REGION_NONE || (mAccessibilityPaneTitle != null); } /** core/java/android/view/accessibility/AccessibilityEvent.java +8 −1 Original line number Diff line number Diff line Loading @@ -564,6 +564,12 @@ public final class AccessibilityEvent extends AccessibilityRecord implements Par */ public static final int CONTENT_CHANGE_TYPE_CONTENT_DESCRIPTION = 0x00000004; /** * Change type for {@link #TYPE_WINDOW_CONTENT_CHANGED} event: * The node's pane title changed. */ public static final int CONTENT_CHANGE_TYPE_PANE_TITLE = 0x00000008; /** * Change type for {@link #TYPE_WINDOWS_CHANGED} event: * The window was added. Loading Loading @@ -654,7 +660,8 @@ public final class AccessibilityEvent extends AccessibilityRecord implements Par CONTENT_CHANGE_TYPE_UNDEFINED, CONTENT_CHANGE_TYPE_SUBTREE, CONTENT_CHANGE_TYPE_TEXT, CONTENT_CHANGE_TYPE_CONTENT_DESCRIPTION CONTENT_CHANGE_TYPE_CONTENT_DESCRIPTION, CONTENT_CHANGE_TYPE_PANE_TITLE }) public @interface ContentChangeTypes {} Loading core/java/android/view/accessibility/AccessibilityNodeInfo.java +35 −0 Original line number Diff line number Diff line Loading @@ -723,6 +723,7 @@ public class AccessibilityNodeInfo implements Parcelable { private CharSequence mText; private CharSequence mHintText; private CharSequence mError; private CharSequence mPaneTitle; private CharSequence mContentDescription; private String mViewIdResourceName; private ArrayList<String> mExtraDataKeys; Loading Loading @@ -2032,6 +2033,33 @@ public class AccessibilityNodeInfo implements Parcelable { setBooleanProperty(BOOLEAN_PROPERTY_EDITABLE, editable); } /** * If this node represents a visually distinct region of the screen that may update separately * from the rest of the window, it is considered a pane. Set the pane title to indicate that * the node is a pane, and to provide a title for it. * <p> * <strong>Note:</strong> Cannot be called from an * {@link android.accessibilityservice.AccessibilityService}. * This class is made immutable before being delivered to an AccessibilityService. * </p> * @param paneTitle The title of the pane represented by this node. */ public void setPaneTitle(@Nullable CharSequence paneTitle) { enforceNotSealed(); mPaneTitle = (paneTitle == null) ? null : paneTitle.subSequence(0, paneTitle.length()); } /** * Get the title of the pane represented by this node. * * @return The title of the pane represented by this node, or {@code null} if this node does * not represent a pane. */ public @Nullable CharSequence getPaneTitle() { return mPaneTitle; } /** * Get the drawing order of the view corresponding it this node. * <p> Loading Loading @@ -3151,6 +3179,10 @@ public class AccessibilityNodeInfo implements Parcelable { nonDefaultFields |= bitAt(fieldIndex); } fieldIndex++; if (!Objects.equals(mPaneTitle, DEFAULT.mPaneTitle)) { nonDefaultFields |= bitAt(fieldIndex); } fieldIndex++; if (!Objects.equals(mViewIdResourceName, DEFAULT.mViewIdResourceName)) { nonDefaultFields |= bitAt(fieldIndex); } Loading Loading @@ -3270,6 +3302,7 @@ public class AccessibilityNodeInfo implements Parcelable { if (isBitSet(nonDefaultFields, fieldIndex++)) { parcel.writeCharSequence(mContentDescription); } if (isBitSet(nonDefaultFields, fieldIndex++)) parcel.writeCharSequence(mPaneTitle); if (isBitSet(nonDefaultFields, fieldIndex++)) parcel.writeString(mViewIdResourceName); if (isBitSet(nonDefaultFields, fieldIndex++)) parcel.writeInt(mTextSelectionStart); Loading Loading @@ -3341,6 +3374,7 @@ public class AccessibilityNodeInfo implements Parcelable { mHintText = other.mHintText; mError = other.mError; mContentDescription = other.mContentDescription; mPaneTitle = other.mPaneTitle; mViewIdResourceName = other.mViewIdResourceName; if (mActions != null) mActions.clear(); Loading Loading @@ -3461,6 +3495,7 @@ public class AccessibilityNodeInfo implements Parcelable { if (isBitSet(nonDefaultFields, fieldIndex++)) { mContentDescription = parcel.readCharSequence(); } if (isBitSet(nonDefaultFields, fieldIndex++)) mPaneTitle = parcel.readString(); if (isBitSet(nonDefaultFields, fieldIndex++)) mViewIdResourceName = parcel.readString(); if (isBitSet(nonDefaultFields, fieldIndex++)) mTextSelectionStart = parcel.readInt(); Loading core/res/res/values/attrs.xml +4 −0 Original line number Diff line number Diff line Loading @@ -3030,6 +3030,10 @@ value, {@code false}, leaves the screen reader to consider other signals, such as focusability or the presence of text, to decide what it focus.--> <attr name="screenReaderFocusable" format="boolean" /> <!-- The title this view should present to accessibility as a pane title. See {@link android.view.View#setAccessibilityPaneTitle(CharSequence)} --> <attr name="accessibilityPaneTitle" format="string" /> </declare-styleable> <!-- Attributes that can be assigned to a tag for a particular View. --> Loading Loading
api/current.txt +6 −0 Original line number Diff line number Diff line Loading @@ -212,6 +212,7 @@ package android { field public static final int accessibilityFeedbackType = 16843650; // 0x1010382 field public static final int accessibilityFlags = 16843652; // 0x1010384 field public static final int accessibilityLiveRegion = 16843758; // 0x10103ee field public static final int accessibilityPaneTitle = 16844156; // 0x101057c field public static final int accessibilityTraversalAfter = 16843986; // 0x10104d2 field public static final int accessibilityTraversalBefore = 16843985; // 0x10104d1 field public static final int accountPreferences = 16843423; // 0x101029f Loading Loading @@ -46291,6 +46292,7 @@ package android.view { method public java.lang.CharSequence getAccessibilityClassName(); method public int getAccessibilityLiveRegion(); method public android.view.accessibility.AccessibilityNodeProvider getAccessibilityNodeProvider(); method public java.lang.CharSequence getAccessibilityPaneTitle(); method public int getAccessibilityTraversalAfter(); method public int getAccessibilityTraversalBefore(); method public float getAlpha(); Loading Loading @@ -46614,6 +46616,7 @@ package android.view { method public void sendAccessibilityEventUnchecked(android.view.accessibility.AccessibilityEvent); method public void setAccessibilityDelegate(android.view.View.AccessibilityDelegate); method public void setAccessibilityLiveRegion(int); method public void setAccessibilityPaneTitle(java.lang.CharSequence); method public void setAccessibilityTraversalAfter(int); method public void setAccessibilityTraversalBefore(int); method public void setActivated(boolean); Loading Loading @@ -48011,6 +48014,7 @@ package android.view.accessibility { method public void setPackageName(java.lang.CharSequence); method public void writeToParcel(android.os.Parcel, int); field public static final int CONTENT_CHANGE_TYPE_CONTENT_DESCRIPTION = 4; // 0x4 field public static final int CONTENT_CHANGE_TYPE_PANE_TITLE = 8; // 0x8 field public static final int CONTENT_CHANGE_TYPE_SUBTREE = 1; // 0x1 field public static final int CONTENT_CHANGE_TYPE_TEXT = 2; // 0x2 field public static final int CONTENT_CHANGE_TYPE_UNDEFINED = 0; // 0x0 Loading Loading @@ -48121,6 +48125,7 @@ package android.view.accessibility { method public int getMaxTextLength(); method public int getMovementGranularities(); method public java.lang.CharSequence getPackageName(); method public java.lang.CharSequence getPaneTitle(); method public android.view.accessibility.AccessibilityNodeInfo getParent(); method public android.view.accessibility.AccessibilityNodeInfo.RangeInfo getRangeInfo(); method public java.lang.CharSequence getText(); Loading Loading @@ -48198,6 +48203,7 @@ package android.view.accessibility { method public void setMovementGranularities(int); method public void setMultiLine(boolean); method public void setPackageName(java.lang.CharSequence); method public void setPaneTitle(java.lang.CharSequence); method public void setParent(android.view.View); method public void setParent(android.view.View, int); method public void setPassword(boolean);
core/java/android/view/View.java +44 −1 Original line number Diff line number Diff line Loading @@ -4044,6 +4044,12 @@ public class View implements Drawable.Callback, KeyEvent.Callback, */ private CharSequence mContentDescription; /** * If this view represents a distinct part of the window, it can have a title that labels the * area. */ private CharSequence mAccessibilityPaneTitle; /** * Specifies the id of a view for which this view serves as a label for * accessibility purposes. Loading Loading @@ -5409,6 +5415,11 @@ public class View implements Drawable.Callback, KeyEvent.Callback, setScreenReaderFocusable(a.getBoolean(attr, false)); } break; case R.styleable.View_accessibilityPaneTitle: if (a.peekValue(attr) != null) { setAccessibilityPaneTitle(a.getString(attr)); } break; } } Loading Loading @@ -7217,6 +7228,35 @@ 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. * * @param accessibilityPaneTitle The pane's title. * * {@see AccessibilityNodeInfo#setPaneTitle(CharSequence)} */ public void setAccessibilityPaneTitle(CharSequence accessibilityPaneTitle) { if (!TextUtils.equals(accessibilityPaneTitle, mAccessibilityPaneTitle)) { mAccessibilityPaneTitle = accessibilityPaneTitle; notifyViewAccessibilityStateChangedIfNeeded( AccessibilityEvent.CONTENT_CHANGE_TYPE_PANE_TITLE); } } /** * Get the title of the pane for purposes of accessibility. * * @return The current pane title. * * {@see #setAccessibilityPaneTitle}. */ public CharSequence getAccessibilityPaneTitle() { return mAccessibilityPaneTitle; } /** * Sends an accessibility event of the given type. If accessibility is * not enabled this method has no effect. The default implementation calls Loading Loading @@ -8514,6 +8554,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback, info.addAction(AccessibilityAction.ACTION_SHOW_ON_SCREEN); populateAccessibilityNodeInfoDrawingOrderInParent(info); info.setPaneTitle(mAccessibilityPaneTitle); } /** Loading Loading @@ -11405,6 +11446,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback, * {@link #getAccessibilityLiveRegion()} is not * {@link #ACCESSIBILITY_LIVE_REGION_NONE}. * </ul> * <li>Has an accessibility pane title, see {@link #setAccessibilityPaneTitle}</li> * </ol> * * @return Whether the view is exposed for accessibility. Loading @@ -11431,7 +11473,8 @@ public class View implements Drawable.Callback, KeyEvent.Callback, return mode == IMPORTANT_FOR_ACCESSIBILITY_YES || isActionableForAccessibility() || hasListenersForAccessibility() || getAccessibilityNodeProvider() != null || getAccessibilityLiveRegion() != ACCESSIBILITY_LIVE_REGION_NONE; || getAccessibilityLiveRegion() != ACCESSIBILITY_LIVE_REGION_NONE || (mAccessibilityPaneTitle != null); } /**
core/java/android/view/accessibility/AccessibilityEvent.java +8 −1 Original line number Diff line number Diff line Loading @@ -564,6 +564,12 @@ public final class AccessibilityEvent extends AccessibilityRecord implements Par */ public static final int CONTENT_CHANGE_TYPE_CONTENT_DESCRIPTION = 0x00000004; /** * Change type for {@link #TYPE_WINDOW_CONTENT_CHANGED} event: * The node's pane title changed. */ public static final int CONTENT_CHANGE_TYPE_PANE_TITLE = 0x00000008; /** * Change type for {@link #TYPE_WINDOWS_CHANGED} event: * The window was added. Loading Loading @@ -654,7 +660,8 @@ public final class AccessibilityEvent extends AccessibilityRecord implements Par CONTENT_CHANGE_TYPE_UNDEFINED, CONTENT_CHANGE_TYPE_SUBTREE, CONTENT_CHANGE_TYPE_TEXT, CONTENT_CHANGE_TYPE_CONTENT_DESCRIPTION CONTENT_CHANGE_TYPE_CONTENT_DESCRIPTION, CONTENT_CHANGE_TYPE_PANE_TITLE }) public @interface ContentChangeTypes {} Loading
core/java/android/view/accessibility/AccessibilityNodeInfo.java +35 −0 Original line number Diff line number Diff line Loading @@ -723,6 +723,7 @@ public class AccessibilityNodeInfo implements Parcelable { private CharSequence mText; private CharSequence mHintText; private CharSequence mError; private CharSequence mPaneTitle; private CharSequence mContentDescription; private String mViewIdResourceName; private ArrayList<String> mExtraDataKeys; Loading Loading @@ -2032,6 +2033,33 @@ public class AccessibilityNodeInfo implements Parcelable { setBooleanProperty(BOOLEAN_PROPERTY_EDITABLE, editable); } /** * If this node represents a visually distinct region of the screen that may update separately * from the rest of the window, it is considered a pane. Set the pane title to indicate that * the node is a pane, and to provide a title for it. * <p> * <strong>Note:</strong> Cannot be called from an * {@link android.accessibilityservice.AccessibilityService}. * This class is made immutable before being delivered to an AccessibilityService. * </p> * @param paneTitle The title of the pane represented by this node. */ public void setPaneTitle(@Nullable CharSequence paneTitle) { enforceNotSealed(); mPaneTitle = (paneTitle == null) ? null : paneTitle.subSequence(0, paneTitle.length()); } /** * Get the title of the pane represented by this node. * * @return The title of the pane represented by this node, or {@code null} if this node does * not represent a pane. */ public @Nullable CharSequence getPaneTitle() { return mPaneTitle; } /** * Get the drawing order of the view corresponding it this node. * <p> Loading Loading @@ -3151,6 +3179,10 @@ public class AccessibilityNodeInfo implements Parcelable { nonDefaultFields |= bitAt(fieldIndex); } fieldIndex++; if (!Objects.equals(mPaneTitle, DEFAULT.mPaneTitle)) { nonDefaultFields |= bitAt(fieldIndex); } fieldIndex++; if (!Objects.equals(mViewIdResourceName, DEFAULT.mViewIdResourceName)) { nonDefaultFields |= bitAt(fieldIndex); } Loading Loading @@ -3270,6 +3302,7 @@ public class AccessibilityNodeInfo implements Parcelable { if (isBitSet(nonDefaultFields, fieldIndex++)) { parcel.writeCharSequence(mContentDescription); } if (isBitSet(nonDefaultFields, fieldIndex++)) parcel.writeCharSequence(mPaneTitle); if (isBitSet(nonDefaultFields, fieldIndex++)) parcel.writeString(mViewIdResourceName); if (isBitSet(nonDefaultFields, fieldIndex++)) parcel.writeInt(mTextSelectionStart); Loading Loading @@ -3341,6 +3374,7 @@ public class AccessibilityNodeInfo implements Parcelable { mHintText = other.mHintText; mError = other.mError; mContentDescription = other.mContentDescription; mPaneTitle = other.mPaneTitle; mViewIdResourceName = other.mViewIdResourceName; if (mActions != null) mActions.clear(); Loading Loading @@ -3461,6 +3495,7 @@ public class AccessibilityNodeInfo implements Parcelable { if (isBitSet(nonDefaultFields, fieldIndex++)) { mContentDescription = parcel.readCharSequence(); } if (isBitSet(nonDefaultFields, fieldIndex++)) mPaneTitle = parcel.readString(); if (isBitSet(nonDefaultFields, fieldIndex++)) mViewIdResourceName = parcel.readString(); if (isBitSet(nonDefaultFields, fieldIndex++)) mTextSelectionStart = parcel.readInt(); Loading
core/res/res/values/attrs.xml +4 −0 Original line number Diff line number Diff line Loading @@ -3030,6 +3030,10 @@ value, {@code false}, leaves the screen reader to consider other signals, such as focusability or the presence of text, to decide what it focus.--> <attr name="screenReaderFocusable" format="boolean" /> <!-- The title this view should present to accessibility as a pane title. See {@link android.view.View#setAccessibilityPaneTitle(CharSequence)} --> <attr name="accessibilityPaneTitle" format="string" /> </declare-styleable> <!-- Attributes that can be assigned to a tag for a particular View. --> Loading