This method check whether it has connected profile, not physical connection between devices. It make more sense to use it in settings: 1. We only care about whether it has active profile(i.e. A2dp, hfp..) 2. Sometime when profile is disconnected, BluetoothDevice.isConnected() still return true. This may make UI flaky. Bug: 79947085 Test: RunSettingsRoboTests Change-Id: I44039704508a742c7a8aef0a035afcf169b08939
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.