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

Commit 03cb1f15 authored by Android (Google) Code Review's avatar Android (Google) Code Review
Browse files

Merge change I249345ee into eclair-mr2

* changes:
  Add AUTO_CONNECT priority for Headset profile.
parents 732a1223 249345ee
Loading
Loading
Loading
Loading
+8 −3
Original line number Diff line number Diff line
@@ -100,9 +100,14 @@ public final class BluetoothHeadset {
    /** Connection canceled before completetion. */
    public static final int RESULT_CANCELED = 2;

    /** Default priority for headsets that should be auto-connected */
    public static final int PRIORITY_AUTO = 100;
    /** Default priority for headsets that should not be auto-connected */
    /** Default priority for headsets that  for which we will accept
     * inconing connections and auto-connect */
    public static final int PRIORITY_AUTO_CONNECT = 1000;
    /** Default priority for headsets that  for which we will accept
     * inconing connections but not auto-connect */
    public static final int PRIORITY_ON = 100;
    /** Default priority for headsets that should not be auto-connected
     * and not allow incoming connections. */
    public static final int PRIORITY_OFF = 0;

    /** The voice dialer 'works' but the user experience is poor. The voice
+0 −3
Original line number Diff line number Diff line
@@ -328,9 +328,6 @@ public class BluetoothA2dpService extends IBluetoothA2dp.Stub {
            return true;
        }

        // Sink is being disconnected, downgrade priority from AUTO_CONNECT.
        setSinkPriority(device, BluetoothA2dp.PRIORITY_ON);

        // State is CONNECTING or CONNECTED or PLAYING
        if (!disconnectSinkNative(path)) {
            return false;