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

@@ -31,6 +31,9 @@ import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
/**
* Tests for {@link FontWeightAdjustmentPreferenceController}.
*/
@RunWith(AndroidJUnit4.class)
public class FontWeightAdjustmentPreferenceControllerTest {
private static final int ON = FontWeightAdjustmentPreferenceController.BOLD_TEXT_ADJUSTMENT;
@@ -91,4 +94,14 @@ public class FontWeightAdjustmentPreferenceControllerTest {
assertThat(Settings.Secure.getInt(mContext.getContentResolver(),
Settings.Secure.FONT_WEIGHT_ADJUSTMENT, OFF)).isEqualTo(OFF);
}
@Test
public void resetState_shouldDisableBoldText() {
mController.setChecked(true);
mController.resetState();
assertThat(Settings.Secure.getInt(mContext.getContentResolver(),
Settings.Secure.FONT_WEIGHT_ADJUSTMENT, OFF)).isEqualTo(OFF);
}
}