jobService is moved to mainline module. It is not registered in the system at the beginning, therefore getSystemService returns null. Instead of getSystemService, directly create a JobSchedulerImpl and mock getSystemService method to return the JobSchedulerImpl instance. Fixes: 138714772 Test: make RunSettingsRoboTests Change-Id: If91b6a63c0de92530d69f7b80515669352aab760
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.