am 46a2941b
: Merge "Return profile state disconnected when not yet bound to service." into honeycomb-mr1
* commit '46a2941b3f2e5c38388f3e503a22768ca2d9814a': Return profile state disconnected when not yet bound to service.
This commit is contained in:
@@ -133,6 +133,8 @@ final class HeadsetProfile implements LocalBluetoothProfile {
|
||||
}
|
||||
|
||||
public int getConnectionStatus(BluetoothDevice device) {
|
||||
if (mService == null) return BluetoothProfile.STATE_DISCONNECTED;
|
||||
|
||||
List<BluetoothDevice> deviceList = mService.getConnectedDevices();
|
||||
|
||||
return !deviceList.isEmpty() && deviceList.get(0).equals(device)
|
||||
|
Reference in New Issue
Block a user