Loading tests/FlickerTests/Android.bp +0 −1 Original line number Diff line number Diff line Loading @@ -41,7 +41,6 @@ java_defaults { "platform-test-annotations", "wm-flicker-common-app-helpers", "wm-shell-flicker-utils", "systemui-tapl", ], data: [":FlickerTestApp"], } Loading tests/FlickerTests/Notification/src/com/android/server/wm/flicker/notification/OpenAppFromNotificationWarmTest.kt +13 −16 Original line number Diff line number Diff line Loading @@ -16,8 +16,6 @@ package com.android.server.wm.flicker.notification import android.platform.systemui_tapl.controller.NotificationIdentity import android.platform.systemui_tapl.ui.Root import android.platform.test.annotations.Postsubmit import android.platform.test.annotations.Presubmit import android.platform.test.rule.DisableNotificationCooldownSettingRule Loading @@ -30,6 +28,8 @@ import android.tools.helpers.wakeUpAndGoToHomeScreen import android.tools.traces.component.ComponentNameMatcher import android.view.WindowInsets import android.view.WindowManager import androidx.test.uiautomator.By import androidx.test.uiautomator.Until import com.android.server.wm.flicker.helpers.NotificationAppHelper import com.android.server.wm.flicker.helpers.setRotation import com.android.server.wm.flicker.navBarLayerIsVisibleAtEnd Loading Loading @@ -87,9 +87,8 @@ open class OpenAppFromNotificationWarmTest(flicker: LegacyFlickerTest) : .withWindowSurfaceDisappeared(ComponentNameMatcher.NOTIFICATION_SHADE) .waitForAndVerify() } protected fun FlickerTestData.openAppFromNotification() { doOpenAppAndWait() doOpenAppAndWait(startY = 10, endY = 3 * device.displayHeight / 4, steps = 25) } protected fun FlickerTestData.openAppFromLockNotification() { Loading @@ -102,27 +101,25 @@ open class OpenAppFromNotificationWarmTest(flicker: LegacyFlickerTest) : WindowInsets.Type.statusBars() or WindowInsets.Type.displayCutout() ) doOpenAppAndWait() doOpenAppAndWait(startY = insets.top + 100, endY = device.displayHeight / 2, steps = 4) } protected fun FlickerTestData.doOpenAppAndWait() { val shade = Root.get().openNotificationShade() protected fun FlickerTestData.doOpenAppAndWait(startY: Int, endY: Int, steps: Int) { // Swipe down to show the notification shade val x = device.displayWidth / 2 device.swipe(x, startY, x, endY, steps) device.waitForIdle(2000) instrumentation.uiAutomation.syncInputTransactions() // Launch the activity by clicking the notification // Post notification and ensure that it's collapsed val notification = shade.notificationStack.findNotification( NotificationIdentity( type = NotificationIdentity.Type.BY_TEXT, text = "Flicker Test Notification", ) ) device.wait(Until.findObject(By.text("Flicker Test Notification")), 2000L) notification?.click() ?: error("Notification not found") instrumentation.uiAutomation.syncInputTransactions() notification.clickToApp() // Wait for the app to launch wmHelper.StateSyncBuilder().withFullScreenApp(testApp).waitForAndVerify() } @Presubmit @Test override fun appWindowBecomesVisible() = appWindowBecomesVisible_warmStart() @Presubmit @Test override fun appLayerBecomesVisible() = appLayerBecomesVisible_warmStart() Loading Loading
tests/FlickerTests/Android.bp +0 −1 Original line number Diff line number Diff line Loading @@ -41,7 +41,6 @@ java_defaults { "platform-test-annotations", "wm-flicker-common-app-helpers", "wm-shell-flicker-utils", "systemui-tapl", ], data: [":FlickerTestApp"], } Loading
tests/FlickerTests/Notification/src/com/android/server/wm/flicker/notification/OpenAppFromNotificationWarmTest.kt +13 −16 Original line number Diff line number Diff line Loading @@ -16,8 +16,6 @@ package com.android.server.wm.flicker.notification import android.platform.systemui_tapl.controller.NotificationIdentity import android.platform.systemui_tapl.ui.Root import android.platform.test.annotations.Postsubmit import android.platform.test.annotations.Presubmit import android.platform.test.rule.DisableNotificationCooldownSettingRule Loading @@ -30,6 +28,8 @@ import android.tools.helpers.wakeUpAndGoToHomeScreen import android.tools.traces.component.ComponentNameMatcher import android.view.WindowInsets import android.view.WindowManager import androidx.test.uiautomator.By import androidx.test.uiautomator.Until import com.android.server.wm.flicker.helpers.NotificationAppHelper import com.android.server.wm.flicker.helpers.setRotation import com.android.server.wm.flicker.navBarLayerIsVisibleAtEnd Loading Loading @@ -87,9 +87,8 @@ open class OpenAppFromNotificationWarmTest(flicker: LegacyFlickerTest) : .withWindowSurfaceDisappeared(ComponentNameMatcher.NOTIFICATION_SHADE) .waitForAndVerify() } protected fun FlickerTestData.openAppFromNotification() { doOpenAppAndWait() doOpenAppAndWait(startY = 10, endY = 3 * device.displayHeight / 4, steps = 25) } protected fun FlickerTestData.openAppFromLockNotification() { Loading @@ -102,27 +101,25 @@ open class OpenAppFromNotificationWarmTest(flicker: LegacyFlickerTest) : WindowInsets.Type.statusBars() or WindowInsets.Type.displayCutout() ) doOpenAppAndWait() doOpenAppAndWait(startY = insets.top + 100, endY = device.displayHeight / 2, steps = 4) } protected fun FlickerTestData.doOpenAppAndWait() { val shade = Root.get().openNotificationShade() protected fun FlickerTestData.doOpenAppAndWait(startY: Int, endY: Int, steps: Int) { // Swipe down to show the notification shade val x = device.displayWidth / 2 device.swipe(x, startY, x, endY, steps) device.waitForIdle(2000) instrumentation.uiAutomation.syncInputTransactions() // Launch the activity by clicking the notification // Post notification and ensure that it's collapsed val notification = shade.notificationStack.findNotification( NotificationIdentity( type = NotificationIdentity.Type.BY_TEXT, text = "Flicker Test Notification", ) ) device.wait(Until.findObject(By.text("Flicker Test Notification")), 2000L) notification?.click() ?: error("Notification not found") instrumentation.uiAutomation.syncInputTransactions() notification.clickToApp() // Wait for the app to launch wmHelper.StateSyncBuilder().withFullScreenApp(testApp).waitForAndVerify() } @Presubmit @Test override fun appWindowBecomesVisible() = appWindowBecomesVisible_warmStart() @Presubmit @Test override fun appLayerBecomesVisible() = appLayerBecomesVisible_warmStart() Loading