We read from SettingsProvider to decide whether flashlight slice is available. However, when switching to the second user, FLASHLIGHT_AVAILABLE will be null. The default was 0 which causes the slice returning null, so we have to set it to 1 when there is a physical flash unit to be consistent with system ui. Fixes: 134734608 Test: robotest Change-Id: I981461b1b66e6e273e13a9cbcba96e3ccf0aec68
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.