diff options
| author | Eric Laurent <elaurent@google.com> | 2010-03-17 14:59:27 -0700 |
|---|---|---|
| committer | Eric Laurent <elaurent@google.com> | 2010-03-17 19:11:59 -0700 |
| commit | d726b35ebd8660022dcea706ee6d3ca51886b04e (patch) | |
| tree | 8bf05a2ff996ef41180e383e295abfb1123f5eb2 /core/java | |
| parent | a378de742f6da53db442722894c5d68259593ef1 (diff) | |
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.
Needed for issue 2416481: Support Voice Dialer over BT SCO.
Change-Id: I237d5a984dbc4cbc88e98b85d710a6c87ba1b315
Diffstat (limited to 'core/java')
| -rw-r--r-- | core/java/android/bluetooth/BluetoothHeadset.java | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/core/java/android/bluetooth/BluetoothHeadset.java b/core/java/android/bluetooth/BluetoothHeadset.java index 251813eed6f1..fff75ca9aff2 100644 --- a/core/java/android/bluetooth/BluetoothHeadset.java +++ b/core/java/android/bluetooth/BluetoothHeadset.java @@ -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"); |
