Drop the cloned windows from visible window list

Currently the cloned windows is avaialbe from window list,
however the node info from the cloned window is incorrect.
To avoid confusion, we would drop them for a short term solution.

Bug: 230300971
Test: manually test with switchaccess
      adb shell dumpsys accessibility to observe the window list
Change-Id: I7a03376567698a493c9eb5e26d1f3390aacdb408
This commit is contained in:
ryanlwlin
2022-05-31 13:48:08 +08:00
parent 3aa0a120b1
commit 70764c141a
2 changed files with 2 additions and 1 deletions

View File

@@ -210,6 +210,7 @@ public final class InputWindowHandle {
.append(", scaleFactor=").append(scaleFactor)
.append(", transform=").append(transform)
.append(", windowToken=").append(windowToken)
.append(", isClone=").append(isClone)
.toString();
}

View File

@@ -154,7 +154,7 @@ public final class AccessibilityWindowsPopulator extends WindowInfosListener {
for (InputWindowHandle window : windowHandles) {
final boolean visible = (window.inputConfig & InputConfig.NOT_VISIBLE) == 0;
if (visible && window.getWindow() != null) {
if (visible && window.getWindow() != null && !window.isClone) {
tempVisibleWindows.add(window);
}
}