b/2154576 Fixed the problem were some BT profiles were not connected when first UUID notification of many didn't have all the UUIDs

Reset connect timer event if profile was non-empty.
Clear profiles after unpair
mConnectAttemptedWithoutUuid

Change-Id: I5eab1270a755c6c87eb5be13a2f43dbbcd9a2f88
This commit is contained in:
Michael Chan
2009-09-30 12:18:51 -07:00
parent cabb147ce5
commit eaf13a2c15
3 changed files with 40 additions and 21 deletions

View File

@@ -176,7 +176,7 @@ public class CachedBluetoothDeviceManager {
return;
}
cachedDevice.refresh();
cachedDevice.onBondingStateChanged(bondState);
if (bondState == BluetoothDevice.BOND_BONDED) {
// Auto-connect after pairing
@@ -185,13 +185,13 @@ public class CachedBluetoothDeviceManager {
}
/**
* Called when there is a bonding error.
* Called when we have reached the un-bond state.
*
* @param device The remote device.
* @param reason The reason, one of the error reasons from
* BluetoothDevice.UNBOND_REASON_*
*/
public synchronized void onBondingError(BluetoothDevice device, int reason) {
public synchronized void showUnbondMessage(BluetoothDevice device, int reason) {
int errorMsg;
switch(reason) {
@@ -214,7 +214,7 @@ public class CachedBluetoothDeviceManager {
mLocalManager.showError(device, R.string.bluetooth_error_title, errorMsg);
break;
default:
Log.w(TAG, "onBondingError: Not displaying any error message for reason:" + reason);
Log.w(TAG, "showUnbondMessage: Not displaying any message for reason:" + reason);
break;
}
}