From 2bb66bd60c125c40801666c6f748c6352332e62d Mon Sep 17 00:00:00 2001 From: Eghosa Ewansiha-Vlachavas Date: Tue, 8 Oct 2024 16:47:01 +0000 Subject: Fix aspect ratio for letterboxed activity in `LetterboxAppHelper` Set the non-resizeable portrait activity used by the `LetterboxAppHelper` to have a min aspect ratio to ensure the activity is always letterboxed in all orientations. Flag: NONE(bug fix) Fixes: 371124043 Test: atest WMShellFlickerTestsAppCompat:QuickSwitchLauncherToLetterboxAppTest Change-Id: Id84a4b94fc8c66ab48d0e0d274b559298f7fe838 --- .../shell/flicker/appcompat/QuickSwitchLauncherToLetterboxAppTest.kt | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'libs') diff --git a/libs/WindowManager/Shell/tests/flicker/appcompat/src/com/android/wm/shell/flicker/appcompat/QuickSwitchLauncherToLetterboxAppTest.kt b/libs/WindowManager/Shell/tests/flicker/appcompat/src/com/android/wm/shell/flicker/appcompat/QuickSwitchLauncherToLetterboxAppTest.kt index 2484f675b236..9b8c949a1705 100644 --- a/libs/WindowManager/Shell/tests/flicker/appcompat/src/com/android/wm/shell/flicker/appcompat/QuickSwitchLauncherToLetterboxAppTest.kt +++ b/libs/WindowManager/Shell/tests/flicker/appcompat/src/com/android/wm/shell/flicker/appcompat/QuickSwitchLauncherToLetterboxAppTest.kt @@ -20,7 +20,6 @@ import android.graphics.Rect import android.platform.test.annotations.Postsubmit import android.platform.test.annotations.RequiresDevice import android.tools.NavBar -import android.tools.Rotation import android.tools.flicker.assertions.FlickerTest import android.tools.flicker.junit.FlickerParametersRunnerFactory import android.tools.flicker.legacy.FlickerBuilder @@ -266,8 +265,7 @@ class QuickSwitchLauncherToLetterboxAppTest(flicker: LegacyFlickerTest) : BaseAp @JvmStatic fun getParams(): Collection { return LegacyFlickerTestFactory.nonRotationTests( - supportedNavigationModes = listOf(NavBar.MODE_GESTURAL), - supportedRotations = listOf(Rotation.ROTATION_90) + supportedNavigationModes = listOf(NavBar.MODE_GESTURAL) ) } } -- cgit v1.2.3-59-g8ed1b From db17c245b3264bc4b8a34b71aa0b0b5b1e26e6a1 Mon Sep 17 00:00:00 2001 From: Eghosa Ewansiha-Vlachavas Date: Wed, 9 Oct 2024 13:18:31 +0000 Subject: Fix aspect ratio for transparent letterboxed activity Set the `OpenTransparentActivity` to have a min aspect ratio to ensure the activity is always letterboxed in all orientations. Flag: NONE(bug fix) Fixes: 371124711 Fixes: 371125446 Test: atest WMShellFlickerTestsAppCompat:OpenTransparentActivityTest Change-Id: Id3254a1395e40cd9003d7026da7eb324be01ef4a --- .../wm/shell/flicker/appcompat/OpenTransparentActivityTest.kt | 5 +---- tests/FlickerTests/test-apps/flickerapp/AndroidManifest.xml | 1 + 2 files changed, 2 insertions(+), 4 deletions(-) (limited to 'libs') diff --git a/libs/WindowManager/Shell/tests/flicker/appcompat/src/com/android/wm/shell/flicker/appcompat/OpenTransparentActivityTest.kt b/libs/WindowManager/Shell/tests/flicker/appcompat/src/com/android/wm/shell/flicker/appcompat/OpenTransparentActivityTest.kt index 2980d5113bba..e176f47d4094 100644 --- a/libs/WindowManager/Shell/tests/flicker/appcompat/src/com/android/wm/shell/flicker/appcompat/OpenTransparentActivityTest.kt +++ b/libs/WindowManager/Shell/tests/flicker/appcompat/src/com/android/wm/shell/flicker/appcompat/OpenTransparentActivityTest.kt @@ -17,7 +17,6 @@ package com.android.wm.shell.flicker.appcompat import android.platform.test.annotations.Postsubmit -import android.tools.Rotation import android.tools.flicker.assertions.FlickerTest import android.tools.flicker.junit.FlickerParametersRunnerFactory import android.tools.flicker.legacy.FlickerBuilder @@ -109,9 +108,7 @@ class OpenTransparentActivityTest(flicker: LegacyFlickerTest) : TransparentBaseA @Parameterized.Parameters(name = "{0}") @JvmStatic fun getParams(): Collection { - return LegacyFlickerTestFactory.nonRotationTests( - supportedRotations = listOf(Rotation.ROTATION_90) - ) + return LegacyFlickerTestFactory.nonRotationTests() } } } diff --git a/tests/FlickerTests/test-apps/flickerapp/AndroidManifest.xml b/tests/FlickerTests/test-apps/flickerapp/AndroidManifest.xml index b8a7af7e252c..f2e34257ef01 100644 --- a/tests/FlickerTests/test-apps/flickerapp/AndroidManifest.xml +++ b/tests/FlickerTests/test-apps/flickerapp/AndroidManifest.xml @@ -156,6 +156,7 @@