summaryrefslogtreecommitdiffstats
path: root/core/java
diff options
context:
space:
mode:
authorJaikumar Ganesh <jaikumar@google.com>2010-11-11 11:20:14 -0800
committerAndroid (Google) Code Review <android-gerrit@google.com>2010-11-11 11:20:14 -0800
commit53f0f36352919d83b7a063da2d45ca0003ff5b36 (patch)
tree23f55bd3b148016955404ab96654382de5edd422 /core/java
parentf170a345b3effa57a545938f4624d9c7142694f5 (diff)
parentb0a1d01b4c044a0779cfe006e204bac468459802 (diff)
downloadframeworks_base-53f0f36352919d83b7a063da2d45ca0003ff5b36.zip
frameworks_base-53f0f36352919d83b7a063da2d45ca0003ff5b36.tar.gz
frameworks_base-53f0f36352919d83b7a063da2d45ca0003ff5b36.tar.bz2
Merge "Make AUDIO_STATE_CONNECTING in BluetoothHeadset public."
Diffstat (limited to 'core/java')
-rw-r--r--core/java/android/bluetooth/BluetoothHeadset.java24
1 files changed, 14 insertions, 10 deletions
diff --git a/core/java/android/bluetooth/BluetoothHeadset.java b/core/java/android/bluetooth/BluetoothHeadset.java
index f63a5c5..d5b0042 100644
--- a/core/java/android/bluetooth/BluetoothHeadset.java
+++ b/core/java/android/bluetooth/BluetoothHeadset.java
@@ -184,29 +184,29 @@ public final class BluetoothHeadset implements BluetoothProfile {
"android.bluetooth.headset.intent.category.companyid";
/**
- * Headset state when SCO audio is connected
+ * Headset state when SCO audio is not connected
* This state can be one of
* {@link #EXTRA_STATE} or {@link #EXTRA_PREVIOUS_STATE} of
* {@link #ACTION_AUDIO_STATE_CHANGED} intent.
*/
- public static final int STATE_AUDIO_CONNECTED = 10;
+ public static final int STATE_AUDIO_DISCONNECTED = 10;
/**
* Headset state when SCO audio is connecting
* This state can be one of
* {@link #EXTRA_STATE} or {@link #EXTRA_PREVIOUS_STATE} of
* {@link #ACTION_AUDIO_STATE_CHANGED} intent.
- * @hide
*/
- public static final int STATE_AUDIO_CONNECTING = 12;
+ public static final int STATE_AUDIO_CONNECTING = 11;
/**
- * Headset state when SCO audio is not connected
+ * Headset state when SCO audio is connected
* This state can be one of
* {@link #EXTRA_STATE} or {@link #EXTRA_PREVIOUS_STATE} of
* {@link #ACTION_AUDIO_STATE_CHANGED} intent.
*/
- public static final int STATE_AUDIO_DISCONNECTED = 11;
+ public static final int STATE_AUDIO_CONNECTED = 12;
+
private Context mContext;
private ServiceListener mServiceListener;
@@ -377,11 +377,15 @@ public final class BluetoothHeadset implements BluetoothProfile {
* audio connection.
*
* <p> 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}.
*
- * <p>Requires {@link android.Manifest.permission#BLUETOOTH}
+ * <p> {@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.
+ *
+ * <p>Requires {@link android.Manifest.permission#BLUETOOTH} permission.
*
* @param device Bluetooth headset
* @return false if there is no headset connected of if the