[Accessibility] Restore high contrast text

Test: local raven device
Bug: 241805782

Change-Id: Ie7d807ebc46452beb69ad41ebb3e570c2ff0a186
This commit is contained in:
marcusge
2024-04-02 00:13:17 +00:00
parent 00b6384d3c
commit 8d90ba38b7
2 changed files with 6 additions and 13 deletions

View File

@@ -56,8 +56,8 @@
<SwitchPreferenceCompat <SwitchPreferenceCompat
android:key="toggle_high_text_contrast_preference" android:key="toggle_high_text_contrast_preference"
android:persistent="false" android:persistent="false"
android:summary="@string/accessibility_toggle_high_text_contrast_preference_summary" android:summary="@string/accessibility_toggle_maximize_text_contrast_preference_summary"
android:title="@string/accessibility_toggle_high_text_contrast_preference_title" /> android:title="@string/accessibility_toggle_maximize_text_contrast_preference_title" />
<com.android.settings.accessibility.TextReadingResetPreference <com.android.settings.accessibility.TextReadingResetPreference
android:key="reset" 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 @Override
@@ -208,12 +203,10 @@ public class TextReadingPreferenceFragment extends DashboardFragment {
mFontWeightAdjustmentController.setEntryPoint(mEntryPoint); mFontWeightAdjustmentController.setEntryPoint(mEntryPoint);
controllers.add(mFontWeightAdjustmentController); controllers.add(mFontWeightAdjustmentController);
if (!Flags.enableColorContrastControl()) {
final HighTextContrastPreferenceController highTextContrastController = final HighTextContrastPreferenceController highTextContrastController =
new HighTextContrastPreferenceController(context, HIGH_TEXT_CONTRAST_KEY); new HighTextContrastPreferenceController(context, HIGH_TEXT_CONTRAST_KEY);
highTextContrastController.setEntryPoint(mEntryPoint); highTextContrastController.setEntryPoint(mEntryPoint);
controllers.add(highTextContrastController); controllers.add(highTextContrastController);
}
final TextReadingResetController resetController = final TextReadingResetController resetController =
new TextReadingResetController(context, RESET_KEY, new TextReadingResetController(context, RESET_KEY,