Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6c01d130 authored by Android (Google) Code Review's avatar Android (Google) Code Review
Browse files

Merge change I42499a85 into eclair-mr2

* changes:
  Change priority for Headset profile on the same lines as A2DP profile.
parents 4cb03801 42499a85
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -176,6 +176,8 @@ public abstract class LocalBluetoothProfileManager {

        @Override
        public boolean disconnect(BluetoothDevice device) {
            // Downgrade priority as user is disconnecting the sink.
            mService.setSinkPriority(device, BluetoothA2dp.PRIORITY_ON);
            return mService.disconnectSink(device);
        }

@@ -269,6 +271,8 @@ public abstract class LocalBluetoothProfileManager {
        @Override
        public boolean disconnect(BluetoothDevice device) {
            if (mService.getCurrentHeadset().equals(device)) {
                // Downgrade prority as user is disconnecting the headset.
                mService.setPriority(device, BluetoothHeadset.PRIORITY_ON);
                return mService.disconnectHeadset();
            } else {
                return false;
@@ -302,7 +306,7 @@ public abstract class LocalBluetoothProfileManager {
        @Override
        public void setPreferred(BluetoothDevice device, boolean preferred) {
            mService.setPriority(device,
                    preferred ? BluetoothHeadset.PRIORITY_AUTO : BluetoothHeadset.PRIORITY_OFF);
                    preferred ? BluetoothHeadset.PRIORITY_AUTO_CONNECT : BluetoothHeadset.PRIORITY_OFF);
        }

        @Override