Merge "[Accessibility] Restore high contrast text" into main

This commit is contained in:
Marcus Ge
2024-04-02 22:57:40 +00:00
committed by Android (Google) Code Review
2 changed files with 6 additions and 13 deletions

View File

@@ -56,8 +56,8 @@
<SwitchPreferenceCompat
android:key="toggle_high_text_contrast_preference"
android:persistent="false"
android:summary="@string/accessibility_toggle_high_text_contrast_preference_summary"
android:title="@string/accessibility_toggle_high_text_contrast_preference_title" />
android:summary="@string/accessibility_toggle_maximize_text_contrast_preference_summary"
android:title="@string/accessibility_toggle_maximize_text_contrast_preference_title" />
<com.android.settings.accessibility.TextReadingResetPreference
android:key="reset"

View File

@@ -117,11 +117,6 @@ public class TextReadingPreferenceFragment extends DashboardFragment {
}
}
}
if (Flags.enableColorContrastControl()) {
// High text contrast toggle will be added inside Color Contrast page on V+.
removePreference(HIGH_TEXT_CONTRAST_KEY);
}
}
@Override
@@ -208,12 +203,10 @@ public class TextReadingPreferenceFragment extends DashboardFragment {
mFontWeightAdjustmentController.setEntryPoint(mEntryPoint);
controllers.add(mFontWeightAdjustmentController);
if (!Flags.enableColorContrastControl()) {
final HighTextContrastPreferenceController highTextContrastController =
new HighTextContrastPreferenceController(context, HIGH_TEXT_CONTRAST_KEY);
highTextContrastController.setEntryPoint(mEntryPoint);
controllers.add(highTextContrastController);
}
final HighTextContrastPreferenceController highTextContrastController =
new HighTextContrastPreferenceController(context, HIGH_TEXT_CONTRAST_KEY);
highTextContrastController.setEntryPoint(mEntryPoint);
controllers.add(highTextContrastController);
final TextReadingResetController resetController =
new TextReadingResetController(context, RESET_KEY,