Merge changes I502e52f6,Iabf58566,Ida773967,Ic6c48861,If9e5cc6e, ...

* changes:
  New feature “Text and reading options” for SetupWizard, Wallpaper, and Settings (15/n).
  New feature “Text and reading options” for SetupWizard, Wallpaper, and Settings (14/n).
  New feature “Text and reading options” for SetupWizard, Wallpaper, and Settings (13/n).
  New feature “Text and reading options” for SetupWizard, Wallpaper, and Settings (12/n).
  New feature “Text and reading options” for SetupWizard, Wallpaper, and Settings (11/n).
  New feature “Text and reading options” for SetupWizard, Wallpaper, and Settings (10/n).
This commit is contained in:
PETER LIANG
2022-02-11 13:42:55 +00:00
committed by Android (Google) Code Review
23 changed files with 1262 additions and 14 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);
}
}

View File

@@ -31,6 +31,9 @@ import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
/**
* Tests for {@link HighTextContrastPreferenceController}.
*/
@RunWith(AndroidJUnit4.class)
public class HighTextContrastPreferenceControllerTest {
@@ -93,4 +96,14 @@ public class HighTextContrastPreferenceControllerTest {
assertThat(Settings.Secure.getInt(mContext.getContentResolver(),
Settings.Secure.ACCESSIBILITY_HIGH_TEXT_CONTRAST_ENABLED, UNKNOWN)).isEqualTo(OFF);
}
@Test
public void resetState_shouldDisableTextContrast() {
mController.setChecked(true);
mController.resetState();
assertThat(Settings.Secure.getInt(mContext.getContentResolver(),
Settings.Secure.ACCESSIBILITY_HIGH_TEXT_CONTRAST_ENABLED, UNKNOWN)).isEqualTo(OFF);
}
}