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

Commit 831663d8 authored by Guang Zhu's avatar Guang Zhu Committed by Android (Google) Code Review
Browse files

Merge "reduce error logs from disconnected AccessibilityNodeInfo's"

parents d39ccd0a 32569caa
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -312,18 +312,25 @@ public class AccessibilityNodeInfoCache {
                }
            }

            int disconnectedNodeCount = 0;
            // Check for disconnected nodes or ones from another window.
            for (int i = 0; i < mCacheImpl.size(); i++) {
                AccessibilityNodeInfo info = mCacheImpl.valueAt(i);
                if (!seen.contains(info)) {
                    if (info.getWindowId() == windowId) {
                        Log.e(LOG_TAG, "Disconneced node: " + info);
                        if (DEBUG) {
                            Log.e(LOG_TAG, "Disconnected node: " + info);
                        }
                        disconnectedNodeCount++;
                    } else {
                        Log.e(LOG_TAG, "Node from: " + info.getWindowId() + " not from:"
                                + windowId + " " + info);
                    }
                }
            }
            if (disconnectedNodeCount > 0) {
                Log.e(LOG_TAG, String.format("Found %d disconnected nodes", disconnectedNodeCount));
            }
        }
    }
}