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

Commit 32569caa authored by Guang Zhu's avatar Guang Zhu
Browse files

reduce error logs from disconnected AccessibilityNodeInfo's

ChromeView generates a large amount of such logs; while the real
root cause is being fixed, reduce the verbosity so other
interesting logs won't get overwritten.

Bug: 10871032
Change-Id: If42116671062d7b2cc2a13384424575da499c493
parent f556adf4
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));
            }
        }
    }
}