The preference will be accidentally shown if the device support HAP and VCP. Make sure to hide the preference when the device doesn't have any valid ambient control points. Flag: EXEMPT bugfix Test: manual test with real device Test: atest BluetoothDetailsAmbientVolumePreferenceControllerTest Bug: 388156028 Change-Id: I8162ce8e878baff414e4665c97aaf1c21aa51229
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