Merge changes from topics "a11y_text_reading_18", "a11y_text_reading_19"
* changes: New feature “Text and reading options” for SetupWizard, Wallpaper, and Settings (20/n). New feature “Text and reading options” for SetupWizard, Wallpaper, and Settings (19/n). New feature “Text and reading options” for SetupWizard, Wallpaper, and Settings (18/n). New feature “Text and reading options” for SetupWizard, Wallpaper, and Settings (17/n).
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>
|
||||
|
@@ -5156,8 +5156,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,34 +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">
|
||||
|
||||
<Preference
|
||||
android:fragment="com.android.settings.display.ToggleFontSizePreferenceFragment"
|
||||
android:icon="@drawable/ic_font_size"
|
||||
android:key="font_size_preference_screen"
|
||||
android:persistent="false"
|
||||
android:title="@string/title_font_size"
|
||||
settings:controller="com.android.settings.display.FontSizePreferenceController"
|
||||
settings:searchable="false"/>
|
||||
|
||||
<com.android.settings.display.ScreenZoomPreference
|
||||
android:fragment="com.android.settings.display.ScreenZoomSettings"
|
||||
android:icon="@drawable/ic_screen_zoom"
|
||||
android:key="accessibility_settings_screen_zoom"
|
||||
android:persistent="false"
|
||||
android:title="@string/screen_zoom_title"
|
||||
settings:searchable="false"/>
|
||||
|
||||
<SwitchPreference
|
||||
android:key="toggle_force_bold_text"
|
||||
android:icon="@drawable/ic_force_bold"
|
||||
android:persistent="false"
|
||||
android:title="@string/force_bold_text"
|
||||
settings:keywords="@string/keywords_bold_text"
|
||||
settings:controller="com.android.settings.accessibility.FontWeightAdjustmentPreferenceController"/>
|
||||
android:title="@string/accessibility_color_and_motion_title">
|
||||
|
||||
<Preference
|
||||
android:fragment="com.android.settings.accessibility.ToggleDaltonizerPreferenceFragment"
|
||||
@@ -76,12 +51,6 @@
|
||||
android:title="@string/accessibility_toggle_large_pointer_icon_title"
|
||||
settings:controller="com.android.settings.accessibility.LargePointerIconPreferenceController"/>
|
||||
|
||||
<SwitchPreference
|
||||
android:key="toggle_high_text_contrast_preference"
|
||||
android:persistent="false"
|
||||
android:title="@string/accessibility_toggle_high_text_contrast_preference_title"
|
||||
settings:controller="com.android.settings.accessibility.HighTextContrastPreferenceController"/>
|
||||
|
||||
<PreferenceCategory
|
||||
android:key="experimental_category"
|
||||
android:persistent="false"
|
@@ -36,21 +36,19 @@
|
||||
android:persistent="false"
|
||||
android:title="@string/display_category_title">
|
||||
|
||||
<!-- After completely finishing the Text and reading options feature, it will be visible. -->
|
||||
<Preference
|
||||
android:fragment="com.android.settings.accessibility.TextReadingPreferenceFragment"
|
||||
android:icon="@drawable/ic_adaptive_font_download"
|
||||
android:key="text_reading_options"
|
||||
android:persistent="false"
|
||||
android:title="@string/accessibility_text_reading_options_title"
|
||||
settings:isPreferenceVisible="false"/>
|
||||
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
|
||||
|
@@ -26,23 +26,8 @@
|
||||
android:key="text_reading_options"
|
||||
android:persistent="false"
|
||||
android:title="@string/accessibility_text_reading_options_title"
|
||||
settings:isPreferenceVisible="false"
|
||||
settings:keywords="text_reading_options" />
|
||||
|
||||
<Preference
|
||||
android:key="font_size_preference"
|
||||
android:icon="@drawable/ic_font_size"
|
||||
android:summary="@string/short_summary_font_size"
|
||||
android:title="@string/title_font_size"
|
||||
settings:controller="com.android.settings.accessibility.FontSizePreferenceController" />
|
||||
|
||||
<com.android.settings.display.ScreenZoomPreference
|
||||
android:key="force_density_preference"
|
||||
android:icon="@drawable/ic_screen_zoom"
|
||||
android:summary="@string/screen_zoom_short_summary"
|
||||
android:title="@string/screen_zoom_title"
|
||||
settings:controller="com.android.settings.accessibility.ScreenSizePreferenceController" />
|
||||
|
||||
<Preference
|
||||
android:fragment="com.android.settings.accessibility.ToggleScreenMagnificationPreferenceFragmentForSetupWizard"
|
||||
android:key="screen_magnification_preference"
|
||||
|
@@ -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