commit | 1206321f388333030d6301d806c826f9b3699005 | [log] [tgz] |
---|---|---|
author | Jason Monk <jmonk@google.com> | Thu Dec 11 13:23:18 2014 -0500 |
committer | Jason Monk <jmonk@google.com> | Thu Dec 11 13:26:01 2014 -0500 |
tree | 10ebc36d515fcbfe134df289500ff3d5260ad302 | |
parent | 4630c89a7642d1ae0d528f6d8e23cf89cba01b7d [diff] |
Fix crash in BluetoothControllerImpl Bug: 18717777 Change-Id: I396aa8b517054b1fd4c8fea7f0343f138cb261a7
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/BluetoothControllerImpl.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/BluetoothControllerImpl.java index 076cfe2..229c558 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/BluetoothControllerImpl.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/BluetoothControllerImpl.java
@@ -289,9 +289,11 @@ .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); + } } } }