diff options
author | Matthew Xie <mattx@google.com> | 2012-09-10 17:15:25 -0700 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2012-09-10 17:15:25 -0700 |
commit | be82dab9d5849baeb8e573e9957e1363b3467948 (patch) | |
tree | a61b58491b9ee44124e13800302c8a036b41ee48 /src | |
parent | d1481db71c553e9a628f9de38c1bb54bc73168a6 (diff) | |
parent | 206f87c5b99c5653b83ba55682ab4dd622fbfe6c (diff) | |
download | packages_apps_settings-be82dab9d5849baeb8e573e9957e1363b3467948.zip packages_apps_settings-be82dab9d5849baeb8e573e9957e1363b3467948.tar.gz packages_apps_settings-be82dab9d5849baeb8e573e9957e1363b3467948.tar.bz2 |
am 206f87c5: am cce52bd3: Merge "Fix NPE in bluetooth Permission Activity" into jb-mr1-dev
* commit '206f87c5b99c5653b83ba55682ab4dd622fbfe6c':
Fix NPE in bluetooth Permission Activity
Diffstat (limited to 'src')
-rwxr-xr-x[-rw-r--r--] | src/com/android/settings/bluetooth/BluetoothPermissionActivity.java | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/com/android/settings/bluetooth/BluetoothPermissionActivity.java b/src/com/android/settings/bluetooth/BluetoothPermissionActivity.java index 4fd6cee..16476fa 100644..100755 --- a/src/com/android/settings/bluetooth/BluetoothPermissionActivity.java +++ b/src/com/android/settings/bluetooth/BluetoothPermissionActivity.java @@ -251,6 +251,13 @@ public class BluetoothPermissionActivity extends AlertActivity implements CachedBluetoothDeviceManager cachedDeviceManager = bluetoothManager.getCachedDeviceManager(); CachedBluetoothDevice cachedDevice = cachedDeviceManager.findDevice(mDevice); - cachedDevice.setPhonebookPermissionChoice(permissionChoice); + if (cachedDevice != null ) { + cachedDevice.setPhonebookPermissionChoice(permissionChoice); + } else { + cachedDevice = cachedDeviceManager.addDevice(bluetoothManager.getBluetoothAdapter(), + bluetoothManager.getProfileManager(), + mDevice); + cachedDevice.setPhonebookPermissionChoice(permissionChoice); + } } } |