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

- Link-up between the ResetPreference and the HighTextContrastPreference.

Bug: 211503117
Test: atest HighTextContrastPreferenceControllerTest
Change-Id: I502e52f6a14243c19a707c91b0b5ab5dd163433a
This commit is contained in:
Peter_Liang
2022-02-06 23:54:05 +08:00
parent 618508c0c4
commit 696fc420f4
4 changed files with 29 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 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);
}
}