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

Commit fdd9d187 authored by Eric Laurent's avatar Eric Laurent Committed by Android (Google) Code Review
Browse files

Merge "Added a configuration option indicating if the platform supports use of...

Merge "Added a configuration option indicating if the platform supports use of bluetooth SCO for off call use cases. Added method to BluetoothHeadset API to check if voice dialer over bluetooth is supported. Replaces direct use of DISABLE_BT_VOICE_DIALING and takes platform capabilities into account."
parents d3dd518b d726b35e
Loading
Loading
Loading
Loading
+10 −4
Original line number Diff line number Diff line
@@ -112,10 +112,6 @@ public final class BluetoothHeadset {
    /** Default priority when not set or when the device is unpaired */
    public static final int PRIORITY_UNDEFINED = -1;

    /** Set this to true to prevent the bluetooth headset from
     * activating the VoiceDialer. */
    public static final boolean DISABLE_BT_VOICE_DIALING = false;

    /**
     * An interface for notifying BluetoothHeadset IPC clients when they have
     * been connected to the BluetoothHeadset service.
@@ -384,6 +380,16 @@ public final class BluetoothHeadset {
        return -1;
    }

    /**
     * Indicates if current platform supports voice dialing over bluetooth SCO.
     * @return true if voice dialing over bluetooth is supported, false otherwise.
     * @hide
     */
    public static boolean isBluetoothVoiceDialingEnabled(Context context) {
        return context.getResources().getBoolean(
                com.android.internal.R.bool.config_bluetooth_sco_off_call);
    }

    private ServiceConnection mConnection = new ServiceConnection() {
        public void onServiceConnected(ComponentName className, IBinder service) {
            if (DBG) Log.d(TAG, "Proxy object connected");
+4 −0
Original line number Diff line number Diff line
@@ -282,4 +282,8 @@

    <!-- Component name of the service providing geocoder API support. -->
    <string name="config_geocodeProvider">@null</string>

    <!-- Boolean indicating if current platform supports bluetooth SCO for off call
    use cases -->
    <bool name="config_bluetooth_sco_off_call">true</bool>
</resources>