auto import from //branches/cupcake/...@132569

This commit is contained in:
The Android Open Source Project
2009-02-20 07:38:33 -08:00
parent 4772968987
commit 90e190609a
16 changed files with 18 additions and 17 deletions

View File

@@ -92,7 +92,7 @@ public class BluetoothEventRedirector {
int oldState = intent.getIntExtra(BluetoothIntent.HEADSET_PREVIOUS_STATE, 0);
if (newState == BluetoothHeadset.STATE_DISCONNECTED &&
oldState == BluetoothHeadset.STATE_CONNECTING) {
mManager.getLocalDeviceManager().onConnectingError(address);
Log.i(TAG, "Failed to connect BT headset");
}
} else if (action.equals(BluetoothA2dp.SINK_STATE_CHANGED_ACTION)) {
@@ -102,7 +102,7 @@ public class BluetoothEventRedirector {
int oldState = intent.getIntExtra(BluetoothA2dp.SINK_PREVIOUS_STATE, 0);
if (newState == BluetoothA2dp.STATE_DISCONNECTED &&
oldState == BluetoothA2dp.STATE_CONNECTING) {
mManager.getLocalDeviceManager().onConnectingError(address);
Log.i(TAG, "Failed to connect BT A2DP");
}
} else if (action.equals(BluetoothIntent.REMOTE_DEVICE_CLASS_UPDATED_ACTION)) {

View File

@@ -30,6 +30,7 @@ import android.content.res.Resources;
import android.os.IBinder;
import android.os.RemoteException;
import android.text.TextUtils;
import android.util.Log;
import android.view.ContextMenu;
import android.view.Menu;
import android.view.MenuItem;
@@ -190,7 +191,7 @@ public class LocalBluetoothDevice implements Comparable<LocalBluetoothDevice> {
int status = profileManager.getConnectionStatus(mAddress);
if (!SettingsBtStatus.isConnectionStatusConnected(status)) {
if (profileManager.connect(mAddress) != BluetoothDevice.RESULT_SUCCESS) {
showConnectingError();
Log.i(TAG, "Failed to connect " + profile.toString() + " to " + mName);
}
}
}