Merge "reduce error logs from disconnected AccessibilityNodeInfo's"

This commit is contained in:
Guang Zhu
2014-02-13 18:45:24 +00:00
committed by Android (Google) Code Review

View File

@@ -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));
}
}
}
}