Merge "Add displayid to WindowInfos test wrapper" into udc-dev am: 037c6556c5

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/23733612

Change-Id: Ia2a8d59e34f0f46969207b74a32feb485eef6576
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Alex Stetson
2023-06-20 22:21:39 +00:00
committed by Automerger Merge Worker
2 changed files with 11 additions and 4 deletions

View File

@@ -4161,6 +4161,7 @@ package android.window {
public static class WindowInfosListenerForTest.WindowInfo {
field @NonNull public final android.graphics.Rect bounds;
field public final int displayId;
field public final boolean isTrustedOverlay;
field public final boolean isVisible;
field @NonNull public final String name;

View File

@@ -57,6 +57,11 @@ public class WindowInfosListenerForTest {
@NonNull
public final String name;
/**
* The display id the window is on.
*/
public final int displayId;
/**
* The window's position and size in display space.
*/
@@ -73,10 +78,11 @@ public class WindowInfosListenerForTest {
*/
public final boolean isVisible;
WindowInfo(@NonNull IBinder windowToken, @NonNull String name, @NonNull Rect bounds,
int inputConfig) {
WindowInfo(@NonNull IBinder windowToken, @NonNull String name, int displayId,
@NonNull Rect bounds, int inputConfig) {
this.windowToken = windowToken;
this.name = name;
this.displayId = displayId;
this.bounds = bounds;
this.isTrustedOverlay = (inputConfig & InputConfig.TRUSTED_OVERLAY) != 0;
this.isVisible = (inputConfig & InputConfig.NOT_VISIBLE) == 0;
@@ -139,8 +145,8 @@ public class WindowInfosListenerForTest {
for (var handle : windowHandles) {
var bounds = new Rect(handle.frameLeft, handle.frameTop, handle.frameRight,
handle.frameBottom);
windowInfos.add(new WindowInfo(handle.getWindowToken(), handle.name, bounds,
handle.inputConfig));
windowInfos.add(new WindowInfo(handle.getWindowToken(), handle.name, handle.displayId,
bounds, handle.inputConfig));
}
return windowInfos;
}