Loading packages/SystemUI/multivalentTests/src/com/android/systemui/accessibility/fontscaling/FontScalingDialogDelegateTest.kt +7 −7 Original line number Diff line number Diff line Loading @@ -83,10 +83,11 @@ class FontScalingDialogDelegateTest : SysuiTestCase() { MockitoAnnotations.initMocks(this) testableLooper = TestableLooper.get(this) val mainHandler = Handler(testableLooper.looper) systemSettings = FakeSettings() val fakeSettings = FakeSettings() systemSettings = fakeSettings // Guarantee that the systemSettings always starts with the default font scale. systemSettings.putFloatForUser(Settings.System.FONT_SCALE, 1.0f, userTracker.userId) secureSettings = FakeSettings() secureSettings = fakeSettings systemClock = FakeSystemClock() backgroundDelayableExecutor = FakeExecutor(systemClock) whenever(sysuiState.setFlag(anyLong(), anyBoolean())).thenReturn(sysuiState) Loading Loading @@ -207,9 +208,9 @@ class FontScalingDialogDelegateTest : SysuiTestCase() { dialog.show() val iconStartFrame: ViewGroup = dialog.findViewById(R.id.icon_start_frame)!! secureSettings.putIntForUser( secureSettings.putStringForUser( Settings.Secure.ACCESSIBILITY_FONT_SCALING_HAS_BEEN_CHANGED, OFF, OFF.toString(), userTracker.userId, ) Loading @@ -220,12 +221,11 @@ class FontScalingDialogDelegateTest : SysuiTestCase() { backgroundDelayableExecutor.runAllReady() val currentSettings = secureSettings.getIntForUser( secureSettings.getStringForUser( Settings.Secure.ACCESSIBILITY_FONT_SCALING_HAS_BEEN_CHANGED, /* def = */ OFF, userTracker.userId, ) assertThat(currentSettings).isEqualTo(ON) assertThat(currentSettings).isEqualTo(ON.toString()) dialog.dismiss() } Loading packages/SystemUI/multivalentTests/src/com/android/systemui/keyboard/stickykeys/ui/viewmodel/StickyKeysIndicatorViewModelTest.kt +2 −2 Original line number Diff line number Diff line Loading @@ -116,9 +116,9 @@ class StickyKeysIndicatorViewModelTest : SysuiTestCase() { } private fun setStickyKeySetting(enabled: Boolean) { val newValue = if (enabled) "1" else "0" val newValue = if (enabled) 1 else 0 val defaultUser = userRepository.getSelectedUserInfo().id secureSettings.putStringForUser(ACCESSIBILITY_STICKY_KEYS, newValue, defaultUser) secureSettings.putIntForUser(ACCESSIBILITY_STICKY_KEYS, newValue, defaultUser) } @Test Loading Loading
packages/SystemUI/multivalentTests/src/com/android/systemui/accessibility/fontscaling/FontScalingDialogDelegateTest.kt +7 −7 Original line number Diff line number Diff line Loading @@ -83,10 +83,11 @@ class FontScalingDialogDelegateTest : SysuiTestCase() { MockitoAnnotations.initMocks(this) testableLooper = TestableLooper.get(this) val mainHandler = Handler(testableLooper.looper) systemSettings = FakeSettings() val fakeSettings = FakeSettings() systemSettings = fakeSettings // Guarantee that the systemSettings always starts with the default font scale. systemSettings.putFloatForUser(Settings.System.FONT_SCALE, 1.0f, userTracker.userId) secureSettings = FakeSettings() secureSettings = fakeSettings systemClock = FakeSystemClock() backgroundDelayableExecutor = FakeExecutor(systemClock) whenever(sysuiState.setFlag(anyLong(), anyBoolean())).thenReturn(sysuiState) Loading Loading @@ -207,9 +208,9 @@ class FontScalingDialogDelegateTest : SysuiTestCase() { dialog.show() val iconStartFrame: ViewGroup = dialog.findViewById(R.id.icon_start_frame)!! secureSettings.putIntForUser( secureSettings.putStringForUser( Settings.Secure.ACCESSIBILITY_FONT_SCALING_HAS_BEEN_CHANGED, OFF, OFF.toString(), userTracker.userId, ) Loading @@ -220,12 +221,11 @@ class FontScalingDialogDelegateTest : SysuiTestCase() { backgroundDelayableExecutor.runAllReady() val currentSettings = secureSettings.getIntForUser( secureSettings.getStringForUser( Settings.Secure.ACCESSIBILITY_FONT_SCALING_HAS_BEEN_CHANGED, /* def = */ OFF, userTracker.userId, ) assertThat(currentSettings).isEqualTo(ON) assertThat(currentSettings).isEqualTo(ON.toString()) dialog.dismiss() } Loading
packages/SystemUI/multivalentTests/src/com/android/systemui/keyboard/stickykeys/ui/viewmodel/StickyKeysIndicatorViewModelTest.kt +2 −2 Original line number Diff line number Diff line Loading @@ -116,9 +116,9 @@ class StickyKeysIndicatorViewModelTest : SysuiTestCase() { } private fun setStickyKeySetting(enabled: Boolean) { val newValue = if (enabled) "1" else "0" val newValue = if (enabled) 1 else 0 val defaultUser = userRepository.getSelectedUserInfo().id secureSettings.putStringForUser(ACCESSIBILITY_STICKY_KEYS, newValue, defaultUser) secureSettings.putIntForUser(ACCESSIBILITY_STICKY_KEYS, newValue, defaultUser) } @Test Loading