[Accessibility] Migrate high text contrast under feature flag

Add Maximize Text contrast into contrast screen and hide it in "Display size and text" under feature flag

Test: manually
Bug: 241805782
Flag: aconfig
com.android.settings.accessibility.enable_color_contrast_control

Change-Id: I69049a136beba00a311c3c94fc9a49b0219a870e
This commit is contained in:
marcusge
2024-02-26 18:09:27 +00:00
parent cddd7b3660
commit 7fb14e1e54
4 changed files with 24 additions and 7 deletions

View File

@@ -117,6 +117,11 @@ 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
@@ -203,10 +208,12 @@ public class TextReadingPreferenceFragment extends DashboardFragment {
mFontWeightAdjustmentController.setEntryPoint(mEntryPoint);
controllers.add(mFontWeightAdjustmentController);
final HighTextContrastPreferenceController highTextContrastController =
new HighTextContrastPreferenceController(context, HIGH_TEXT_CONTRAST_KEY);
highTextContrastController.setEntryPoint(mEntryPoint);
controllers.add(highTextContrastController);
if (!Flags.enableColorContrastControl()) {
final HighTextContrastPreferenceController highTextContrastController =
new HighTextContrastPreferenceController(context, HIGH_TEXT_CONTRAST_KEY);
highTextContrastController.setEntryPoint(mEntryPoint);
controllers.add(highTextContrastController);
}
final TextReadingResetController resetController =
new TextReadingResetController(context, RESET_KEY,