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

Commit 4e81bb76 authored by Nataniel Borges's avatar Nataniel Borges Committed by Automerger Merge Worker
Browse files

Merge "Cleanup snapshotStartingWindowLayerCoversExactlyOnApp assertion" into...

Merge "Cleanup snapshotStartingWindowLayerCoversExactlyOnApp assertion" into udc-qpr-dev am: ea0f7d80 am: 1df8e8ef

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



Change-Id: If3e26df728066bdec451d2b65ca47e5e8f09457e
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents a9683b67 1df8e8ef
Loading
Loading
Loading
Loading
+8 −10
Original line number Diff line number Diff line
@@ -255,24 +255,22 @@ fun LegacyFlickerTest.snapshotStartingWindowLayerCoversExactlyOnApp(
        invoke("snapshotStartingWindowLayerCoversExactlyOnApp") {
            val snapshotLayers =
                it.subjects.filter { subject ->
                    subject.name.contains(ComponentNameMatcher.SNAPSHOT.toLayerName()) &&
                    ComponentNameMatcher.SNAPSHOT.layerMatchesAnyOf(subject.layer) &&
                        subject.isVisible
                }
            // Verify the size of snapshotRegion covers appVisibleRegion exactly in animation.
            if (snapshotLayers.isNotEmpty()) {
            val visibleAreas =
                snapshotLayers
                    .mapNotNull { snapshotLayer -> snapshotLayer.layer.visibleRegion }
                    .toTypedArray()
            val snapshotRegion = RegionSubject(visibleAreas, timestamp)
                val appVisibleRegion = it.visibleRegion(component)
            // Verify the size of snapshotRegion covers appVisibleRegion exactly in animation.
            if (snapshotRegion.region.isNotEmpty) {
                val appVisibleRegion = it.visibleRegion(component)
                snapshotRegion.coversExactly(appVisibleRegion.region)
            }
        }
    }
}
}

/**
 * Asserts that: