As the caller of adding or removing devices may not be performing on background thread, sync problem could occur. So here we make sure all updates to UI happens on the main thread. Test: atest: com.android.settings.connecteddevice.PreviouslyConnectedDevicePreferenceControllerTest Bug: 365044575 Flag: EXEMPT bugfix Change-Id: I5b697acb7cf7469fe3bbff33b820b4e9f4c5104f
Running Settings Robolectric tests
The full suite
$ croot
$ atest SettingsRoboTests
Running a single test class
With a filter
$ croot
$ atest SettingsRoboTests:com.android.settings.display.AdaptiveSleepPreferenceControllerTest
You can also run any single test class with atest (it will try to find the correct path)
$ atest AdaptiveSleepPreferenceControllerTest