The existing logic and tests looks incorrect. Tests have been tidied up to reflect real cases. For example, it's not really possible for the provider to report being "blocked", but for it to report it is "certain" at the same time. Bug: 266921482 Test: atest tests/robotests/src/com/android/settings/datetime/LocationProviderStatusPreferenceControllerTest.java Change-Id: I1a0faa44ed7dd09828ff758db9e40f5d5e010ab0
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.