Root cause: When the default captioning color was selected, the opacity became 100% and made the opacity preference is disabled. After changing to non-default color, the opacity preference becomes enabled, but it keeps showing cached opacity in opacity preference and the preview still shows the wrong color. Solution: Cache the latest opacity if default captioning color was selected to show the correct opacity later. Bug: 241308551 Test: make RunSettingsRoboTests ROBOTEST_FILTER=com.android.settings.accessibility Change-Id: I7712fb25d622da62d7fb2d017e33f94ef258941b
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.