Loading api/current.txt +2 −0 Original line number Diff line number Diff line Loading @@ -49753,6 +49753,7 @@ package android.view.accessibility { method public boolean isScrollable(); method public boolean isSelected(); method public boolean isShowingHintText(); method public boolean isTextEntryKey(); 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 @@ -49814,6 +49815,7 @@ package android.view.accessibility { method public void setSource(android.view.View); method public void setSource(android.view.View, int); method public void setText(java.lang.CharSequence); method public void setTextEntryKey(boolean); method public void setTextSelection(int, int); method public void setTooltipText(java.lang.CharSequence); method public void setTraversalAfter(android.view.View); core/java/android/view/accessibility/AccessibilityNodeInfo.java +26 −0 Original line number Diff line number Diff line Loading @@ -632,6 +632,8 @@ public class AccessibilityNodeInfo implements Parcelable { private static final int BOOLEAN_PROPERTY_IS_HEADING = 0x0200000; private static final int BOOLEAN_PROPERTY_IS_TEXT_ENTRY_KEY = 0x0400000; /** * Bits that provide the id of a virtual descendant of a view. */ Loading Loading @@ -2460,6 +2462,30 @@ public class AccessibilityNodeInfo implements Parcelable { setBooleanProperty(BOOLEAN_PROPERTY_IS_HEADING, isHeading); } /** * Returns whether node represents a text entry key that is part of a keyboard or keypad. * * @return {@code true} if the node is a text entry key., {@code false} otherwise. */ public boolean isTextEntryKey() { return getBooleanProperty(BOOLEAN_PROPERTY_IS_TEXT_ENTRY_KEY); } /** * Sets whether the node represents a text entry key that is part of a keyboard or keypad. * * <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 isTextEntryKey {@code true} if the node is a text entry key, {@code false} otherwise. */ public void setTextEntryKey(boolean isTextEntryKey) { setBooleanProperty(BOOLEAN_PROPERTY_IS_TEXT_ENTRY_KEY, isTextEntryKey); } /** * Gets the package this node comes from. * Loading core/tests/coretests/src/android/view/accessibility/AccessibilityNodeInfoTest.java +1 −1 Original line number Diff line number Diff line Loading @@ -57,7 +57,7 @@ public class AccessibilityNodeInfoTest { // The number of flags held in boolean properties. Their values should also be double-checked // in the methods above. private static final int NUM_BOOLEAN_PROPERTIES = 17; private static final int NUM_BOOLEAN_PROPERTIES = 18; @Test public void testStandardActions_serializationFlagIsValid() { Loading Loading
api/current.txt +2 −0 Original line number Diff line number Diff line Loading @@ -49753,6 +49753,7 @@ package android.view.accessibility { method public boolean isScrollable(); method public boolean isSelected(); method public boolean isShowingHintText(); method public boolean isTextEntryKey(); 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 @@ -49814,6 +49815,7 @@ package android.view.accessibility { method public void setSource(android.view.View); method public void setSource(android.view.View, int); method public void setText(java.lang.CharSequence); method public void setTextEntryKey(boolean); method public void setTextSelection(int, int); method public void setTooltipText(java.lang.CharSequence); method public void setTraversalAfter(android.view.View);
core/java/android/view/accessibility/AccessibilityNodeInfo.java +26 −0 Original line number Diff line number Diff line Loading @@ -632,6 +632,8 @@ public class AccessibilityNodeInfo implements Parcelable { private static final int BOOLEAN_PROPERTY_IS_HEADING = 0x0200000; private static final int BOOLEAN_PROPERTY_IS_TEXT_ENTRY_KEY = 0x0400000; /** * Bits that provide the id of a virtual descendant of a view. */ Loading Loading @@ -2460,6 +2462,30 @@ public class AccessibilityNodeInfo implements Parcelable { setBooleanProperty(BOOLEAN_PROPERTY_IS_HEADING, isHeading); } /** * Returns whether node represents a text entry key that is part of a keyboard or keypad. * * @return {@code true} if the node is a text entry key., {@code false} otherwise. */ public boolean isTextEntryKey() { return getBooleanProperty(BOOLEAN_PROPERTY_IS_TEXT_ENTRY_KEY); } /** * Sets whether the node represents a text entry key that is part of a keyboard or keypad. * * <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 isTextEntryKey {@code true} if the node is a text entry key, {@code false} otherwise. */ public void setTextEntryKey(boolean isTextEntryKey) { setBooleanProperty(BOOLEAN_PROPERTY_IS_TEXT_ENTRY_KEY, isTextEntryKey); } /** * Gets the package this node comes from. * Loading
core/tests/coretests/src/android/view/accessibility/AccessibilityNodeInfoTest.java +1 −1 Original line number Diff line number Diff line Loading @@ -57,7 +57,7 @@ public class AccessibilityNodeInfoTest { // The number of flags held in boolean properties. Their values should also be double-checked // in the methods above. private static final int NUM_BOOLEAN_PROPERTIES = 17; private static final int NUM_BOOLEAN_PROPERTIES = 18; @Test public void testStandardActions_serializationFlagIsValid() { Loading