am 4d2d004b: am 46a2941b: Merge "Return profile state disconnected when not yet bound to service." into honeycomb-mr1

* commit '4d2d004b7239cc29e1d8e6c02b483ff781c19f9a':
  Return profile state disconnected when not yet bound to service.
This commit is contained in:
Jaikumar Ganesh
2011-03-08 23:53:37 -08:00
committed by Android Git Automerger

View File

@@ -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)