In two places, Settings uses getProfileIdsWithDisabled intending to restrict itself to *managed* profiles, but actually allows for any type of profile. Since the declared intent is to only deal with managed profiles, we update the code to only consider managed profiles. On devices that only have managed profiles (currently almost all devices), this cl is a no-op. Bug: 230495929 Bug: 230534572 Bug: 170249807 Test: com.android.settings.UtilsTest Test: make RunSettingsRoboTests -j Change-Id: Id04d45839ef61080b00ca2f91525718cb3a85120
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.