am cce52bd3
: Merge "Fix NPE in bluetooth Permission Activity" into jb-mr1-dev
* commit 'cce52bd3a5162326493e4374c9ddc4f333351da7': Fix NPE in bluetooth Permission Activity
This commit is contained in:
9
src/com/android/settings/bluetooth/BluetoothPermissionActivity.java
Normal file → Executable file
9
src/com/android/settings/bluetooth/BluetoothPermissionActivity.java
Normal file → Executable file
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user