Root Cause: Using the listener to update the UI dynamically might have some time delay. Solution: Refactor to another implementation and avoid using the listener to update it. Additional condition: Add height restriction in preference to avoid the palette view to cover whole screen. Bug: 148785841 Test: make RunSettingsRoboTests ROBOTEST_FILTER=PaletteListPreferenceTest Change-Id: I6a854e16321b3426e2f8ff65c6404036d55caed4
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.