On some devices, it is possible that config_enableWallpaperService is false, in which then there is no wallpaper service on device. Calling WallpaperManager#getWallpaperId will then result in an NPE. We should just do a check and return false. Bug: 62387789 Test: RoboSettingsTest Change-Id: I31db6845f06533d92140bf91d0f7fc7e7bedc5c5
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.