am 7d8ccb41: Merge "Fix crash in BluetoothControllerImpl" into lmp-mr1-dev

* commit '7d8ccb41fa3756839597cd28cd5710c1b690e17f':
  Fix crash in BluetoothControllerImpl
This commit is contained in:
Jason Monk
2014-12-11 19:28:28 +00:00
committed by Android Git Automerger

View File

@@ -289,6 +289,7 @@ public class BluetoothControllerImpl implements BluetoothController {
.getDevicesMatchingConnectionStates(connectionType); .getDevicesMatchingConnectionStates(connectionType);
for (int k = 0; k < devices.size(); k++) { for (int k = 0; k < devices.size(); k++) {
DeviceInfo info = mDeviceInfo.get(devices.get(k)); DeviceInfo info = mDeviceInfo.get(devices.get(k));
if (info != null) {
info.connectionState = CONNECTION_STATES[i]; info.connectionState = CONNECTION_STATES[i];
if (CONNECTION_STATES[i] == BluetoothProfile.STATE_CONNECTED) { if (CONNECTION_STATES[i] == BluetoothProfile.STATE_CONNECTED) {
info.connectedProfiles.put(profile, true); info.connectedProfiles.put(profile, true);
@@ -296,6 +297,7 @@ public class BluetoothControllerImpl implements BluetoothController {
} }
} }
} }
}
if (mLastDevice == null && bondedCount == 1) { if (mLastDevice == null && bondedCount == 1) {
mLastDevice = lastBonded; mLastDevice = lastBonded;
} }