commit | 4aae54cf29c562a6c59ee47732745a224fa2882d | [log] [tgz] |
---|---|---|
author | Jaikumar Ganesh <jaikumar@google.com> | Wed Apr 07 17:28:08 2010 -0700 |
committer | Jaikumar Ganesh <jaikumar@google.com> | Wed Apr 07 17:28:08 2010 -0700 |
tree | 606e9e217ae05371870a95260bbf673c6153403d | |
parent | fede9aed2b1f0b6316e18cbfa58be593fa7eb14c [diff] |
Don't allow connection to profiles in TURNING_OFF state. A similar change will be made for other profiles. Bug: 2577713 Dr No: jsh/eastham Change-Id: Ifca0fbb108e705acefbaeabff07fad83c08f7baa
diff --git a/core/java/android/server/BluetoothA2dpService.java b/core/java/android/server/BluetoothA2dpService.java index 096ad39..08cd2f0 100644 --- a/core/java/android/server/BluetoothA2dpService.java +++ b/core/java/android/server/BluetoothA2dpService.java
@@ -313,6 +313,8 @@ "Need BLUETOOTH_ADMIN permission"); if (DBG) log("connectSink(" + device + ")"); + if (!mBluetoothService.isEnabled()) return false; + // ignore if there are any active sinks if (lookupSinksMatchingStates(new int[] { BluetoothA2dp.STATE_CONNECTING,