Projects >> packages_apps_Settings >>0d711637a256d26d640d7ff870117ff947989186

Chunk
Conflicting content
        @Override
        public boolean disconnect(BluetoothDevice device) {
<<<<<<< HEAD
            Set deviceSet = getConnectedDevices();
            BluetoothDevice[] devices = deviceSet.toArray(new BluetoothDevice[deviceSet.size()]);
            if (devices.length != 0 && devices[0].equals(device)) {
=======
            BluetoothDevice currDevice = mService.getCurrentHeadset();
            if (currDevice != null && currDevice.equals(device)) {
>>>>>>> 836b4297ccde47ae6356b2a805394d3285368144
                // Downgrade prority as user is disconnecting the headset.
                if (mService.getPriority(device) > BluetoothProfile.PRIORITY_ON) {
                    mService.setPriority(device, BluetoothProfile.PRIORITY_ON);
Solution content
        @Override
        public boolean disconnect(BluetoothDevice device) {
            Set deviceSet = getConnectedDevices();
            BluetoothDevice[] devices = deviceSet.toArray(new BluetoothDevice[deviceSet.size()]);
            if (devices.length != 0 && devices[0].equals(device)) {
                // Downgrade prority as user is disconnecting the headset.
                if (mService.getPriority(device) > BluetoothProfile.PRIORITY_ON) {
                    mService.setPriority(device, BluetoothProfile.PRIORITY_ON);
File
LocalBluetoothProfileManager.java
Developer's decision
Version 1
Kind of conflict
If statement
Method invocation
Variable