New feature “Text and reading options” for SetupWizard, Wallpaper, and Settings (14/n).

- Link-up between the ResetPreference and the FontWeightAdjustmentPreference.

Bug: 211503117
Test: atest FontWeightAdjustmentPreferenceControllerTest
Change-Id: Iabf585660ff2c67f063198391bd68724190ba54d
This commit is contained in:
Peter_Liang
2022-02-06 23:31:27 +08:00
parent f71050b515
commit 618508c0c4
4 changed files with 26 additions and 3 deletions

View File

@@ -24,7 +24,8 @@ import com.android.settings.R;
import com.android.settings.core.TogglePreferenceController;
/** PreferenceController for displaying all text in bold. */
public class FontWeightAdjustmentPreferenceController extends TogglePreferenceController {
public class FontWeightAdjustmentPreferenceController extends TogglePreferenceController implements
TextReadingResetController.ResetStateListener {
static final int BOLD_TEXT_ADJUSTMENT =
FontStyle.FONT_WEIGHT_BOLD - FontStyle.FONT_WEIGHT_NORMAL;
@@ -53,4 +54,9 @@ public class FontWeightAdjustmentPreferenceController extends TogglePreferenceCo
public int getSliceHighlightMenuRes() {
return R.string.menu_key_accessibility;
}
@Override
public void resetState() {
setChecked(false);
}
}