summaryrefslogtreecommitdiff
path: root/core/java/android/view/accessibility/AccessibilityCache.java
diff options
context:
space:
mode:
Diffstat (limited to 'core/java/android/view/accessibility/AccessibilityCache.java')
-rw-r--r--core/java/android/view/accessibility/AccessibilityCache.java14
1 files changed, 3 insertions, 11 deletions
diff --git a/core/java/android/view/accessibility/AccessibilityCache.java b/core/java/android/view/accessibility/AccessibilityCache.java
index 0e1e379d610a..da5a1cd67922 100644
--- a/core/java/android/view/accessibility/AccessibilityCache.java
+++ b/core/java/android/view/accessibility/AccessibilityCache.java
@@ -418,28 +418,20 @@ public class AccessibilityCache {
*
* @param nodes The nodes in the hosting window.
* @param rootNodeId The id of the root to evict.
- *
- * @return {@code true} if the cache was cleared
*/
- private boolean clearSubTreeRecursiveLocked(LongSparseArray<AccessibilityNodeInfo> nodes,
+ private void clearSubTreeRecursiveLocked(LongSparseArray<AccessibilityNodeInfo> nodes,
long rootNodeId) {
AccessibilityNodeInfo current = nodes.get(rootNodeId);
if (current == null) {
- // The node isn't in the cache, but its descendents might be.
- clear();
- return true;
+ return;
}
nodes.remove(rootNodeId);
final int childCount = current.getChildCount();
for (int i = 0; i < childCount; i++) {
final long childNodeId = current.getChildId(i);
- if (clearSubTreeRecursiveLocked(nodes, childNodeId)) {
- current.recycle();
- return true;
- }
+ clearSubTreeRecursiveLocked(nodes, childNodeId);
}
current.recycle();
- return false;
}
/**