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

Commit 375e23a6 authored by Svetoslav's avatar Svetoslav
Browse files

NPE in AccessibilityNodeInfoCahce.

Change-Id: I2401e40842ef4ae47bba0a30a5e2589c11e488bc
parent 11007143
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