Let MasterSwitchPreference be restrictable by extending RestrictedPreference. This is a prerequisite CL for "Hotspot & Tethering" in "Network & Internet" settings screen to be a MasterSwtichPreference. Also changed MasterSwitchPreferenceTest perse. Bug: 145922022 Test: SettingsRoboTests except StorageItemPreferenceControllerTest which fails before this CL. Change-Id: I54fa59d7adfce5f564c178c0db334974dbabf059
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.