diff options
Diffstat (limited to 'src/com/android/settings/bluetooth/CachedBluetoothDevice.java')
-rw-r--r-- | src/com/android/settings/bluetooth/CachedBluetoothDevice.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/com/android/settings/bluetooth/CachedBluetoothDevice.java b/src/com/android/settings/bluetooth/CachedBluetoothDevice.java index 8ddeef5..db20411 100644 --- a/src/com/android/settings/bluetooth/CachedBluetoothDevice.java +++ b/src/com/android/settings/bluetooth/CachedBluetoothDevice.java @@ -111,8 +111,10 @@ class CachedBluetoothDevice implements Comparable<CachedBluetoothDevice> { " newProfileState " + newProfileState); } - int newState = LocalBluetoothProfileManager.getProfileManager(mLocalManager, - profile).convertState(newProfileState); + final LocalBluetoothProfileManager pm = + LocalBluetoothProfileManager.getProfileManager(mLocalManager, profile); + if (pm == null) return; + int newState = pm.convertState(newProfileState); if (newState == SettingsBtStatus.CONNECTION_STATUS_CONNECTED) { if (!mProfiles.contains(profile)) { |