diff options
| -rw-r--r-- | core/api/test-current.txt | 1 | ||||
| -rw-r--r-- | core/java/android/window/WindowInfosListenerForTest.java | 15 |
2 files changed, 13 insertions, 3 deletions
diff --git a/core/api/test-current.txt b/core/api/test-current.txt index cf26e12dc761..43303865e01a 100644 --- a/core/api/test-current.txt +++ b/core/api/test-current.txt @@ -4235,6 +4235,7 @@ package android.window { field public final boolean isTrustedOverlay; field public final boolean isVisible; field @NonNull public final String name; + field @NonNull public final android.graphics.Matrix transform; field @NonNull public final android.os.IBinder windowToken; } diff --git a/core/java/android/window/WindowInfosListenerForTest.java b/core/java/android/window/WindowInfosListenerForTest.java index bdbce134801d..be88e53ad507 100644 --- a/core/java/android/window/WindowInfosListenerForTest.java +++ b/core/java/android/window/WindowInfosListenerForTest.java @@ -20,6 +20,7 @@ import android.Manifest; import android.annotation.NonNull; import android.annotation.RequiresPermission; import android.annotation.TestApi; +import android.graphics.Matrix; import android.graphics.Rect; import android.os.IBinder; import android.os.InputConfig; @@ -78,14 +79,21 @@ public class WindowInfosListenerForTest { */ public final boolean isVisible; + /** + * Return the transform to get the bounds from display space into window space. + */ + @NonNull + public final Matrix transform; + WindowInfo(@NonNull IBinder windowToken, @NonNull String name, int displayId, - @NonNull Rect bounds, int inputConfig) { + @NonNull Rect bounds, int inputConfig, @NonNull Matrix transform) { 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; + this.transform = transform; } @Override @@ -94,7 +102,8 @@ public class WindowInfosListenerForTest { + ", frame=" + bounds + ", isVisible=" + isVisible + ", isTrustedOverlay=" + isTrustedOverlay - + ", token=" + windowToken; + + ", token=" + windowToken + + ", transform=" + transform; } } @@ -155,7 +164,7 @@ public class WindowInfosListenerForTest { var bounds = new Rect(handle.frameLeft, handle.frameTop, handle.frameRight, handle.frameBottom); windowInfos.add(new WindowInfo(handle.getWindowToken(), handle.name, handle.displayId, - bounds, handle.inputConfig)); + bounds, handle.inputConfig, handle.transform)); } return windowInfos; } |