Fixed view reuse. The views obtained from the ViewHolder should not be stored in Preference fields, since they can be rebound and thus a Preference can end up updating the wrong view. Also added equivalence to the item class in the People segment so there is no flicker when the mode is reloaded. Fixes: 346551087 Test: atest com.android.settings.notification.modes Flag: android.app.modes_ui Change-Id: Ibd89a826b19acabd9a46bb3ba2916453689636ed
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