From c37c8b87898261420616da8e3442cebb824730ae Mon Sep 17 00:00:00 2001 From: Graciela Wissen Putri Date: Thu, 7 Sep 2023 11:53:59 +0000 Subject: [PATCH] Change aspect ratio summary and footer text Add more education for device user that setting aspect ratio has not been tested by the app developer. Move Aspect ratio under Apps > Advanced instead of General. Fix: 296160724 Test: atest UserAspectRatioAppsPageProviderTest Change-Id: I2078f285d7bfb8de3a61c69f9d0ff3872d683ed4 --- res/values/strings.xml | 6 ++-- res/xml/apps.xml | 31 ++++++++++++------- .../UserAspectRatioAppsPageProvider.kt | 2 +- .../UserAspectRatioAppsPageProviderTest.kt | 3 +- 4 files changed, 26 insertions(+), 16 deletions(-) diff --git a/res/values/strings.xml b/res/values/strings.xml index 07d05f9cf5d..55a13169d07 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -12144,7 +12144,9 @@ Aspect ratio - Choose an aspect ratio to view this app if it hasn\'t been designed to fit your %1$s + Try a new aspect ratio to view this app if it hasn\'t been designed to fit your %1$s + + Try a new aspect ratio to view this app if it hasn\'t been designed to fit your %1$s. Some apps may not be optimized for certain aspect ratios. Suggested apps @@ -12164,7 +12166,7 @@ 4:3 - The app will restart when you change aspect ratio. You may lose unsaved changes. + The app will restart when you change aspect ratio. You may lose unsaved changes. Some apps may not be optimized for certain aspect ratios. diff --git a/res/xml/apps.xml b/res/xml/apps.xml index 651ed9bc98d..db46a1a7265 100644 --- a/res/xml/apps.xml +++ b/res/xml/apps.xml @@ -79,18 +79,6 @@ android:key="dashboard_tile_placeholder" android:order="10"/> - - - - - + + + + + + + diff --git a/src/com/android/settings/spa/app/appcompat/UserAspectRatioAppsPageProvider.kt b/src/com/android/settings/spa/app/appcompat/UserAspectRatioAppsPageProvider.kt index 35e99a77988..93da489b184 100644 --- a/src/com/android/settings/spa/app/appcompat/UserAspectRatioAppsPageProvider.kt +++ b/src/com/android/settings/spa/app/appcompat/UserAspectRatioAppsPageProvider.kt @@ -110,7 +110,7 @@ fun UserAspectRatioAppList( appList = appList, header = { Box(Modifier.padding(SettingsDimension.itemPadding)) { - SettingsBody(UserAspectRatioAppsPageProvider.getSummary()) + SettingsBody(stringResource(R.string.aspect_ratio_main_summary, Build.MODEL)) } Illustration(object : IllustrationModel { override val resId = R.raw.user_aspect_ratio_education diff --git a/tests/spa_unit/src/com/android/settings/spa/app/appcompat/UserAspectRatioAppsPageProviderTest.kt b/tests/spa_unit/src/com/android/settings/spa/app/appcompat/UserAspectRatioAppsPageProviderTest.kt index c314655e0d2..044968d75e3 100644 --- a/tests/spa_unit/src/com/android/settings/spa/app/appcompat/UserAspectRatioAppsPageProviderTest.kt +++ b/tests/spa_unit/src/com/android/settings/spa/app/appcompat/UserAspectRatioAppsPageProviderTest.kt @@ -67,7 +67,8 @@ class UserAspectRatioAppsPageProviderTest { @Test fun injectEntry_summary() { setInjectEntry() - composeTestRule.onNodeWithText(context.getString(R.string.aspect_ratio_summary, Build.MODEL)) + composeTestRule + .onNodeWithText(context.getString(R.string.aspect_ratio_summary, Build.MODEL)) .assertIsDisplayed() }