Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b5c5bb0d authored by Svetoslav's avatar Svetoslav Committed by Android (Google) Code Review
Browse files

Merge "NPE in AccessibilityNodeInfoCahce."

parents 7b57d616 375e23a6
Loading
Loading
Loading
Loading
+7 −5
Original line number Diff line number Diff line
@@ -174,6 +174,7 @@ public class AccessibilityNodeInfoCache {
                    // subtrees in the cache.
                    // TODO: Runs in O(n^2), could optimize to O(n + n log n)
                    final LongArray newChildrenIds = info.getChildNodeIds();
                    if (newChildrenIds != null) {
                        final int oldChildCount = oldInfo.getChildCount();
                        for (int i = 0; i < oldChildCount; i++) {
                            final long oldChildId = oldInfo.getChildId(i);
@@ -181,6 +182,7 @@ public class AccessibilityNodeInfoCache {
                                clearSubTreeLocked(oldChildId);
                            }
                        }
                    }

                    // Also be careful if the parent has changed since the new
                    // parent may be a predecessor of the old parent which will