summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMichael Chan <mchan@android.com>2009-12-21 14:36:14 -0800
committerAndroid Git Automerger <android-git-automerger@android.com>2009-12-21 14:36:14 -0800
commitf4ec356df960245889da6f7518ec28c862ebf5e6 (patch)
treeae6131418828de495c99289fa250ee06e174ae21 /src
parenteea5133fa927afcc90a70a5026d3873821b2dfd3 (diff)
parentd8eec52a3786a51b38ed280afd84005e6da05ce6 (diff)
downloadpackages_apps_settings-f4ec356df960245889da6f7518ec28c862ebf5e6.zip
packages_apps_settings-f4ec356df960245889da6f7518ec28c862ebf5e6.tar.gz
packages_apps_settings-f4ec356df960245889da6f7518ec28c862ebf5e6.tar.bz2
am d8eec52a: b/2318290 connect should be called instead of connect(profile) if device is unpaired.
Merge commit 'd8eec52a3786a51b38ed280afd84005e6da05ce6' into eclair-plus-aosp * commit 'd8eec52a3786a51b38ed280afd84005e6da05ce6': b/2318290 connect should be called instead of connect(profile) if device is unpaired.
Diffstat (limited to 'src')
-rw-r--r--src/com/android/settings/bluetooth/DockService.java13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/com/android/settings/bluetooth/DockService.java b/src/com/android/settings/bluetooth/DockService.java
index 5bf0214..1ad2987 100644
--- a/src/com/android/settings/bluetooth/DockService.java
+++ b/src/com/android/settings/bluetooth/DockService.java
@@ -459,19 +459,19 @@ public class DockService extends Service implements AlertDialog.OnMultiChoiceCli
mPendingDevice = null;
+ boolean callConnect = false;
+ CachedBluetoothDevice cachedDevice = getCachedBluetoothDevice(mContext, mBtManager,
+ device);
for (int i = 0; i < mProfiles.length; i++) {
LocalBluetoothProfileManager profileManager = LocalBluetoothProfileManager
.getProfileManager(mBtManager, mProfiles[i]);
boolean isConnected = profileManager.isConnected(device);
- CachedBluetoothDevice cachedDevice = getCachedBluetoothDevice(mContext, mBtManager,
- device);
if (DEBUG) Log.d(TAG, mProfiles[i].toString() + " = " + mCheckedItems[i]);
if (mCheckedItems[i] && !isConnected) {
// Checked but not connected
- if (DEBUG) Log.d(TAG, "applyBtSettings - Connecting");
- cachedDevice.connect(mProfiles[i]);
+ callConnect = true;
} else if (!mCheckedItems[i] && isConnected) {
// Unchecked but connected
if (DEBUG) Log.d(TAG, "applyBtSettings - Disconnecting");
@@ -484,6 +484,11 @@ public class DockService extends Service implements AlertDialog.OnMultiChoiceCli
}
}
}
+
+ if (callConnect) {
+ if (DEBUG) Log.d(TAG, "applyBtSettings - Connecting");
+ cachedDevice.connect();
+ }
}
void handleUndocked(Context context, LocalBluetoothManager localManager,