Loading api/current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -26240,6 +26240,7 @@ package android.view.accessibility { method public boolean performAction(int); method public boolean performAction(int, android.os.Bundle); method public void recycle(); method public boolean refresh(); method public void setAccessibilityFocused(boolean); method public void setBoundsInParent(android.graphics.Rect); method public void setBoundsInScreen(android.graphics.Rect); core/java/android/view/accessibility/AccessibilityNodeInfo.java +25 −0 Original line number Diff line number Diff line Loading @@ -485,6 +485,31 @@ public class AccessibilityNodeInfo implements Parcelable { return mWindowId; } /** * Refreshes this info with the latest state of the view it represents. * <p> * <strong>Note:</strong> If this method returns false this info is obsolete * since it represents a view that is no longer in the view tree and should * be recycled. * </p> * @return Whether the refresh succeeded. */ public boolean refresh() { enforceSealed(); if (!canPerformRequestOverConnection(mSourceNodeId)) { return false; } AccessibilityInteractionClient client = AccessibilityInteractionClient.getInstance(); AccessibilityNodeInfo refreshedInfo = client.findAccessibilityNodeInfoByAccessibilityId( mConnectionId, mWindowId, mSourceNodeId, 0); if (refreshedInfo == null) { return false; } init(refreshedInfo); refreshedInfo.recycle(); return true; } /** * @return The ids of the children. * Loading Loading
api/current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -26240,6 +26240,7 @@ package android.view.accessibility { method public boolean performAction(int); method public boolean performAction(int, android.os.Bundle); method public void recycle(); method public boolean refresh(); method public void setAccessibilityFocused(boolean); method public void setBoundsInParent(android.graphics.Rect); method public void setBoundsInScreen(android.graphics.Rect);
core/java/android/view/accessibility/AccessibilityNodeInfo.java +25 −0 Original line number Diff line number Diff line Loading @@ -485,6 +485,31 @@ public class AccessibilityNodeInfo implements Parcelable { return mWindowId; } /** * Refreshes this info with the latest state of the view it represents. * <p> * <strong>Note:</strong> If this method returns false this info is obsolete * since it represents a view that is no longer in the view tree and should * be recycled. * </p> * @return Whether the refresh succeeded. */ public boolean refresh() { enforceSealed(); if (!canPerformRequestOverConnection(mSourceNodeId)) { return false; } AccessibilityInteractionClient client = AccessibilityInteractionClient.getInstance(); AccessibilityNodeInfo refreshedInfo = client.findAccessibilityNodeInfoByAccessibilityId( mConnectionId, mWindowId, mSourceNodeId, 0); if (refreshedInfo == null) { return false; } init(refreshedInfo); refreshedInfo.recycle(); return true; } /** * @return The ids of the children. * Loading