Fix crash in BluetoothControllerImpl

Bug: 18717777
Change-Id: I396aa8b517054b1fd4c8fea7f0343f138cb261a7
This commit is contained in:
Jason Monk
2014-12-11 13:23:18 -05:00
parent 4630c89a76
commit 1206321f38

View File

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