New feature “Text and reading options” for SetupWizard, Wallpaper, and Settings (19/n).

- Rename the strings related to "text and display" to "color and motion" to avoid misunderstanding.

Bug: 211503117
Test: manual test
Change-Id: Icdca5ee03fb95a8531406a0f6ab07799a9dfb17c
This commit is contained in:
Peter_Liang
2022-02-14 10:42:08 +08:00
parent 18eb37fb7d
commit 19631ec1b1
7 changed files with 18 additions and 18 deletions

View File

@@ -3736,7 +3736,7 @@
errorLine1=" android:color="@color/accessibility_feature_background"/>" errorLine1=" android:color="@color/accessibility_feature_background"/>"
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
<location <location
file="res/drawable/ic_text_and_display.xml" file="res/drawable/ic_color_and_motion.xml"
line="22" line="22"
column="13"/> column="13"/>
</issue> </issue>

View File

@@ -5150,8 +5150,8 @@
<string name="general_category_title">General</string> <string name="general_category_title">General</string>
<!-- Title for the accessibility preference category of display services and settings. [CHAR LIMIT=50] --> <!-- Title for the accessibility preference category of display services and settings. [CHAR LIMIT=50] -->
<string name="display_category_title">Display</string> <string name="display_category_title">Display</string>
<!-- Title for the accessibility text options page. [CHAR LIMIT=50] --> <!-- Title for the accessibility color and motion page. [CHAR LIMIT=50] -->
<string name="accessibility_text_and_display_title">Text and display</string> <string name="accessibility_color_and_motion_title">Color and motion</string>
<!-- Title for the accessibility text options page. [CHAR LIMIT=50] --> <!-- Title for the accessibility text options page. [CHAR LIMIT=50] -->
<string name="accessibility_turn_screen_darker_title">Turn screen darker</string> <string name="accessibility_turn_screen_darker_title">Turn screen darker</string>
<!-- Title for the accessibility preference category of interaction control services and settings. [CHAR LIMIT=50] --> <!-- Title for the accessibility preference category of interaction control services and settings. [CHAR LIMIT=50] -->

View File

@@ -17,9 +17,9 @@
<PreferenceScreen <PreferenceScreen
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:settings="http://schemas.android.com/apk/res-auto" xmlns:settings="http://schemas.android.com/apk/res-auto"
android:key="accessibility_text_and_display" android:key="accessibility_color_and_motion"
android:persistent="false" android:persistent="false"
android:title="@string/accessibility_text_and_display_title"> android:title="@string/accessibility_color_and_motion_title">
<Preference <Preference
android:fragment="com.android.settings.display.ToggleFontSizePreferenceFragment" android:fragment="com.android.settings.display.ToggleFontSizePreferenceFragment"

View File

@@ -44,11 +44,11 @@
android:title="@string/accessibility_text_reading_options_title" /> android:title="@string/accessibility_text_reading_options_title" />
<Preference <Preference
android:fragment="com.android.settings.accessibility.TextAndDisplayFragment" android:fragment="com.android.settings.accessibility.ColorAndMotionFragment"
android:key="text_and_display_preference_screen" android:key="color_and_motion"
android:icon="@drawable/ic_text_and_display" android:icon="@drawable/ic_color_and_motion"
android:persistent="false" android:persistent="false"
android:title="@string/accessibility_text_and_display_title" android:title="@string/accessibility_color_and_motion_title"
settings:searchable="true"/> settings:searchable="true"/>
<com.android.settingslib.PrimarySwitchPreference <com.android.settingslib.PrimarySwitchPreference

View File

@@ -30,11 +30,11 @@ import com.android.settings.dashboard.DashboardFragment;
import com.android.settings.search.BaseSearchIndexProvider; import com.android.settings.search.BaseSearchIndexProvider;
import com.android.settingslib.search.SearchIndexable; import com.android.settingslib.search.SearchIndexable;
/** Accessibility settings for text and display. */ /** Accessibility settings for color and motion. */
@SearchIndexable(forTarget = SearchIndexable.ALL & ~SearchIndexable.ARC) @SearchIndexable(forTarget = SearchIndexable.ALL & ~SearchIndexable.ARC)
public class TextAndDisplayFragment extends DashboardFragment { public class ColorAndMotionFragment extends DashboardFragment {
private static final String TAG = "TextAndDisplayFragment"; private static final String TAG = "ColorAndMotionFragment";
private static final String CATEGORY_EXPERIMENTAL = "experimental_category"; private static final String CATEGORY_EXPERIMENTAL = "experimental_category";
@@ -49,7 +49,7 @@ public class TextAndDisplayFragment extends DashboardFragment {
@Override @Override
public int getMetricsCategory() { public int getMetricsCategory() {
return SettingsEnums.ACCESSIBILITY_TEXT_AND_DISPLAY; return SettingsEnums.ACCESSIBILITY_COLOR_AND_MOTION;
} }
@@ -62,7 +62,7 @@ public class TextAndDisplayFragment extends DashboardFragment {
@Override @Override
protected int getPreferenceScreenResId() { protected int getPreferenceScreenResId() {
return R.xml.accessibility_text_and_display; return R.xml.accessibility_color_and_motion;
} }
@Override @Override
@@ -104,5 +104,5 @@ public class TextAndDisplayFragment extends DashboardFragment {
} }
public static final BaseSearchIndexProvider SEARCH_INDEX_DATA_PROVIDER = public static final BaseSearchIndexProvider SEARCH_INDEX_DATA_PROVIDER =
new BaseSearchIndexProvider(R.xml.accessibility_text_and_display); new BaseSearchIndexProvider(R.xml.accessibility_color_and_motion);
} }

View File

@@ -32,17 +32,17 @@ import org.robolectric.RobolectricTestRunner;
import java.util.List; import java.util.List;
@RunWith(RobolectricTestRunner.class) @RunWith(RobolectricTestRunner.class)
public class TextAndDisplayFragmentTest { public class ColorAndMotionFragmentTest {
private Context mContext = ApplicationProvider.getApplicationContext(); private Context mContext = ApplicationProvider.getApplicationContext();
@Test @Test
public void getNonIndexableKeys_existInXmlLayout() { public void getNonIndexableKeys_existInXmlLayout() {
final List<String> niks = TextAndDisplayFragment.SEARCH_INDEX_DATA_PROVIDER final List<String> niks = ColorAndMotionFragment.SEARCH_INDEX_DATA_PROVIDER
.getNonIndexableKeys(mContext); .getNonIndexableKeys(mContext);
final List<String> keys = final List<String> keys =
XmlTestUtils.getKeysFromPreferenceXml(mContext, XmlTestUtils.getKeysFromPreferenceXml(mContext,
R.xml.accessibility_text_and_display); R.xml.accessibility_color_and_motion);
assertThat(keys).containsAtLeastElementsIn(niks); assertThat(keys).containsAtLeastElementsIn(niks);
} }