diff --git a/tests/FlickerTests/src/com/android/server/wm/flicker/CommonAssertions.kt b/tests/FlickerTests/src/com/android/server/wm/flicker/CommonAssertions.kt index abd8758383fa5..1a77785150742 100644 --- a/tests/FlickerTests/src/com/android/server/wm/flicker/CommonAssertions.kt +++ b/tests/FlickerTests/src/com/android/server/wm/flicker/CommonAssertions.kt @@ -283,9 +283,9 @@ fun LegacyFlickerTest.snapshotStartingWindowLayerCoversExactlyOnApp( .mapNotNull { snapshotLayer -> snapshotLayer.layer.visibleRegion } .toTypedArray() val snapshotRegion = RegionSubject(visibleAreas, it.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) + if (snapshotRegion.region.isNotEmpty && appVisibleRegion.region.isNotEmpty) { snapshotRegion.coversExactly(appVisibleRegion.region) } } diff --git a/tests/FlickerTests/src/com/android/server/wm/flicker/ime/ShowImeOnAppStartWhenLaunchingAppFromFixedOrientationTest.kt b/tests/FlickerTests/src/com/android/server/wm/flicker/ime/ShowImeOnAppStartWhenLaunchingAppFromFixedOrientationTest.kt index 0ee07483eaa67..ea7c7c4276dcf 100644 --- a/tests/FlickerTests/src/com/android/server/wm/flicker/ime/ShowImeOnAppStartWhenLaunchingAppFromFixedOrientationTest.kt +++ b/tests/FlickerTests/src/com/android/server/wm/flicker/ime/ShowImeOnAppStartWhenLaunchingAppFromFixedOrientationTest.kt @@ -73,7 +73,7 @@ class ShowImeOnAppStartWhenLaunchingAppFromFixedOrientationTest(flicker: LegacyF @Presubmit @Test fun imeLayerBecomesVisible() = flicker.imeLayerBecomesVisible() - @FlakyTest(bugId = 293096776) + @Presubmit @Test fun snapshotStartingWindowLayerCoversExactlyOnApp() { flicker.snapshotStartingWindowLayerCoversExactlyOnApp(imeTestApp)