summaryrefslogtreecommitdiff
path: root/framework/java/android/bluetooth/BluetoothHeadsetClient.java
diff options
context:
space:
mode:
authorSal Savage <salsavage@google.com>2022-02-07 09:05:50 -0800
committerSal Savage <salsavage@google.com>2022-02-25 21:30:52 +0000
commit409928739404d156fa7d2d76dd6c9c05f398c753 (patch)
tree4d95241f288af990abec66830b8e99ee866f0a6e /framework/java/android/bluetooth/BluetoothHeadsetClient.java
parent5470e5be65f8fbdb36fcf969cb12dc3fbb158816 (diff)
Update public function documentation and address removed spacing
This change inherits the documentation from the parent class definitions where it can, so our profile proxy can be more in line with others. It alse seems an auto-formatter removed a lot of the white space in the class at somepoint. This change puts back spaces between methods and some of the constants. Tag: #refactor Bug: 216832546 Test: atest BluetoothInstrumentationTests Change-Id: Iac740cca2a62273b1cc84558a65f2aba294ec031
Diffstat (limited to 'framework/java/android/bluetooth/BluetoothHeadsetClient.java')
-rw-r--r--framework/java/android/bluetooth/BluetoothHeadsetClient.java146
1 files changed, 129 insertions, 17 deletions
diff --git a/framework/java/android/bluetooth/BluetoothHeadsetClient.java b/framework/java/android/bluetooth/BluetoothHeadsetClient.java
index f1402d485d..33049c49a7 100644
--- a/framework/java/android/bluetooth/BluetoothHeadsetClient.java
+++ b/framework/java/android/bluetooth/BluetoothHeadsetClient.java
@@ -59,6 +59,7 @@ public final class BluetoothHeadsetClient implements BluetoothProfile, AutoClose
private static final boolean DBG = true;
private static final boolean VDBG = false;
private final CloseGuard mCloseGuard;
+
/**
* Intent used to broadcast the change in connection state of the HFP Client profile.
*
@@ -85,6 +86,7 @@ public final class BluetoothHeadsetClient implements BluetoothProfile, AutoClose
@SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION)
public static final String ACTION_CONNECTION_STATE_CHANGED =
"android.bluetooth.headsetclient.profile.action.CONNECTION_STATE_CHANGED";
+
/**
* Intent sent whenever audio state changes.
*
@@ -109,6 +111,7 @@ public final class BluetoothHeadsetClient implements BluetoothProfile, AutoClose
@SuppressLint("ActionValue")
public static final String ACTION_AUDIO_STATE_CHANGED =
"android.bluetooth.headsetclient.profile.action.AUDIO_STATE_CHANGED";
+
/**
* Intent sending updates of the Audio Gateway state.
* Each extra is being sent only when value it
@@ -129,6 +132,7 @@ public final class BluetoothHeadsetClient implements BluetoothProfile, AutoClose
@SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION)
public static final String ACTION_AG_EVENT =
"android.bluetooth.headsetclient.profile.action.AG_EVENT";
+
/**
* Intent sent whenever state of a call changes.
*
@@ -144,6 +148,7 @@ public final class BluetoothHeadsetClient implements BluetoothProfile, AutoClose
@SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION)
public static final String ACTION_CALL_CHANGED =
"android.bluetooth.headsetclient.profile.action.AG_CALL_CHANGED";
+
/**
* Intent that notifies about the result of the last issued action.
* Please note that not every action results in explicit action result code being sent.
@@ -158,6 +163,7 @@ public final class BluetoothHeadsetClient implements BluetoothProfile, AutoClose
@SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION)
public static final String ACTION_RESULT =
"android.bluetooth.headsetclient.profile.action.RESULT";
+
/**
* Intent that notifies about vendor specific event arrival. Events not defined in
* HFP spec will be matched with supported vendor event list and this intent will
@@ -172,6 +178,7 @@ public final class BluetoothHeadsetClient implements BluetoothProfile, AutoClose
@SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION)
public static final String ACTION_VENDOR_SPECIFIC_HEADSETCLIENT_EVENT =
"android.bluetooth.headsetclient.profile.action.VENDOR_SPECIFIC_EVENT";
+
/**
* Intent that notifies about the number attached to the last voice tag
* recorded on AG.
@@ -187,21 +194,25 @@ public final class BluetoothHeadsetClient implements BluetoothProfile, AutoClose
@SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION)
public static final String ACTION_LAST_VTAG =
"android.bluetooth.headsetclient.profile.action.LAST_VTAG";
+
/**
* @hide
*/
@SystemApi
public static final int STATE_AUDIO_DISCONNECTED = 0;
+
/**
* @hide
*/
@SystemApi
public static final int STATE_AUDIO_CONNECTING = 1;
+
/**
* @hide
*/
@SystemApi
public static final int STATE_AUDIO_CONNECTED = 2;
+
/**
* Extra with information if connected audio is WBS.
* <p>Possible values: <code>true</code>,
@@ -211,6 +222,7 @@ public final class BluetoothHeadsetClient implements BluetoothProfile, AutoClose
*/
public static final String EXTRA_AUDIO_WBS =
"android.bluetooth.headsetclient.extra.AUDIO_WBS";
+
/**
* Extra for AG_EVENT indicates network status.
* <p>Value: 0 - network unavailable,
@@ -220,6 +232,7 @@ public final class BluetoothHeadsetClient implements BluetoothProfile, AutoClose
*/
public static final String EXTRA_NETWORK_STATUS =
"android.bluetooth.headsetclient.extra.NETWORK_STATUS";
+
/**
* Extra for AG_EVENT intent indicates network signal strength.
* <p>Value: <code>Integer</code> representing signal strength.</p>
@@ -228,6 +241,7 @@ public final class BluetoothHeadsetClient implements BluetoothProfile, AutoClose
*/
public static final String EXTRA_NETWORK_SIGNAL_STRENGTH =
"android.bluetooth.headsetclient.extra.NETWORK_SIGNAL_STRENGTH";
+
/**
* Extra for AG_EVENT intent indicates roaming state.
* <p>Value: 0 - no roaming
@@ -237,6 +251,7 @@ public final class BluetoothHeadsetClient implements BluetoothProfile, AutoClose
*/
public static final String EXTRA_NETWORK_ROAMING =
"android.bluetooth.headsetclient.extra.NETWORK_ROAMING";
+
/**
* Extra for AG_EVENT intent indicates the battery level.
* <p>Value: <code>Integer</code> representing signal strength.</p>
@@ -245,6 +260,7 @@ public final class BluetoothHeadsetClient implements BluetoothProfile, AutoClose
*/
public static final String EXTRA_BATTERY_LEVEL =
"android.bluetooth.headsetclient.extra.BATTERY_LEVEL";
+
/**
* Extra for AG_EVENT intent indicates operator name.
* <p>Value: <code>String</code> representing operator name.</p>
@@ -253,6 +269,7 @@ public final class BluetoothHeadsetClient implements BluetoothProfile, AutoClose
*/
public static final String EXTRA_OPERATOR_NAME =
"android.bluetooth.headsetclient.extra.OPERATOR_NAME";
+
/**
* Extra for AG_EVENT intent indicates voice recognition state.
* <p>Value:
@@ -263,6 +280,7 @@ public final class BluetoothHeadsetClient implements BluetoothProfile, AutoClose
*/
public static final String EXTRA_VOICE_RECOGNITION =
"android.bluetooth.headsetclient.extra.VOICE_RECOGNITION";
+
/**
* Extra for AG_EVENT intent indicates in band ring state.
* <p>Value:
@@ -273,6 +291,7 @@ public final class BluetoothHeadsetClient implements BluetoothProfile, AutoClose
*/
public static final String EXTRA_IN_BAND_RING =
"android.bluetooth.headsetclient.extra.IN_BAND_RING";
+
/**
* Extra for AG_EVENT intent indicates subscriber info.
* <p>Value: <code>String</code> containing subscriber information.</p>
@@ -281,6 +300,7 @@ public final class BluetoothHeadsetClient implements BluetoothProfile, AutoClose
*/
public static final String EXTRA_SUBSCRIBER_INFO =
"android.bluetooth.headsetclient.extra.SUBSCRIBER_INFO";
+
/**
* Extra for AG_CALL_CHANGED intent indicates the
* {@link BluetoothHeadsetClientCall} object that has changed.
@@ -289,6 +309,7 @@ public final class BluetoothHeadsetClient implements BluetoothProfile, AutoClose
*/
public static final String EXTRA_CALL =
"android.bluetooth.headsetclient.extra.CALL";
+
/**
* Extra for ACTION_LAST_VTAG intent.
* <p>Value: <code>String</code> representing phone number
@@ -298,6 +319,7 @@ public final class BluetoothHeadsetClient implements BluetoothProfile, AutoClose
*/
public static final String EXTRA_NUMBER =
"android.bluetooth.headsetclient.extra.NUMBER";
+
/**
* Extra for ACTION_RESULT intent that shows the result code of
* last issued action.
@@ -315,6 +337,7 @@ public final class BluetoothHeadsetClient implements BluetoothProfile, AutoClose
*/
public static final String EXTRA_RESULT_CODE =
"android.bluetooth.headsetclient.extra.RESULT_CODE";
+
/**
* Extra for ACTION_RESULT intent that shows the extended result code of
* last issued action.
@@ -324,6 +347,7 @@ public final class BluetoothHeadsetClient implements BluetoothProfile, AutoClose
*/
public static final String EXTRA_CME_CODE =
"android.bluetooth.headsetclient.extra.CME_CODE";
+
/**
* Extra for VENDOR_SPECIFIC_HEADSETCLIENT_EVENT intent that
* indicates vendor ID.
@@ -332,7 +356,8 @@ public final class BluetoothHeadsetClient implements BluetoothProfile, AutoClose
*/
public static final String EXTRA_VENDOR_ID =
"android.bluetooth.headsetclient.extra.VENDOR_ID";
- /**
+
+ /**
* Extra for VENDOR_SPECIFIC_HEADSETCLIENT_EVENT intent that
* indicates vendor event code.
*
@@ -340,7 +365,8 @@ public final class BluetoothHeadsetClient implements BluetoothProfile, AutoClose
*/
public static final String EXTRA_VENDOR_EVENT_CODE =
"android.bluetooth.headsetclient.extra.VENDOR_EVENT_CODE";
- /**
+
+ /**
* Extra for VENDOR_SPECIFIC_HEADSETCLIENT_EVENT intent that
* contains full vendor event including event code and full arguments.
*
@@ -348,6 +374,7 @@ public final class BluetoothHeadsetClient implements BluetoothProfile, AutoClose
*/
public static final String EXTRA_VENDOR_EVENT_FULL_ARGS =
"android.bluetooth.headsetclient.extra.VENDOR_EVENT_FULL_ARGS";
+
/* Extras for AG_FEATURES, extras type is boolean */
// TODO verify if all of those are actually useful
/**
@@ -357,6 +384,7 @@ public final class BluetoothHeadsetClient implements BluetoothProfile, AutoClose
*/
public static final String EXTRA_AG_FEATURE_3WAY_CALLING =
"android.bluetooth.headsetclient.extra.EXTRA_AG_FEATURE_3WAY_CALLING";
+
/**
* AG feature: voice recognition.
*
@@ -364,6 +392,7 @@ public final class BluetoothHeadsetClient implements BluetoothProfile, AutoClose
*/
public static final String EXTRA_AG_FEATURE_VOICE_RECOGNITION =
"android.bluetooth.headsetclient.extra.EXTRA_AG_FEATURE_VOICE_RECOGNITION";
+
/**
* AG feature: fetching phone number for voice tagging procedure.
*
@@ -371,6 +400,7 @@ public final class BluetoothHeadsetClient implements BluetoothProfile, AutoClose
*/
public static final String EXTRA_AG_FEATURE_ATTACH_NUMBER_TO_VT =
"android.bluetooth.headsetclient.extra.EXTRA_AG_FEATURE_ATTACH_NUMBER_TO_VT";
+
/**
* AG feature: ability to reject incoming call.
*
@@ -378,6 +408,7 @@ public final class BluetoothHeadsetClient implements BluetoothProfile, AutoClose
*/
public static final String EXTRA_AG_FEATURE_REJECT_CALL =
"android.bluetooth.headsetclient.extra.EXTRA_AG_FEATURE_REJECT_CALL";
+
/**
* AG feature: enhanced call handling (terminate specific call, private consultation).
*
@@ -385,6 +416,7 @@ public final class BluetoothHeadsetClient implements BluetoothProfile, AutoClose
*/
public static final String EXTRA_AG_FEATURE_ECC =
"android.bluetooth.headsetclient.extra.EXTRA_AG_FEATURE_ECC";
+
/**
* AG feature: response and hold.
*
@@ -392,6 +424,7 @@ public final class BluetoothHeadsetClient implements BluetoothProfile, AutoClose
*/
public static final String EXTRA_AG_FEATURE_RESPONSE_AND_HOLD =
"android.bluetooth.headsetclient.extra.EXTRA_AG_FEATURE_RESPONSE_AND_HOLD";
+
/**
* AG call handling feature: accept held or waiting call in three way calling scenarios.
*
@@ -399,6 +432,7 @@ public final class BluetoothHeadsetClient implements BluetoothProfile, AutoClose
*/
public static final String EXTRA_AG_FEATURE_ACCEPT_HELD_OR_WAITING_CALL =
"android.bluetooth.headsetclient.extra.EXTRA_AG_FEATURE_ACCEPT_HELD_OR_WAITING_CALL";
+
/**
* AG call handling feature: release held or waiting call in three way calling scenarios.
*
@@ -406,6 +440,7 @@ public final class BluetoothHeadsetClient implements BluetoothProfile, AutoClose
*/
public static final String EXTRA_AG_FEATURE_RELEASE_HELD_OR_WAITING_CALL =
"android.bluetooth.headsetclient.extra.EXTRA_AG_FEATURE_RELEASE_HELD_OR_WAITING_CALL";
+
/**
* AG call handling feature: release active call and accept held or waiting call in three way
* calling scenarios.
@@ -414,6 +449,7 @@ public final class BluetoothHeadsetClient implements BluetoothProfile, AutoClose
*/
public static final String EXTRA_AG_FEATURE_RELEASE_AND_ACCEPT =
"android.bluetooth.headsetclient.extra.EXTRA_AG_FEATURE_RELEASE_AND_ACCEPT";
+
/**
* AG call handling feature: merge two calls, held and active - multi party conference mode.
*
@@ -421,6 +457,7 @@ public final class BluetoothHeadsetClient implements BluetoothProfile, AutoClose
*/
public static final String EXTRA_AG_FEATURE_MERGE =
"android.bluetooth.headsetclient.extra.EXTRA_AG_FEATURE_MERGE";
+
/**
* AG call handling feature: merge calls and disconnect from multi party
* conversation leaving peers connected to each other.
@@ -431,152 +468,189 @@ public final class BluetoothHeadsetClient implements BluetoothProfile, AutoClose
*/
public static final String EXTRA_AG_FEATURE_MERGE_AND_DETACH =
"android.bluetooth.headsetclient.extra.EXTRA_AG_FEATURE_MERGE_AND_DETACH";
+
/* Action result codes */
/**
* @hide
*/
public static final int ACTION_RESULT_OK = 0;
+
/**
* @hide
*/
public static final int ACTION_RESULT_ERROR = 1;
+
/**
* @hide
*/
public static final int ACTION_RESULT_ERROR_NO_CARRIER = 2;
+
/**
* @hide
*/
public static final int ACTION_RESULT_ERROR_BUSY = 3;
+
/**
* @hide
*/
public static final int ACTION_RESULT_ERROR_NO_ANSWER = 4;
+
/**
* @hide
*/
public static final int ACTION_RESULT_ERROR_DELAYED = 5;
+
/**
* @hide
*/
public static final int ACTION_RESULT_ERROR_BLACKLISTED = 6;
+
/**
* @hide
*/
public static final int ACTION_RESULT_ERROR_CME = 7;
+
/* Detailed CME error codes */
/**
* @hide
*/
public static final int CME_PHONE_FAILURE = 0;
+
/**
* @hide
*/
public static final int CME_NO_CONNECTION_TO_PHONE = 1;
+
/**
* @hide
*/
public static final int CME_OPERATION_NOT_ALLOWED = 3;
+
/**
* @hide
*/
public static final int CME_OPERATION_NOT_SUPPORTED = 4;
+
/**
* @hide
*/
public static final int CME_PHSIM_PIN_REQUIRED = 5;
+
/**
* @hide
*/
public static final int CME_PHFSIM_PIN_REQUIRED = 6;
+
/**
* @hide
*/
public static final int CME_PHFSIM_PUK_REQUIRED = 7;
+
/**
* @hide
*/
public static final int CME_SIM_NOT_INSERTED = 10;
+
/**
* @hide
*/
public static final int CME_SIM_PIN_REQUIRED = 11;
+
/**
* @hide
*/
public static final int CME_SIM_PUK_REQUIRED = 12;
+
/**
* @hide
*/
public static final int CME_SIM_FAILURE = 13;
+
/**
* @hide
*/
public static final int CME_SIM_BUSY = 14;
+
/**
* @hide
*/
public static final int CME_SIM_WRONG = 15;
+
/**
* @hide
*/
public static final int CME_INCORRECT_PASSWORD = 16;
+
/**
* @hide
*/
public static final int CME_SIM_PIN2_REQUIRED = 17;
+
/**
* @hide
*/
public static final int CME_SIM_PUK2_REQUIRED = 18;
+
/**
* @hide
*/
public static final int CME_MEMORY_FULL = 20;
+
/**
* @hide
*/
public static final int CME_INVALID_INDEX = 21;
+
/**
* @hide
*/
public static final int CME_NOT_FOUND = 22;
+
/**
* @hide
*/
public static final int CME_MEMORY_FAILURE = 23;
+
/**
* @hide
*/
public static final int CME_TEXT_STRING_TOO_LONG = 24;
+
/**
* @hide
*/
public static final int CME_INVALID_CHARACTER_IN_TEXT_STRING = 25;
+
/**
* @hide
*/
public static final int CME_DIAL_STRING_TOO_LONG = 26;
+
/**
* @hide
*/
public static final int CME_INVALID_CHARACTER_IN_DIAL_STRING = 27;
+
/**
* @hide
*/
public static final int CME_NO_NETWORK_SERVICE = 30;
+
/**
* @hide
*/
public static final int CME_NETWORK_TIMEOUT = 31;
+
/**
* @hide
*/
public static final int CME_EMERGENCY_SERVICE_ONLY = 32;
+
/**
* @hide
*/
public static final int CME_NO_SIMULTANOUS_VOIP_CS_CALLS = 33;
+
/**
* @hide
*/
@@ -585,63 +659,78 @@ public final class BluetoothHeadsetClient implements BluetoothProfile, AutoClose
* @hide
*/
public static final int CME_SIP_RESPONSE_CODE = 35;
+
/**
* @hide
*/
public static final int CME_NETWORK_PERSONALIZATION_PIN_REQUIRED = 40;
+
/**
* @hide
*/
public static final int CME_NETWORK_PERSONALIZATION_PUK_REQUIRED = 41;
+
/**
* @hide
*/
public static final int CME_NETWORK_SUBSET_PERSONALIZATION_PIN_REQUIRED = 42;
+
/**
* @hide
*/
public static final int CME_NETWORK_SUBSET_PERSONALIZATION_PUK_REQUIRED = 43;
+
/**
* @hide
*/
public static final int CME_SERVICE_PROVIDER_PERSONALIZATION_PIN_REQUIRED = 44;
+
/**
* @hide
*/
public static final int CME_SERVICE_PROVIDER_PERSONALIZATION_PUK_REQUIRED = 45;
+
/**
* @hide
*/
public static final int CME_CORPORATE_PERSONALIZATION_PIN_REQUIRED = 46;
+
/**
* @hide
*/
public static final int CME_CORPORATE_PERSONALIZATION_PUK_REQUIRED = 47;
+
/**
* @hide
*/
public static final int CME_HIDDEN_KEY_REQUIRED = 48;
+
/**
* @hide
*/
public static final int CME_EAP_NOT_SUPPORTED = 49;
+
/**
* @hide
*/
public static final int CME_INCORRECT_PARAMETERS = 50;
+
/* Action policy for other calls when accepting call */
/**
* @hide
*/
public static final int CALL_ACCEPT_NONE = 0;
+
/**
* @hide
*/
public static final int CALL_ACCEPT_HOLD = 1;
+
/**
* @hide
*/
public static final int CALL_ACCEPT_TERMINATE = 2;
+
private final BluetoothAdapter mAdapter;
private final AttributionSource mAttributionSource;
private final BluetoothProfileConnector<IBluetoothHeadsetClient> mProfileConnector =
@@ -652,6 +741,7 @@ public final class BluetoothHeadsetClient implements BluetoothProfile, AutoClose
return IBluetoothHeadsetClient.Stub.asInterface(service);
}
};
+
/**
* Create a BluetoothHeadsetClient proxy object.
*/
@@ -663,6 +753,7 @@ public final class BluetoothHeadsetClient implements BluetoothProfile, AutoClose
mCloseGuard = new CloseGuard();
mCloseGuard.open("close");
}
+
/**
* Close the connection to the backing service.
* Other public functions of BluetoothHeadsetClient will return default error
@@ -678,9 +769,11 @@ public final class BluetoothHeadsetClient implements BluetoothProfile, AutoClose
mCloseGuard.close();
}
}
+
private IBluetoothHeadsetClient getService() {
return mProfileConnector.getService();
}
+
/** @hide */
protected void finalize() {
if (mCloseGuard != null) {
@@ -688,6 +781,7 @@ public final class BluetoothHeadsetClient implements BluetoothProfile, AutoClose
}
close();
}
+
/**
* Connects to remote device.
*
@@ -722,6 +816,7 @@ public final class BluetoothHeadsetClient implements BluetoothProfile, AutoClose
}
return defaultValue;
}
+
/**
* Disconnects remote device
*
@@ -752,11 +847,9 @@ public final class BluetoothHeadsetClient implements BluetoothProfile, AutoClose
}
return defaultValue;
}
+
/**
- * Return the list of connected remote devices
- *
- * @return list of connected devices; empty list if nothing is connected.
- *
+ * {@inheritDoc}
* @hide
*/
@SystemApi
@@ -790,13 +883,9 @@ public final class BluetoothHeadsetClient implements BluetoothProfile, AutoClose
}
return defaultValue;
}
+
/**
- * Returns list of remote devices in a particular state
- *
- * @param states collection of states
- * @return list of devices that state matches the states listed in <code>states</code>; empty
- * list if nothing matches the <code>states</code>
- *
+ * {@inheritDoc}
* @hide
*/
@SystemApi
@@ -831,12 +920,9 @@ public final class BluetoothHeadsetClient implements BluetoothProfile, AutoClose
}
return defaultValue;
}
+
/**
- * Returns state of the <code>device</code>
- *
- * @param device a remote device
- * @return the state of connection of the device
- *
+ * {@inheritDoc}
* @hide
*/
@SystemApi
@@ -867,6 +953,7 @@ public final class BluetoothHeadsetClient implements BluetoothProfile, AutoClose
}
return defaultValue;
}
+
/**
* Set priority of the profile
*
@@ -884,6 +971,7 @@ public final class BluetoothHeadsetClient implements BluetoothProfile, AutoClose
if (DBG) log("setPriority(" + device + ", " + priority + ")");
return setConnectionPolicy(device, BluetoothAdapter.priorityToConnectionPolicy(priority));
}
+
/**
* Set connection policy of the profile
*
@@ -926,6 +1014,7 @@ public final class BluetoothHeadsetClient implements BluetoothProfile, AutoClose
}
return defaultValue;
}
+
/**
* Get the priority of the profile.
*
@@ -943,6 +1032,7 @@ public final class BluetoothHeadsetClient implements BluetoothProfile, AutoClose
if (VDBG) log("getPriority(" + device + ")");
return BluetoothAdapter.connectionPolicyToPriority(getConnectionPolicy(device));
}
+
/**
* Get the connection policy of the profile.
*
@@ -982,6 +1072,7 @@ public final class BluetoothHeadsetClient implements BluetoothProfile, AutoClose
}
return defaultValue;
}
+
/**
* Starts voice recognition.
*
@@ -1015,6 +1106,7 @@ public final class BluetoothHeadsetClient implements BluetoothProfile, AutoClose
}
return defaultValue;
}
+
/**
* Send vendor specific AT command.
*
@@ -1046,6 +1138,7 @@ public final class BluetoothHeadsetClient implements BluetoothProfile, AutoClose
}
return defaultValue;
}
+
/**
* Stops voice recognition.
*
@@ -1079,6 +1172,7 @@ public final class BluetoothHeadsetClient implements BluetoothProfile, AutoClose
}
return defaultValue;
}
+
/**
* Returns list of all calls in any state.
*
@@ -1110,6 +1204,7 @@ public final class BluetoothHeadsetClient implements BluetoothProfile, AutoClose
}
return defaultValue;
}
+
/**
* Returns list of current values of AG indicators.
*
@@ -1138,6 +1233,7 @@ public final class BluetoothHeadsetClient implements BluetoothProfile, AutoClose
}
return defaultValue;
}
+
/**
* Accepts a call
*
@@ -1170,6 +1266,7 @@ public final class BluetoothHeadsetClient implements BluetoothProfile, AutoClose
}
return defaultValue;
}
+
/**
* Holds a call.
*
@@ -1199,6 +1296,7 @@ public final class BluetoothHeadsetClient implements BluetoothProfile, AutoClose
}
return defaultValue;
}
+
/**
* Rejects a call.
*
@@ -1233,6 +1331,7 @@ public final class BluetoothHeadsetClient implements BluetoothProfile, AutoClose
}
return defaultValue;
}
+
/**
* Terminates a specified call.
*
@@ -1271,6 +1370,7 @@ public final class BluetoothHeadsetClient implements BluetoothProfile, AutoClose
}
return defaultValue;
}
+
/**
* Enters private mode with a specified call.
*
@@ -1307,6 +1407,7 @@ public final class BluetoothHeadsetClient implements BluetoothProfile, AutoClose
}
return defaultValue;
}
+
/**
* Performs explicit call transfer.
*
@@ -1342,6 +1443,7 @@ public final class BluetoothHeadsetClient implements BluetoothProfile, AutoClose
}
return defaultValue;
}
+
/**
* Places a call with specified number.
*
@@ -1376,6 +1478,7 @@ public final class BluetoothHeadsetClient implements BluetoothProfile, AutoClose
}
return defaultValue;
}
+
/**
* Sends DTMF code.
*
@@ -1408,6 +1511,7 @@ public final class BluetoothHeadsetClient implements BluetoothProfile, AutoClose
}
return defaultValue;
}
+
/**
* Get a number corresponding to last voice tag recorded on AG.
*
@@ -1442,6 +1546,7 @@ public final class BluetoothHeadsetClient implements BluetoothProfile, AutoClose
}
return defaultValue;
}
+
/**
* Returns current audio state of Audio Gateway.
*
@@ -1472,6 +1577,7 @@ public final class BluetoothHeadsetClient implements BluetoothProfile, AutoClose
}
return BluetoothHeadsetClient.STATE_AUDIO_DISCONNECTED;
}
+
/**
* Sets whether audio routing is allowed.
*
@@ -1499,6 +1605,7 @@ public final class BluetoothHeadsetClient implements BluetoothProfile, AutoClose
}
}
}
+
/**
* Returns whether audio routing is allowed.
*
@@ -1528,6 +1635,7 @@ public final class BluetoothHeadsetClient implements BluetoothProfile, AutoClose
}
return defaultValue;
}
+
/**
* Initiates a connection of audio channel.
*
@@ -1559,6 +1667,7 @@ public final class BluetoothHeadsetClient implements BluetoothProfile, AutoClose
}
return defaultValue;
}
+
/**
* Disconnects audio channel.
*
@@ -1590,6 +1699,7 @@ public final class BluetoothHeadsetClient implements BluetoothProfile, AutoClose
}
return defaultValue;
}
+
/**
* Get Audio Gateway features
*
@@ -1833,9 +1943,11 @@ public final class BluetoothHeadsetClient implements BluetoothProfile, AutoClose
private boolean isEnabled() {
return mAdapter.getState() == BluetoothAdapter.STATE_ON;
}
+
private static boolean isValidDevice(BluetoothDevice device) {
return device != null && BluetoothAdapter.checkBluetoothAddress(device.getAddress());
}
+
private static void log(String msg) {
Log.d(TAG, msg);
}