Merge "Remove recycling references in A11yNodeInfo" into tm-dev
This commit is contained in:
@@ -1058,11 +1058,6 @@ public class AccessibilityNodeInfo implements Parcelable {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Refreshes this info with the latest state of the view it represents.
|
* 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>
|
|
||||||
*
|
*
|
||||||
* @param bypassCache Whether to bypass the cache.
|
* @param bypassCache Whether to bypass the cache.
|
||||||
* @return Whether the refresh succeeded.
|
* @return Whether the refresh succeeded.
|
||||||
@@ -1089,8 +1084,7 @@ public class AccessibilityNodeInfo implements Parcelable {
|
|||||||
* Refreshes this info with the latest state of the view it represents.
|
* Refreshes this info with the latest state of the view it represents.
|
||||||
*
|
*
|
||||||
* @return {@code true} if the refresh succeeded. {@code false} if the {@link View} represented
|
* @return {@code true} if the refresh succeeded. {@code false} if the {@link View} represented
|
||||||
* by this node is no longer in the view tree (and thus this node is obsolete and should be
|
* by this node is no longer in the view tree (and thus this node is obsolete).
|
||||||
* recycled).
|
|
||||||
*/
|
*/
|
||||||
public boolean refresh() {
|
public boolean refresh() {
|
||||||
return refresh(null, true);
|
return refresh(null, true);
|
||||||
@@ -1109,8 +1103,7 @@ public class AccessibilityNodeInfo implements Parcelable {
|
|||||||
* @param args A bundle of arguments for the request. These depend on the particular request.
|
* @param args A bundle of arguments for the request. These depend on the particular request.
|
||||||
*
|
*
|
||||||
* @return {@code true} if the refresh succeeded. {@code false} if the {@link View} represented
|
* @return {@code true} if the refresh succeeded. {@code false} if the {@link View} represented
|
||||||
* by this node is no longer in the view tree (and thus this node is obsolete and should be
|
* by this node is no longer in the view tree (and thus this node is obsolete).
|
||||||
* recycled).
|
|
||||||
*/
|
*/
|
||||||
public boolean refreshWithExtraData(String extraDataKey, Bundle args) {
|
public boolean refreshWithExtraData(String extraDataKey, Bundle args) {
|
||||||
// limits the text location length to make sure the rectangle array allocation avoids
|
// limits the text location length to make sure the rectangle array allocation avoids
|
||||||
@@ -1823,11 +1816,6 @@ public class AccessibilityNodeInfo implements Parcelable {
|
|||||||
* this info is the root of the traversed tree.
|
* this info is the root of the traversed tree.
|
||||||
*
|
*
|
||||||
* <p>
|
* <p>
|
||||||
* <strong>Note:</strong> It is a client responsibility to recycle the
|
|
||||||
* received info by calling {@link AccessibilityNodeInfo#recycle()}
|
|
||||||
* to avoid creating of multiple instances.
|
|
||||||
* </p>
|
|
||||||
* <p>
|
|
||||||
* <strong>Note:</strong> If this view hierarchy has a {@link SurfaceView} embedding another
|
* <strong>Note:</strong> If this view hierarchy has a {@link SurfaceView} embedding another
|
||||||
* view hierarchy via {@link SurfaceView#setChildSurfacePackage}, there is a limitation that
|
* view hierarchy via {@link SurfaceView#setChildSurfacePackage}, there is a limitation that
|
||||||
* this API won't be able to find the node for the view on the embedded view hierarchy. It's
|
* this API won't be able to find the node for the view on the embedded view hierarchy. It's
|
||||||
@@ -1855,11 +1843,6 @@ public class AccessibilityNodeInfo implements Parcelable {
|
|||||||
* resource name is "baz", the fully qualified resource id is "foo.bar:id/baz".
|
* resource name is "baz", the fully qualified resource id is "foo.bar:id/baz".
|
||||||
*
|
*
|
||||||
* <p>
|
* <p>
|
||||||
* <strong>Note:</strong> It is a client responsibility to recycle the
|
|
||||||
* received info by calling {@link AccessibilityNodeInfo#recycle()}
|
|
||||||
* to avoid creating of multiple instances.
|
|
||||||
* </p>
|
|
||||||
* <p>
|
|
||||||
* <strong>Note:</strong> The primary usage of this API is for UI test automation
|
* <strong>Note:</strong> The primary usage of this API is for UI test automation
|
||||||
* and in order to report the fully qualified view id if an {@link AccessibilityNodeInfo}
|
* and in order to report the fully qualified view id if an {@link AccessibilityNodeInfo}
|
||||||
* the client has to set the {@link AccessibilityServiceInfo#FLAG_REPORT_VIEW_IDS}
|
* the client has to set the {@link AccessibilityServiceInfo#FLAG_REPORT_VIEW_IDS}
|
||||||
@@ -3282,11 +3265,6 @@ public class AccessibilityNodeInfo implements Parcelable {
|
|||||||
/**
|
/**
|
||||||
* Gets the node info for which the view represented by this info serves as
|
* Gets the node info for which the view represented by this info serves as
|
||||||
* a label for accessibility purposes.
|
* a label for accessibility purposes.
|
||||||
* <p>
|
|
||||||
* <strong>Note:</strong> It is a client responsibility to recycle the
|
|
||||||
* received info by calling {@link AccessibilityNodeInfo#recycle()}
|
|
||||||
* to avoid creating of multiple instances.
|
|
||||||
* </p>
|
|
||||||
*
|
*
|
||||||
* @return The labeled info.
|
* @return The labeled info.
|
||||||
*/
|
*/
|
||||||
@@ -3334,11 +3312,6 @@ public class AccessibilityNodeInfo implements Parcelable {
|
|||||||
/**
|
/**
|
||||||
* Gets the node info which serves as the label of the view represented by
|
* Gets the node info which serves as the label of the view represented by
|
||||||
* this info for accessibility purposes.
|
* this info for accessibility purposes.
|
||||||
* <p>
|
|
||||||
* <strong>Note:</strong> It is a client responsibility to recycle the
|
|
||||||
* received info by calling {@link AccessibilityNodeInfo#recycle()}
|
|
||||||
* to avoid creating of multiple instances.
|
|
||||||
* </p>
|
|
||||||
*
|
*
|
||||||
* @return The label.
|
* @return The label.
|
||||||
*/
|
*/
|
||||||
@@ -5312,9 +5285,7 @@ public class AccessibilityNodeInfo implements Parcelable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class with information if a node is a range. Use
|
* Class with information if a node is a range.
|
||||||
* {@link RangeInfo#obtain(int, float, float, float)} to get an instance. Recycling is
|
|
||||||
* handled by the {@link AccessibilityNodeInfo} to which this object is attached.
|
|
||||||
*/
|
*/
|
||||||
public static final class RangeInfo {
|
public static final class RangeInfo {
|
||||||
|
|
||||||
@@ -5423,9 +5394,7 @@ public class AccessibilityNodeInfo implements Parcelable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class with information if a node is a collection. Use
|
* Class with information if a node is a collection.
|
||||||
* {@link CollectionInfo#obtain(int, int, boolean)} to get an instance. Recycling is
|
|
||||||
* handled by the {@link AccessibilityNodeInfo} to which this object is attached.
|
|
||||||
* <p>
|
* <p>
|
||||||
* A collection of items has rows and columns and may be hierarchical.
|
* A collection of items has rows and columns and may be hierarchical.
|
||||||
* For example, a horizontal list is a collection with one column, as
|
* For example, a horizontal list is a collection with one column, as
|
||||||
@@ -5591,10 +5560,7 @@ public class AccessibilityNodeInfo implements Parcelable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class with information if a node is a collection item. Use
|
* Class with information if a node is a collection item.
|
||||||
* {@link CollectionItemInfo#obtain(int, int, int, int, boolean)}
|
|
||||||
* to get an instance. Recycling is handled by the {@link AccessibilityNodeInfo} to which this
|
|
||||||
* object is attached.
|
|
||||||
* <p>
|
* <p>
|
||||||
* A collection item is contained in a collection, it starts at
|
* A collection item is contained in a collection, it starts at
|
||||||
* a given row and column in the collection, and spans one or
|
* a given row and column in the collection, and spans one or
|
||||||
@@ -6085,11 +6051,6 @@ public class AccessibilityNodeInfo implements Parcelable {
|
|||||||
* <p>
|
* <p>
|
||||||
* <strong>Note:</strong> This api can only be called from {@link AccessibilityService}.
|
* <strong>Note:</strong> This api can only be called from {@link AccessibilityService}.
|
||||||
* </p>
|
* </p>
|
||||||
* <p>
|
|
||||||
* <strong>Note:</strong> It is a client responsibility to recycle the
|
|
||||||
* received info by calling {@link AccessibilityNodeInfo#recycle()}
|
|
||||||
* to avoid creating of multiple instances.
|
|
||||||
* </p>
|
|
||||||
*
|
*
|
||||||
* @param region The region retrieved from {@link #getRegionAt(int)}.
|
* @param region The region retrieved from {@link #getRegionAt(int)}.
|
||||||
* @return The target node associates with the given region.
|
* @return The target node associates with the given region.
|
||||||
|
|||||||
Reference in New Issue
Block a user