From b0a1d01b4c044a0779cfe006e204bac468459802 Mon Sep 17 00:00:00 2001 From: Jaikumar Ganesh Date: Thu, 11 Nov 2010 10:49:46 -0800 Subject: Make AUDIO_STATE_CONNECTING in BluetoothHeadset public. As the SCO connection is done on a separate thread, this state is needed to prevent silent failures in case of APIs like voicerecognition. Change-Id: Id08725323a2c847df4d3bd9f60e42fde46100707 --- api/current.xml | 15 ++++++++++++-- core/java/android/bluetooth/BluetoothHeadset.java | 24 +++++++++++++---------- 2 files changed, 27 insertions(+), 12 deletions(-) diff --git a/api/current.xml b/api/current.xml index 88d7b6a..504dab4 100644 --- a/api/current.xml +++ b/api/current.xml @@ -39747,14 +39747,14 @@ type="int" transient="false" volatile="false" - value="10" + value="12" static="true" final="true" deprecated="not deprecated" visibility="public" > - + + Users can listen to {@link #ACTION_AUDIO_STATE_CHANGED}. - * {@link #EXTRA_STATE} will be set to {@link #STATE_AUDIO_CONNECTED} - * when the audio connection is established, - * and to {@link #STATE_AUDIO_DISCONNECTED} in case of failure. + * If this function returns true, this intent will be broadcasted with + * {@link #EXTRA_STATE} set to {@link #STATE_AUDIO_CONNECTING}. * - *

Requires {@link android.Manifest.permission#BLUETOOTH} + *

{@link #EXTRA_STATE} will transition from + * {@link #STATE_AUDIO_CONNECTING} to {@link #STATE_AUDIO_CONNECTED} when + * audio connection is established and to {@link #STATE_AUDIO_DISCONNECTED} + * in case of failure to establish the audio connection. + * + *

Requires {@link android.Manifest.permission#BLUETOOTH} permission. * * @param device Bluetooth headset * @return false if there is no headset connected of if the -- cgit v1.1