Merge "Disconnect dock only if its connected." into gingerbread
This commit is contained in:
committed by
Android (Google) Code Review
commit
022299dfce
@@ -718,9 +718,12 @@ public class DockService extends Service implements AlertDialog.OnMultiChoiceCli
|
|||||||
// Checked but not connected
|
// Checked but not connected
|
||||||
callConnect = true;
|
callConnect = true;
|
||||||
} else if (!mCheckedItems[i]) {
|
} else if (!mCheckedItems[i]) {
|
||||||
// Unchecked but connected
|
// Unchecked, may or may not be connected.
|
||||||
if (DEBUG) Log.d(TAG, "applyBtSettings - Disconnecting");
|
int status = profileManager.getConnectionStatus(cachedDevice.getDevice());
|
||||||
cachedDevice.disconnect(mProfiles[i]);
|
if (SettingsBtStatus.isConnectionStatusConnected(status)) {
|
||||||
|
if (DEBUG) Log.d(TAG, "applyBtSettings - Disconnecting");
|
||||||
|
cachedDevice.disconnect(mProfiles[i]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
profileManager.setPreferred(device, mCheckedItems[i]);
|
profileManager.setPreferred(device, mCheckedItems[i]);
|
||||||
if (DEBUG) {
|
if (DEBUG) {
|
||||||
|
Reference in New Issue
Block a user