diff options
| author | 2023-06-20 22:19:38 +0000 | |
|---|---|---|
| committer | 2023-06-20 22:19:38 +0000 | |
| commit | b4e4aca88be45e896bc96a991e47a89995809a71 (patch) | |
| tree | 7a2eeb8d049766f6a83c21fadc866eda8d86e24c | |
| parent | 31be982921ce6aee8e8699f240e9cc5b3e2da086 (diff) | |
| parent | 037c6556c54fbe5df0cac9c90a12308677ec7293 (diff) | |
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: I873309c6c16dd5ff2f149ced882881f299c6989b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
| -rw-r--r-- | core/api/test-current.txt | 1 | ||||
| -rw-r--r-- | core/java/android/window/WindowInfosListenerForTest.java | 14 |
2 files changed, 11 insertions, 4 deletions
diff --git a/core/api/test-current.txt b/core/api/test-current.txt index 9bd29700a12d..0c9569f730cd 100644 --- a/core/api/test-current.txt +++ b/core/api/test-current.txt @@ -4157,6 +4157,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; diff --git a/core/java/android/window/WindowInfosListenerForTest.java b/core/java/android/window/WindowInfosListenerForTest.java index cfbeeffb91a6..25bf85cfaa58 100644 --- a/core/java/android/window/WindowInfosListenerForTest.java +++ b/core/java/android/window/WindowInfosListenerForTest.java @@ -58,6 +58,11 @@ public class WindowInfosListenerForTest { public final String name; /** + * The display id the window is on. + */ + public final int displayId; + + /** * The window's position and size in display space. */ @NonNull @@ -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; } |