As b/328787031, we make the MagnificationAlwaysOnPreferenceController observe the magnification capabilities then update the preference enabled state. Therefore, when changing the capabilities to window mode only, the preference will become unavailable. We use the bug-fix flag to verify the fix with rollout process. Bug: 328787031 Flag: ACONFIG com.android.settings.accessibility.hide_magnification_always_on_toggle_when_window_mode_only DEVELOPMENT Test: manually flip the flag atest MagnificationCapabilitiesTest atest ToggleScreenMagnificationPreferenceFragmentTest atest MagnificationAlwaysOnPreferenceControllerTest Change-Id: I1a25f80131d84ecdd927030e40a18ebb32b7862f
Running Settings Robolectric tests
The full suite
$ croot
$ make RunSettingsRoboTests
Running a single test class
$ croot
$ make RunSettingsRoboTests ROBOTEST_FILTER=<ClassName>
For example:
make RunSettingsRoboTests ROBOTEST_FILTER=CodeInspectionTest
You can also use partial class name in ROBOTEST_FILTER. If the partial class name matches multiple file names, all of them will be executed.