Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5b8c497f authored by Hiroki Sato's avatar Hiroki Sato Committed by Automerger Merge Worker
Browse files

Merge "Expose invisible windows from WindowInfosListenerForTest" into udc-dev...

Merge "Expose invisible windows from WindowInfosListenerForTest" into udc-dev am: 31781318 am: 6cc87634

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



Change-Id: Ibca4c4b535aa7e5e0ff787983929a9a32f01d692
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 4ac266ab 6cc87634
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -4156,6 +4156,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 boolean isTrustedOverlay;
    field public final boolean isTrustedOverlay;
    field public final boolean isVisible;
    field @NonNull public final String name;
    field @NonNull public final String name;
    field @NonNull public final android.os.IBinder windowToken;
    field @NonNull public final android.os.IBinder windowToken;
  }
  }
+6 −3
Original line number Original line Diff line number Diff line
@@ -68,12 +68,18 @@ public class WindowInfosListenerForTest {
         */
         */
        public final boolean isTrustedOverlay;
        public final boolean isTrustedOverlay;


        /**
         * True if the window is visible.
         */
        public final boolean isVisible;

        WindowInfo(@NonNull IBinder windowToken, @NonNull String name, @NonNull Rect bounds,
        WindowInfo(@NonNull IBinder windowToken, @NonNull String name, @NonNull Rect bounds,
                int inputConfig) {
                int inputConfig) {
            this.windowToken = windowToken;
            this.windowToken = windowToken;
            this.name = name;
            this.name = name;
            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;
        }
        }
    }
    }


@@ -131,9 +137,6 @@ public class WindowInfosListenerForTest {
    private static List<WindowInfo> buildWindowInfos(InputWindowHandle[] windowHandles) {
    private static List<WindowInfo> buildWindowInfos(InputWindowHandle[] windowHandles) {
        var windowInfos = new ArrayList<WindowInfo>(windowHandles.length);
        var windowInfos = new ArrayList<WindowInfo>(windowHandles.length);
        for (var handle : windowHandles) {
        for (var handle : windowHandles) {
            if ((handle.inputConfig & InputConfig.NOT_VISIBLE) != 0) {
                continue;
            }
            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, bounds,