From 743d1455d8a8e54ab01ea207f7b6d459d2fdd60b Mon Sep 17 00:00:00 2001 From: Pablo Gamito Date: Tue, 27 Sep 2022 09:22:31 +0000 Subject: [PATCH] Set correct TAPL rotation expectation Fixes: 244414110 Test: atest FlickerTests:OpenAppFromLockNotificationCold FlickerTests:OpenAppFromLockNotificationWarm FlickerTests:OpenAppFromLockNotificationWithLockOverlayApp FlickerTests:OpenAppFromNotificationCold FlickerTests:OpenAppFromNotificationCold Change-Id: I067ec0afdb0bdbff53b0789678c5b3b5da6903a2 --- .../wm/flicker/launch/OpenAppFromNotificationWarm.kt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/FlickerTests/src/com/android/server/wm/flicker/launch/OpenAppFromNotificationWarm.kt b/tests/FlickerTests/src/com/android/server/wm/flicker/launch/OpenAppFromNotificationWarm.kt index 77f28f60d2cc1..2babf1c8e9820 100644 --- a/tests/FlickerTests/src/com/android/server/wm/flicker/launch/OpenAppFromNotificationWarm.kt +++ b/tests/FlickerTests/src/com/android/server/wm/flicker/launch/OpenAppFromNotificationWarm.kt @@ -19,6 +19,7 @@ package com.android.server.wm.flicker.launch import android.platform.test.annotations.FlakyTest import android.platform.test.annotations.Postsubmit import android.platform.test.annotations.RequiresDevice +import android.view.Surface import android.view.WindowInsets import android.view.WindowManager import androidx.test.uiautomator.By @@ -74,6 +75,13 @@ open class OpenAppFromNotificationWarm( .withFullScreenApp(testApp) .waitForAndVerify() testApp.postNotification(wmHelper) + + if (testSpec.isTablet) { + tapl.setExpectedRotation(testSpec.startRotation) + } else { + tapl.setExpectedRotation(Surface.ROTATION_0) + } + tapl.goHome() wmHelper.StateSyncBuilder() .withHomeActivityVisible()