am 03403712
: Merge "DO NOT MERGE Add null check before disconnecting a device." into gingerbread
Merge commit '0340371297887290d7593d7c346e422a4c9ecd1a' into gingerbread-plus-aosp * commit '0340371297887290d7593d7c346e422a4c9ecd1a': DO NOT MERGE Add null check before disconnecting a device.
This commit is contained in:
@@ -379,7 +379,8 @@ public abstract class LocalBluetoothProfileManager {
|
||||
|
||||
@Override
|
||||
public boolean disconnect(BluetoothDevice device) {
|
||||
if (mService.getCurrentHeadset().equals(device)) {
|
||||
BluetoothDevice currDevice = mService.getCurrentHeadset();
|
||||
if (currDevice != null && currDevice.equals(device)) {
|
||||
// Downgrade prority as user is disconnecting the headset.
|
||||
if (mService.getPriority(device) > BluetoothHeadset.PRIORITY_ON) {
|
||||
mService.setPriority(device, BluetoothHeadset.PRIORITY_ON);
|
||||
|
Reference in New Issue
Block a user