diff options
| author | Matthew Xie <mattx@google.com> | 2011-07-20 17:10:40 -0700 |
|---|---|---|
| committer | Matthew Xie <mattx@google.com> | 2011-07-20 17:12:52 -0700 |
| commit | e3dc975acb716eede4abb0d1f4a5f969f92fc307 (patch) | |
| tree | 4362b09f7b2ee9a30a41c6362752cbc3530a32ab | |
| parent | 4a8df318b06a85a90309149ebcbff3b25077de15 (diff) | |
| download | frameworks_base-e3dc975acb716eede4abb0d1f4a5f969f92fc307.zip frameworks_base-e3dc975acb716eede4abb0d1f4a5f969f92fc307.tar.gz frameworks_base-e3dc975acb716eede4abb0d1f4a5f969f92fc307.tar.bz2 | |
when disconnectHeadsetInternal, allow it when the BT is not disabled
The old code allowed the disconnection only when BT is enabled. This
caused a bug during BT turning off that Headset connection failed
to disconnect.
Change-Id: Iba15a1595b6987064f071ad90bbb126a6edfe6b5
| -rw-r--r-- | core/java/android/bluetooth/BluetoothHeadset.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/java/android/bluetooth/BluetoothHeadset.java b/core/java/android/bluetooth/BluetoothHeadset.java index 3284361..8f2b3d8 100644 --- a/core/java/android/bluetooth/BluetoothHeadset.java +++ b/core/java/android/bluetooth/BluetoothHeadset.java @@ -661,7 +661,7 @@ public final class BluetoothHeadset implements BluetoothProfile { */ public boolean disconnectHeadsetInternal(BluetoothDevice device) { if (DBG) log("disconnectHeadsetInternal"); - if (mService != null && isEnabled()) { + if (mService != null && !isDisabled()) { try { return mService.disconnectHeadsetInternal(device); } catch (RemoteException e) {Log.e(TAG, e.toString());} |
