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:
@@ -3736,7 +3736,7 @@
|
||||
errorLine1=" android:color="@color/accessibility_feature_background"/>"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="res/drawable/ic_text_and_display.xml"
|
||||
file="res/drawable/ic_color_and_motion.xml"
|
||||
line="22"
|
||||
column="13"/>
|
||||
</issue>
|
||||
|
@@ -5150,8 +5150,8 @@
|
||||
<string name="general_category_title">General</string>
|
||||
<!-- Title for the accessibility preference category of display services and settings. [CHAR LIMIT=50] -->
|
||||
<string name="display_category_title">Display</string>
|
||||
<!-- Title for the accessibility text options page. [CHAR LIMIT=50] -->
|
||||
<string name="accessibility_text_and_display_title">Text and display</string>
|
||||
<!-- Title for the accessibility color and motion page. [CHAR LIMIT=50] -->
|
||||
<string name="accessibility_color_and_motion_title">Color and motion</string>
|
||||
<!-- Title for the accessibility text options page. [CHAR LIMIT=50] -->
|
||||
<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] -->
|
||||
|
@@ -17,9 +17,9 @@
|
||||
<PreferenceScreen
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
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:title="@string/accessibility_text_and_display_title">
|
||||
android:title="@string/accessibility_color_and_motion_title">
|
||||
|
||||
<Preference
|
||||
android:fragment="com.android.settings.display.ToggleFontSizePreferenceFragment"
|
@@ -44,11 +44,11 @@
|
||||
android:title="@string/accessibility_text_reading_options_title" />
|
||||
|
||||
<Preference
|
||||
android:fragment="com.android.settings.accessibility.TextAndDisplayFragment"
|
||||
android:key="text_and_display_preference_screen"
|
||||
android:icon="@drawable/ic_text_and_display"
|
||||
android:fragment="com.android.settings.accessibility.ColorAndMotionFragment"
|
||||
android:key="color_and_motion"
|
||||
android:icon="@drawable/ic_color_and_motion"
|
||||
android:persistent="false"
|
||||
android:title="@string/accessibility_text_and_display_title"
|
||||
android:title="@string/accessibility_color_and_motion_title"
|
||||
settings:searchable="true"/>
|
||||
|
||||
<com.android.settingslib.PrimarySwitchPreference
|
||||
|
@@ -30,11 +30,11 @@ import com.android.settings.dashboard.DashboardFragment;
|
||||
import com.android.settings.search.BaseSearchIndexProvider;
|
||||
import com.android.settingslib.search.SearchIndexable;
|
||||
|
||||
/** Accessibility settings for text and display. */
|
||||
/** Accessibility settings for color and motion. */
|
||||
@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";
|
||||
|
||||
@@ -49,7 +49,7 @@ public class TextAndDisplayFragment extends DashboardFragment {
|
||||
|
||||
@Override
|
||||
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
|
||||
protected int getPreferenceScreenResId() {
|
||||
return R.xml.accessibility_text_and_display;
|
||||
return R.xml.accessibility_color_and_motion;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -104,5 +104,5 @@ public class TextAndDisplayFragment extends DashboardFragment {
|
||||
}
|
||||
|
||||
public static final BaseSearchIndexProvider SEARCH_INDEX_DATA_PROVIDER =
|
||||
new BaseSearchIndexProvider(R.xml.accessibility_text_and_display);
|
||||
new BaseSearchIndexProvider(R.xml.accessibility_color_and_motion);
|
||||
}
|
@@ -32,17 +32,17 @@ import org.robolectric.RobolectricTestRunner;
|
||||
import java.util.List;
|
||||
|
||||
@RunWith(RobolectricTestRunner.class)
|
||||
public class TextAndDisplayFragmentTest {
|
||||
public class ColorAndMotionFragmentTest {
|
||||
|
||||
private Context mContext = ApplicationProvider.getApplicationContext();
|
||||
|
||||
@Test
|
||||
public void getNonIndexableKeys_existInXmlLayout() {
|
||||
final List<String> niks = TextAndDisplayFragment.SEARCH_INDEX_DATA_PROVIDER
|
||||
final List<String> niks = ColorAndMotionFragment.SEARCH_INDEX_DATA_PROVIDER
|
||||
.getNonIndexableKeys(mContext);
|
||||
final List<String> keys =
|
||||
XmlTestUtils.getKeysFromPreferenceXml(mContext,
|
||||
R.xml.accessibility_text_and_display);
|
||||
R.xml.accessibility_color_and_motion);
|
||||
|
||||
assertThat(keys).containsAtLeastElementsIn(niks);
|
||||
}
|
Reference in New Issue
Block a user