diff --git a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/CommonAssertions.kt b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/CommonAssertions.kt index 4ff2bfca3a4ae..8c4f5468906f4 100644 --- a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/CommonAssertions.kt +++ b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/CommonAssertions.kt @@ -26,7 +26,7 @@ fun WmAssertion.statusBarWindowIsAlwaysVisible( bugId: Int = 0, enabled: Boolean = bugId == 0 ) { - all("statusBarWindowIsAlwaysVisible", enabled, bugId) { + all("statusBarWindowIsAlwaysVisible", bugId, enabled) { this.showsAboveAppWindow(FlickerTestBase.STATUS_BAR_WINDOW_TITLE) } } @@ -36,7 +36,7 @@ fun WmAssertion.navBarWindowIsAlwaysVisible( bugId: Int = 0, enabled: Boolean = bugId == 0 ) { - all("navBarWindowIsAlwaysVisible", enabled, bugId) { + all("navBarWindowIsAlwaysVisible", bugId, enabled) { this.showsAboveAppWindow(FlickerTestBase.NAVIGATION_BAR_WINDOW_TITLE) } } @@ -52,7 +52,7 @@ fun LayersAssertion.noUncoveredRegions( val startingBounds = WindowUtils.getDisplayBounds(beginRotation) val endingBounds = WindowUtils.getDisplayBounds(endRotation) if (allStates) { - all("noUncoveredRegions", enabled, bugId) { + all("noUncoveredRegions", bugId, enabled) { if (startingBounds == endingBounds) { this.coversAtLeastRegion(startingBounds) } else { @@ -76,7 +76,7 @@ fun LayersAssertion.navBarLayerIsAlwaysVisible( bugId: Int = 0, enabled: Boolean = bugId == 0 ) { - all("navBarLayerIsAlwaysVisible", enabled, bugId) { + all("navBarLayerIsAlwaysVisible", bugId, enabled) { this.showsLayer(FlickerTestBase.NAVIGATION_BAR_WINDOW_TITLE) } } @@ -86,7 +86,7 @@ fun LayersAssertion.statusBarLayerIsAlwaysVisible( bugId: Int = 0, enabled: Boolean = bugId == 0 ) { - all("statusBarLayerIsAlwaysVisible", enabled, bugId) { + all("statusBarLayerIsAlwaysVisible", bugId, enabled) { this.showsLayer(FlickerTestBase.STATUS_BAR_WINDOW_TITLE) } } @@ -101,15 +101,15 @@ fun LayersAssertion.navBarLayerRotatesAndScales( val startingPos = WindowUtils.getNavigationBarPosition(beginRotation) val endingPos = WindowUtils.getNavigationBarPosition(endRotation) - start("navBarLayerRotatesAndScales_StartingPos", enabled, bugId) { + start("navBarLayerRotatesAndScales_StartingPos", bugId, enabled) { this.hasVisibleRegion(FlickerTestBase.NAVIGATION_BAR_WINDOW_TITLE, startingPos) } - end("navBarLayerRotatesAndScales_EndingPost", enabled, bugId) { + end("navBarLayerRotatesAndScales_EndingPost", bugId, enabled) { this.hasVisibleRegion(FlickerTestBase.NAVIGATION_BAR_WINDOW_TITLE, endingPos) } if (startingPos == endingPos) { - all("navBarLayerRotatesAndScales", enabled, bugId) { + all("navBarLayerRotatesAndScales", bugId, enabled) { this.hasVisibleRegion(FlickerTestBase.NAVIGATION_BAR_WINDOW_TITLE, startingPos) } } @@ -125,10 +125,10 @@ fun LayersAssertion.statusBarLayerRotatesScales( val startingPos = WindowUtils.getStatusBarPosition(beginRotation) val endingPos = WindowUtils.getStatusBarPosition(endRotation) - start("statusBarLayerRotatesScales_StartingPos", enabled, bugId) { + start("statusBarLayerRotatesScales_StartingPos", bugId, enabled) { this.hasVisibleRegion(FlickerTestBase.STATUS_BAR_WINDOW_TITLE, startingPos) } - end("statusBarLayerRotatesScales_EndingPos", enabled, bugId) { + end("statusBarLayerRotatesScales_EndingPos", bugId, enabled) { this.hasVisibleRegion(FlickerTestBase.STATUS_BAR_WINDOW_TITLE, endingPos) } } 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 58b3992b22448..6b974ff8eba34 100644 --- a/tests/FlickerTests/src/com/android/server/wm/flicker/CommonAssertions.kt +++ b/tests/FlickerTests/src/com/android/server/wm/flicker/CommonAssertions.kt @@ -30,7 +30,7 @@ fun WmAssertion.statusBarWindowIsAlwaysVisible( bugId: Int = 0, enabled: Boolean = bugId == 0 ) { - all("statusBarWindowIsAlwaysVisible", enabled, bugId) { + all("statusBarWindowIsAlwaysVisible", bugId, enabled) { this.showsAboveAppWindow(STATUS_BAR_WINDOW_TITLE) } } @@ -40,7 +40,7 @@ fun WmAssertion.navBarWindowIsAlwaysVisible( bugId: Int = 0, enabled: Boolean = bugId == 0 ) { - all("navBarWindowIsAlwaysVisible", enabled, bugId) { + all("navBarWindowIsAlwaysVisible", bugId, enabled) { this.showsAboveAppWindow(NAVIGATION_BAR_WINDOW_TITLE) } } @@ -56,7 +56,7 @@ fun LayersAssertion.noUncoveredRegions( val startingBounds = WindowUtils.getDisplayBounds(beginRotation) val endingBounds = WindowUtils.getDisplayBounds(endRotation) if (allStates) { - all("noUncoveredRegions", enabled, bugId) { + all("noUncoveredRegions", bugId, enabled) { if (startingBounds == endingBounds) { this.coversAtLeastRegion(startingBounds) } else { @@ -82,7 +82,7 @@ fun LayersAssertion.navBarLayerIsAlwaysVisible( enabled: Boolean = bugId == 0 ) { if (rotatesScreen) { - all("navBarLayerIsAlwaysVisible", enabled, bugId) { + all("navBarLayerIsAlwaysVisible", bugId, enabled) { this.showsLayer(NAVIGATION_BAR_WINDOW_TITLE) .then() .hidesLayer(NAVIGATION_BAR_WINDOW_TITLE) @@ -90,7 +90,7 @@ fun LayersAssertion.navBarLayerIsAlwaysVisible( .showsLayer(NAVIGATION_BAR_WINDOW_TITLE) } } else { - all("navBarLayerIsAlwaysVisible", enabled, bugId) { + all("navBarLayerIsAlwaysVisible", bugId, enabled) { this.showsLayer(NAVIGATION_BAR_WINDOW_TITLE) } } @@ -103,7 +103,7 @@ fun LayersAssertion.statusBarLayerIsAlwaysVisible( enabled: Boolean = bugId == 0 ) { if (rotatesScreen) { - all("statusBarLayerIsAlwaysVisible", enabled, bugId) { + all("statusBarLayerIsAlwaysVisible", bugId, enabled) { this.showsLayer(STATUS_BAR_WINDOW_TITLE) .then() hidesLayer(STATUS_BAR_WINDOW_TITLE) @@ -111,7 +111,7 @@ fun LayersAssertion.statusBarLayerIsAlwaysVisible( .showsLayer(STATUS_BAR_WINDOW_TITLE) } } else { - all("statusBarLayerIsAlwaysVisible", enabled, bugId) { + all("statusBarLayerIsAlwaysVisible", bugId, enabled) { this.showsLayer(STATUS_BAR_WINDOW_TITLE) } } @@ -127,10 +127,10 @@ fun LayersAssertion.navBarLayerRotatesAndScales( val startingPos = WindowUtils.getNavigationBarPosition(beginRotation) val endingPos = WindowUtils.getNavigationBarPosition(endRotation) - start("navBarLayerRotatesAndScales_StartingPos", enabled, bugId) { + start("navBarLayerRotatesAndScales_StartingPos", bugId, enabled) { this.hasVisibleRegion(NAVIGATION_BAR_WINDOW_TITLE, startingPos) } - end("navBarLayerRotatesAndScales_EndingPost", enabled, bugId) { + end("navBarLayerRotatesAndScales_EndingPost", bugId, enabled) { this.hasVisibleRegion(NAVIGATION_BAR_WINDOW_TITLE, endingPos) } @@ -151,10 +151,10 @@ fun LayersAssertion.statusBarLayerRotatesScales( val startingPos = WindowUtils.getStatusBarPosition(beginRotation) val endingPos = WindowUtils.getStatusBarPosition(endRotation) - start("statusBarLayerRotatesScales_StartingPos", enabled, bugId) { + start("statusBarLayerRotatesScales_StartingPos", bugId, enabled) { this.hasVisibleRegion(STATUS_BAR_WINDOW_TITLE, startingPos) } - end("statusBarLayerRotatesScales_EndingPos", enabled, bugId) { + end("statusBarLayerRotatesScales_EndingPos", bugId, enabled) { this.hasVisibleRegion(STATUS_BAR_WINDOW_TITLE, endingPos) } } diff --git a/tests/FlickerTests/src/com/android/server/wm/flicker/ime/CommonAssertions.kt b/tests/FlickerTests/src/com/android/server/wm/flicker/ime/CommonAssertions.kt index b2be54fe068a2..579862483576c 100644 --- a/tests/FlickerTests/src/com/android/server/wm/flicker/ime/CommonAssertions.kt +++ b/tests/FlickerTests/src/com/android/server/wm/flicker/ime/CommonAssertions.kt @@ -27,7 +27,7 @@ fun LayersAssertion.imeLayerBecomesVisible( bugId: Int = 0, enabled: Boolean = bugId == 0 ) { - all("imeLayerBecomesVisible", enabled, bugId) { + all("imeLayerBecomesVisible", bugId, enabled) { this.hidesLayer(IME_WINDOW_TITLE) .then() .showsLayer(IME_WINDOW_TITLE) @@ -38,7 +38,7 @@ fun LayersAssertion.imeLayerBecomesInvisible( bugId: Int = 0, enabled: Boolean = bugId == 0 ) { - all("imeLayerBecomesInvisible", enabled, bugId) { + all("imeLayerBecomesInvisible", bugId, enabled) { this.showsLayer(IME_WINDOW_TITLE) .then() .hidesLayer(IME_WINDOW_TITLE) @@ -50,7 +50,7 @@ fun LayersAssertion.imeAppLayerIsAlwaysVisible( bugId: Int = 0, enabled: Boolean = bugId == 0 ) { - all("imeAppLayerIsAlwaysVisible", enabled, bugId) { + all("imeAppLayerIsAlwaysVisible", bugId, enabled) { this.showsLayer(testApp.getPackage()) } } @@ -60,7 +60,7 @@ fun WmAssertion.imeAppWindowIsAlwaysVisible( bugId: Int = 0, enabled: Boolean = bugId == 0 ) { - all("imeAppWindowIsAlwaysVisible", enabled, bugId) { + all("imeAppWindowIsAlwaysVisible", bugId, enabled) { this.showsAppWindowOnTop(testApp.getPackage()) } } @@ -69,7 +69,7 @@ fun WmAssertion.imeWindowBecomesInvisible( bugId: Int = 0, enabled: Boolean = bugId == 0 ) { - all("imeWindowBecomesInvisible", enabled, bugId) { + all("imeWindowBecomesInvisible", bugId, enabled) { this.showsNonAppWindow(IME_WINDOW_TITLE) .then() .hidesNonAppWindow(IME_WINDOW_TITLE) @@ -81,7 +81,7 @@ fun WmAssertion.imeAppWindowBecomesInvisible( bugId: Int = 0, enabled: Boolean = bugId == 0 ) { - all("imeAppWindowBecomesInvisible", enabled, bugId) { + all("imeAppWindowBecomesInvisible", bugId, enabled) { this.showsAppWindowOnTop(testApp.getPackage()) .then() .appWindowNotOnTop(testApp.getPackage()) @@ -93,7 +93,7 @@ fun LayersAssertion.imeAppLayerBecomesInvisible( bugId: Int = 0, enabled: Boolean = bugId == 0 ) { - all("imeAppLayerBecomesInvisible", enabled, bugId) { + all("imeAppLayerBecomesInvisible", bugId, enabled) { this.skipUntilFirstAssertion() .showsLayer(testApp.getPackage()) .then() diff --git a/tests/FlickerTests/src/com/android/server/wm/flicker/launch/CommonAssertions.kt b/tests/FlickerTests/src/com/android/server/wm/flicker/launch/CommonAssertions.kt index 7e857f3b56c0c..d31c4ba1f9f3e 100644 --- a/tests/FlickerTests/src/com/android/server/wm/flicker/launch/CommonAssertions.kt +++ b/tests/FlickerTests/src/com/android/server/wm/flicker/launch/CommonAssertions.kt @@ -24,7 +24,7 @@ fun WmAssertion.wallpaperWindowBecomesInvisible( bugId: Int = 0, enabled: Boolean = bugId == 0 ) { - all("wallpaperWindowBecomesInvisible", enabled, bugId) { + all("wallpaperWindowBecomesInvisible", bugId, enabled) { this.showsBelowAppWindow("Wallpaper") .then() .hidesBelowAppWindow("Wallpaper") @@ -36,7 +36,7 @@ fun WmAssertion.appWindowReplacesLauncherAsTopWindow( bugId: Int = 0, enabled: Boolean = bugId == 0 ) { - all("appWindowReplacesLauncherAsTopWindow", enabled, bugId) { + all("appWindowReplacesLauncherAsTopWindow", bugId, enabled) { this.showsAppWindowOnTop("Launcher") .then() .showsAppWindowOnTop("Snapshot", testApp.getPackage()) @@ -48,7 +48,7 @@ fun LayersAssertion.wallpaperLayerBecomesInvisible( bugId: Int = 0, enabled: Boolean = bugId == 0 ) { - all("wallpaperLayerBecomesInvisible", enabled, bugId) { + all("wallpaperLayerBecomesInvisible", bugId, enabled) { this.showsLayer("Wallpaper") .then() .replaceVisibleLayer("Wallpaper", testApp.getPackage()) diff --git a/tests/FlickerTests/src/com/android/server/wm/flicker/rotation/SeamlessAppRotationTest.kt b/tests/FlickerTests/src/com/android/server/wm/flicker/rotation/SeamlessAppRotationTest.kt index b29fae30565ed..d100383bc9f72 100644 --- a/tests/FlickerTests/src/com/android/server/wm/flicker/rotation/SeamlessAppRotationTest.kt +++ b/tests/FlickerTests/src/com/android/server/wm/flicker/rotation/SeamlessAppRotationTest.kt @@ -173,7 +173,7 @@ class SeamlessAppRotationTest( } } - all("noUncoveredRegions"/*, bugId = 147659548*/) { + all("noUncoveredRegions", bugId = 147659548) { if (startingBounds == endingBounds) { this.coversAtLeastRegion(startingBounds) } else {