Merge "Add displayid to WindowInfos test wrapper" into udc-dev
This commit is contained in:
@@ -4157,6 +4157,7 @@ package android.window {
|
|||||||
|
|
||||||
public static class WindowInfosListenerForTest.WindowInfo {
|
public static class WindowInfosListenerForTest.WindowInfo {
|
||||||
field @NonNull public final android.graphics.Rect bounds;
|
field @NonNull public final android.graphics.Rect bounds;
|
||||||
|
field public final int displayId;
|
||||||
field public final boolean isTrustedOverlay;
|
field public final boolean isTrustedOverlay;
|
||||||
field public final boolean isVisible;
|
field public final boolean isVisible;
|
||||||
field @NonNull public final String name;
|
field @NonNull public final String name;
|
||||||
|
|||||||
@@ -57,6 +57,11 @@ public class WindowInfosListenerForTest {
|
|||||||
@NonNull
|
@NonNull
|
||||||
public final String name;
|
public final String name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The display id the window is on.
|
||||||
|
*/
|
||||||
|
public final int displayId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The window's position and size in display space.
|
* The window's position and size in display space.
|
||||||
*/
|
*/
|
||||||
@@ -73,10 +78,11 @@ public class WindowInfosListenerForTest {
|
|||||||
*/
|
*/
|
||||||
public final boolean isVisible;
|
public final boolean isVisible;
|
||||||
|
|
||||||
WindowInfo(@NonNull IBinder windowToken, @NonNull String name, @NonNull Rect bounds,
|
WindowInfo(@NonNull IBinder windowToken, @NonNull String name, int displayId,
|
||||||
int inputConfig) {
|
@NonNull Rect bounds, int inputConfig) {
|
||||||
this.windowToken = windowToken;
|
this.windowToken = windowToken;
|
||||||
this.name = name;
|
this.name = name;
|
||||||
|
this.displayId = displayId;
|
||||||
this.bounds = bounds;
|
this.bounds = bounds;
|
||||||
this.isTrustedOverlay = (inputConfig & InputConfig.TRUSTED_OVERLAY) != 0;
|
this.isTrustedOverlay = (inputConfig & InputConfig.TRUSTED_OVERLAY) != 0;
|
||||||
this.isVisible = (inputConfig & InputConfig.NOT_VISIBLE) == 0;
|
this.isVisible = (inputConfig & InputConfig.NOT_VISIBLE) == 0;
|
||||||
@@ -139,8 +145,8 @@ public class WindowInfosListenerForTest {
|
|||||||
for (var handle : windowHandles) {
|
for (var handle : windowHandles) {
|
||||||
var bounds = new Rect(handle.frameLeft, handle.frameTop, handle.frameRight,
|
var bounds = new Rect(handle.frameLeft, handle.frameTop, handle.frameRight,
|
||||||
handle.frameBottom);
|
handle.frameBottom);
|
||||||
windowInfos.add(new WindowInfo(handle.getWindowToken(), handle.name, bounds,
|
windowInfos.add(new WindowInfo(handle.getWindowToken(), handle.name, handle.displayId,
|
||||||
handle.inputConfig));
|
bounds, handle.inputConfig));
|
||||||
}
|
}
|
||||||
return windowInfos;
|
return windowInfos;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user