Loading api/current.txt +4 −0 Original line number Diff line number Diff line Loading @@ -45102,6 +45102,7 @@ package android.view.accessibility { method public int getDrawingOrder(); method public java.lang.CharSequence getError(); method public android.os.Bundle getExtras(); method public java.lang.CharSequence getHintText(); method public int getInputType(); method public android.view.accessibility.AccessibilityNodeInfo getLabelFor(); method public android.view.accessibility.AccessibilityNodeInfo getLabeledBy(); Loading Loading @@ -45136,6 +45137,7 @@ package android.view.accessibility { method public boolean isPassword(); method public boolean isScrollable(); method public boolean isSelected(); method public boolean isShowingHintText(); method public boolean isVisibleToUser(); method public static android.view.accessibility.AccessibilityNodeInfo obtain(android.view.View); method public static android.view.accessibility.AccessibilityNodeInfo obtain(android.view.View, int); Loading Loading @@ -45169,6 +45171,7 @@ package android.view.accessibility { method public void setError(java.lang.CharSequence); method public void setFocusable(boolean); method public void setFocused(boolean); method public void setHintText(java.lang.CharSequence); method public void setImportantForAccessibility(boolean); method public void setInputType(int); method public void setLabelFor(android.view.View); Loading @@ -45187,6 +45190,7 @@ package android.view.accessibility { method public void setRangeInfo(android.view.accessibility.AccessibilityNodeInfo.RangeInfo); method public void setScrollable(boolean); method public void setSelected(boolean); method public void setShowingHintText(boolean); method public void setSource(android.view.View); method public void setSource(android.view.View, int); method public void setText(java.lang.CharSequence); api/system-current.txt +4 −0 Original line number Diff line number Diff line Loading @@ -48333,6 +48333,7 @@ package android.view.accessibility { method public int getDrawingOrder(); method public java.lang.CharSequence getError(); method public android.os.Bundle getExtras(); method public java.lang.CharSequence getHintText(); method public int getInputType(); method public android.view.accessibility.AccessibilityNodeInfo getLabelFor(); method public android.view.accessibility.AccessibilityNodeInfo getLabeledBy(); Loading Loading @@ -48367,6 +48368,7 @@ package android.view.accessibility { method public boolean isPassword(); method public boolean isScrollable(); method public boolean isSelected(); method public boolean isShowingHintText(); method public boolean isVisibleToUser(); method public static android.view.accessibility.AccessibilityNodeInfo obtain(android.view.View); method public static android.view.accessibility.AccessibilityNodeInfo obtain(android.view.View, int); Loading Loading @@ -48400,6 +48402,7 @@ package android.view.accessibility { method public void setError(java.lang.CharSequence); method public void setFocusable(boolean); method public void setFocused(boolean); method public void setHintText(java.lang.CharSequence); method public void setImportantForAccessibility(boolean); method public void setInputType(int); method public void setLabelFor(android.view.View); Loading @@ -48418,6 +48421,7 @@ package android.view.accessibility { method public void setRangeInfo(android.view.accessibility.AccessibilityNodeInfo.RangeInfo); method public void setScrollable(boolean); method public void setSelected(boolean); method public void setShowingHintText(boolean); method public void setSource(android.view.View); method public void setSource(android.view.View, int); method public void setText(java.lang.CharSequence); api/test-current.txt +4 −0 Original line number Diff line number Diff line Loading @@ -45398,6 +45398,7 @@ package android.view.accessibility { method public int getDrawingOrder(); method public java.lang.CharSequence getError(); method public android.os.Bundle getExtras(); method public java.lang.CharSequence getHintText(); method public int getInputType(); method public android.view.accessibility.AccessibilityNodeInfo getLabelFor(); method public android.view.accessibility.AccessibilityNodeInfo getLabeledBy(); Loading Loading @@ -45432,6 +45433,7 @@ package android.view.accessibility { method public boolean isPassword(); method public boolean isScrollable(); method public boolean isSelected(); method public boolean isShowingHintText(); method public boolean isVisibleToUser(); method public static android.view.accessibility.AccessibilityNodeInfo obtain(android.view.View); method public static android.view.accessibility.AccessibilityNodeInfo obtain(android.view.View, int); Loading Loading @@ -45465,6 +45467,7 @@ package android.view.accessibility { method public void setError(java.lang.CharSequence); method public void setFocusable(boolean); method public void setFocused(boolean); method public void setHintText(java.lang.CharSequence); method public void setImportantForAccessibility(boolean); method public void setInputType(int); method public void setLabelFor(android.view.View); Loading @@ -45484,6 +45487,7 @@ package android.view.accessibility { method public void setRangeInfo(android.view.accessibility.AccessibilityNodeInfo.RangeInfo); method public void setScrollable(boolean); method public void setSelected(boolean); method public void setShowingHintText(boolean); method public void setSource(android.view.View); method public void setSource(android.view.View, int); method public void setText(java.lang.CharSequence); core/java/android/view/accessibility/AccessibilityNodeInfo.java +60 −0 Original line number Diff line number Diff line Loading @@ -557,6 +557,8 @@ public class AccessibilityNodeInfo implements Parcelable { private static final int BOOLEAN_PROPERTY_IMPORTANCE = 0x0040000; private static final int BOOLEAN_PROPERTY_IS_SHOWING_HINT = 0x0100000; /** * Bits that provide the id of a virtual descendant of a view. */ Loading Loading @@ -645,6 +647,7 @@ public class AccessibilityNodeInfo implements Parcelable { // Hidden, unparceled value used to hold the original value passed to setText private CharSequence mOriginalText; private CharSequence mText; private CharSequence mHintText; private CharSequence mError; private CharSequence mContentDescription; private String mViewIdResourceName; Loading Loading @@ -2175,6 +2178,33 @@ public class AccessibilityNodeInfo implements Parcelable { setBooleanProperty(BOOLEAN_PROPERTY_IMPORTANCE, important); } /** * Returns whether the node's text represents a hint for the user to enter text. It should only * be {@code true} if the node has editable text. * * @return {@code true} if the text in the node represents a hint to the user, {@code false} * otherwise. */ public boolean isShowingHintText() { return getBooleanProperty(BOOLEAN_PROPERTY_IS_SHOWING_HINT); } /** * Sets whether the node's text represents a hint for the user to enter text. It should only * be {@code true} if the node has editable text. * <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 showingHintText {@code true} if the text in the node represents a hint to the user, * {@code false} otherwise. */ public void setShowingHintText(boolean showingHintText) { setBooleanProperty(BOOLEAN_PROPERTY_IS_SHOWING_HINT, showingHintText); } /** * Gets the package this node comes from. * Loading Loading @@ -2316,6 +2346,32 @@ public class AccessibilityNodeInfo implements Parcelable { mText = (text == null) ? null : text.subSequence(0, text.length()); } /** * Gets the hint text of this node. Only applies to nodes where text can be entered. * * @return The hint text. */ public CharSequence getHintText() { return mHintText; } /** * Sets the hint text of this node. Only applies to nodes where text can be entered. * <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 hintText The hint text for this mode. * * @throws IllegalStateException If called from an AccessibilityService. */ public void setHintText(CharSequence hintText) { enforceNotSealed(); mHintText = (hintText == null) ? null : hintText.subSequence(0, hintText.length()); } /** * Sets the error text of this node. * <p> Loading Loading @@ -2889,6 +2945,7 @@ public class AccessibilityNodeInfo implements Parcelable { parcel.writeCharSequence(mPackageName); parcel.writeCharSequence(mClassName); parcel.writeCharSequence(mText); parcel.writeCharSequence(mHintText); parcel.writeCharSequence(mError); parcel.writeCharSequence(mContentDescription); parcel.writeString(mViewIdResourceName); Loading Loading @@ -2963,6 +3020,7 @@ public class AccessibilityNodeInfo implements Parcelable { mPackageName = other.mPackageName; mClassName = other.mClassName; mText = other.mText; mHintText = other.mHintText; mError = other.mError; mContentDescription = other.mContentDescription; mViewIdResourceName = other.mViewIdResourceName; Loading Loading @@ -3066,6 +3124,7 @@ public class AccessibilityNodeInfo implements Parcelable { mPackageName = parcel.readCharSequence(); mClassName = parcel.readCharSequence(); mText = parcel.readCharSequence(); mHintText = parcel.readCharSequence(); mError = parcel.readCharSequence(); mContentDescription = parcel.readCharSequence(); mViewIdResourceName = parcel.readString(); Loading Loading @@ -3137,6 +3196,7 @@ public class AccessibilityNodeInfo implements Parcelable { mPackageName = null; mClassName = null; mText = null; mHintText = null; mError = null; mContentDescription = null; mViewIdResourceName = null; Loading core/java/android/widget/TextView.java +2 −0 Original line number Diff line number Diff line Loading @@ -9632,6 +9632,8 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener final boolean isPassword = hasPasswordTransformationMethod(); info.setPassword(isPassword); info.setText(getTextForAccessibility()); info.setHintText(mHint); info.setShowingHintText(isShowingHint()); if (mBufferType == BufferType.EDITABLE) { info.setEditable(true); Loading Loading
api/current.txt +4 −0 Original line number Diff line number Diff line Loading @@ -45102,6 +45102,7 @@ package android.view.accessibility { method public int getDrawingOrder(); method public java.lang.CharSequence getError(); method public android.os.Bundle getExtras(); method public java.lang.CharSequence getHintText(); method public int getInputType(); method public android.view.accessibility.AccessibilityNodeInfo getLabelFor(); method public android.view.accessibility.AccessibilityNodeInfo getLabeledBy(); Loading Loading @@ -45136,6 +45137,7 @@ package android.view.accessibility { method public boolean isPassword(); method public boolean isScrollable(); method public boolean isSelected(); method public boolean isShowingHintText(); method public boolean isVisibleToUser(); method public static android.view.accessibility.AccessibilityNodeInfo obtain(android.view.View); method public static android.view.accessibility.AccessibilityNodeInfo obtain(android.view.View, int); Loading Loading @@ -45169,6 +45171,7 @@ package android.view.accessibility { method public void setError(java.lang.CharSequence); method public void setFocusable(boolean); method public void setFocused(boolean); method public void setHintText(java.lang.CharSequence); method public void setImportantForAccessibility(boolean); method public void setInputType(int); method public void setLabelFor(android.view.View); Loading @@ -45187,6 +45190,7 @@ package android.view.accessibility { method public void setRangeInfo(android.view.accessibility.AccessibilityNodeInfo.RangeInfo); method public void setScrollable(boolean); method public void setSelected(boolean); method public void setShowingHintText(boolean); method public void setSource(android.view.View); method public void setSource(android.view.View, int); method public void setText(java.lang.CharSequence);
api/system-current.txt +4 −0 Original line number Diff line number Diff line Loading @@ -48333,6 +48333,7 @@ package android.view.accessibility { method public int getDrawingOrder(); method public java.lang.CharSequence getError(); method public android.os.Bundle getExtras(); method public java.lang.CharSequence getHintText(); method public int getInputType(); method public android.view.accessibility.AccessibilityNodeInfo getLabelFor(); method public android.view.accessibility.AccessibilityNodeInfo getLabeledBy(); Loading Loading @@ -48367,6 +48368,7 @@ package android.view.accessibility { method public boolean isPassword(); method public boolean isScrollable(); method public boolean isSelected(); method public boolean isShowingHintText(); method public boolean isVisibleToUser(); method public static android.view.accessibility.AccessibilityNodeInfo obtain(android.view.View); method public static android.view.accessibility.AccessibilityNodeInfo obtain(android.view.View, int); Loading Loading @@ -48400,6 +48402,7 @@ package android.view.accessibility { method public void setError(java.lang.CharSequence); method public void setFocusable(boolean); method public void setFocused(boolean); method public void setHintText(java.lang.CharSequence); method public void setImportantForAccessibility(boolean); method public void setInputType(int); method public void setLabelFor(android.view.View); Loading @@ -48418,6 +48421,7 @@ package android.view.accessibility { method public void setRangeInfo(android.view.accessibility.AccessibilityNodeInfo.RangeInfo); method public void setScrollable(boolean); method public void setSelected(boolean); method public void setShowingHintText(boolean); method public void setSource(android.view.View); method public void setSource(android.view.View, int); method public void setText(java.lang.CharSequence);
api/test-current.txt +4 −0 Original line number Diff line number Diff line Loading @@ -45398,6 +45398,7 @@ package android.view.accessibility { method public int getDrawingOrder(); method public java.lang.CharSequence getError(); method public android.os.Bundle getExtras(); method public java.lang.CharSequence getHintText(); method public int getInputType(); method public android.view.accessibility.AccessibilityNodeInfo getLabelFor(); method public android.view.accessibility.AccessibilityNodeInfo getLabeledBy(); Loading Loading @@ -45432,6 +45433,7 @@ package android.view.accessibility { method public boolean isPassword(); method public boolean isScrollable(); method public boolean isSelected(); method public boolean isShowingHintText(); method public boolean isVisibleToUser(); method public static android.view.accessibility.AccessibilityNodeInfo obtain(android.view.View); method public static android.view.accessibility.AccessibilityNodeInfo obtain(android.view.View, int); Loading Loading @@ -45465,6 +45467,7 @@ package android.view.accessibility { method public void setError(java.lang.CharSequence); method public void setFocusable(boolean); method public void setFocused(boolean); method public void setHintText(java.lang.CharSequence); method public void setImportantForAccessibility(boolean); method public void setInputType(int); method public void setLabelFor(android.view.View); Loading @@ -45484,6 +45487,7 @@ package android.view.accessibility { method public void setRangeInfo(android.view.accessibility.AccessibilityNodeInfo.RangeInfo); method public void setScrollable(boolean); method public void setSelected(boolean); method public void setShowingHintText(boolean); method public void setSource(android.view.View); method public void setSource(android.view.View, int); method public void setText(java.lang.CharSequence);
core/java/android/view/accessibility/AccessibilityNodeInfo.java +60 −0 Original line number Diff line number Diff line Loading @@ -557,6 +557,8 @@ public class AccessibilityNodeInfo implements Parcelable { private static final int BOOLEAN_PROPERTY_IMPORTANCE = 0x0040000; private static final int BOOLEAN_PROPERTY_IS_SHOWING_HINT = 0x0100000; /** * Bits that provide the id of a virtual descendant of a view. */ Loading Loading @@ -645,6 +647,7 @@ public class AccessibilityNodeInfo implements Parcelable { // Hidden, unparceled value used to hold the original value passed to setText private CharSequence mOriginalText; private CharSequence mText; private CharSequence mHintText; private CharSequence mError; private CharSequence mContentDescription; private String mViewIdResourceName; Loading Loading @@ -2175,6 +2178,33 @@ public class AccessibilityNodeInfo implements Parcelable { setBooleanProperty(BOOLEAN_PROPERTY_IMPORTANCE, important); } /** * Returns whether the node's text represents a hint for the user to enter text. It should only * be {@code true} if the node has editable text. * * @return {@code true} if the text in the node represents a hint to the user, {@code false} * otherwise. */ public boolean isShowingHintText() { return getBooleanProperty(BOOLEAN_PROPERTY_IS_SHOWING_HINT); } /** * Sets whether the node's text represents a hint for the user to enter text. It should only * be {@code true} if the node has editable text. * <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 showingHintText {@code true} if the text in the node represents a hint to the user, * {@code false} otherwise. */ public void setShowingHintText(boolean showingHintText) { setBooleanProperty(BOOLEAN_PROPERTY_IS_SHOWING_HINT, showingHintText); } /** * Gets the package this node comes from. * Loading Loading @@ -2316,6 +2346,32 @@ public class AccessibilityNodeInfo implements Parcelable { mText = (text == null) ? null : text.subSequence(0, text.length()); } /** * Gets the hint text of this node. Only applies to nodes where text can be entered. * * @return The hint text. */ public CharSequence getHintText() { return mHintText; } /** * Sets the hint text of this node. Only applies to nodes where text can be entered. * <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 hintText The hint text for this mode. * * @throws IllegalStateException If called from an AccessibilityService. */ public void setHintText(CharSequence hintText) { enforceNotSealed(); mHintText = (hintText == null) ? null : hintText.subSequence(0, hintText.length()); } /** * Sets the error text of this node. * <p> Loading Loading @@ -2889,6 +2945,7 @@ public class AccessibilityNodeInfo implements Parcelable { parcel.writeCharSequence(mPackageName); parcel.writeCharSequence(mClassName); parcel.writeCharSequence(mText); parcel.writeCharSequence(mHintText); parcel.writeCharSequence(mError); parcel.writeCharSequence(mContentDescription); parcel.writeString(mViewIdResourceName); Loading Loading @@ -2963,6 +3020,7 @@ public class AccessibilityNodeInfo implements Parcelable { mPackageName = other.mPackageName; mClassName = other.mClassName; mText = other.mText; mHintText = other.mHintText; mError = other.mError; mContentDescription = other.mContentDescription; mViewIdResourceName = other.mViewIdResourceName; Loading Loading @@ -3066,6 +3124,7 @@ public class AccessibilityNodeInfo implements Parcelable { mPackageName = parcel.readCharSequence(); mClassName = parcel.readCharSequence(); mText = parcel.readCharSequence(); mHintText = parcel.readCharSequence(); mError = parcel.readCharSequence(); mContentDescription = parcel.readCharSequence(); mViewIdResourceName = parcel.readString(); Loading Loading @@ -3137,6 +3196,7 @@ public class AccessibilityNodeInfo implements Parcelable { mPackageName = null; mClassName = null; mText = null; mHintText = null; mError = null; mContentDescription = null; mViewIdResourceName = null; Loading
core/java/android/widget/TextView.java +2 −0 Original line number Diff line number Diff line Loading @@ -9632,6 +9632,8 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener final boolean isPassword = hasPasswordTransformationMethod(); info.setPassword(isPassword); info.setText(getTextForAccessibility()); info.setHintText(mHint); info.setShowingHintText(isShowingHint()); if (mBufferType == BufferType.EDITABLE) { info.setEditable(true); Loading