Home
last modified time | relevance | path

Searched refs:BluetoothHeadset (Results 1 – 25 of 51) sorted by relevance

123

/aosp12/packages/services/Telecomm/tests/src/com/android/server/telecom/tests/
H A DBluetoothDeviceManagerTest.java21 import android.bluetooth.BluetoothHeadset;
110 buildConnectionActionIntent(BluetoothHeadset.STATE_CONNECTED, device1, false)); in testSingleDeviceConnectAndDisconnect()
124 buildConnectionActionIntent(BluetoothHeadset.STATE_CONNECTED, device1, false)); in testAddDeviceFailsWhenServicesAreNull()
126 buildConnectionActionIntent(BluetoothHeadset.STATE_CONNECTED, device2, true)); in testAddDeviceFailsWhenServicesAreNull()
135 buildConnectionActionIntent(BluetoothHeadset.STATE_CONNECTED, device1, false)); in testMultiDeviceConnectAndDisconnect()
137 buildConnectionActionIntent(BluetoothHeadset.STATE_CONNECTED, device2, true)); in testMultiDeviceConnectAndDisconnect()
154 buildConnectionActionIntent(BluetoothHeadset.STATE_CONNECTED, device2, true)); in testHearingAidDedup()
156 buildConnectionActionIntent(BluetoothHeadset.STATE_CONNECTED, device4, true)); in testHearingAidDedup()
169 buildConnectionActionIntent(BluetoothHeadset.STATE_CONNECTED, device2, true)); in testHeadsetServiceDisconnect()
248 : BluetoothHeadset.ACTION_CONNECTION_STATE_CHANGED); in buildConnectionActionIntent()
[all …]
H A DBluetoothRouteManagerTest.java20 import android.bluetooth.BluetoothHeadset;
129 .thenReturn(BluetoothHeadset.STATE_AUDIO_DISCONNECTED); in testAudioOnDeviceWithScoOffActiveDevice()
191 .thenReturn(BluetoothHeadset.STATE_AUDIO_CONNECTED); in setupConnectedDevices()
/aosp12/packages/services/Telecomm/src/com/android/server/telecom/bluetooth/
H A DBluetoothStateReceiver.java20 import android.bluetooth.BluetoothHeadset;
42 INTENT_FILTER.addAction(BluetoothHeadset.ACTION_AUDIO_STATE_CHANGED);
43 INTENT_FILTER.addAction(BluetoothHeadset.ACTION_ACTIVE_DEVICE_CHANGED);
59 case BluetoothHeadset.ACTION_AUDIO_STATE_CHANGED: in onReceive()
63 case BluetoothHeadset.ACTION_CONNECTION_STATE_CHANGED: in onReceive()
67 case BluetoothHeadset.ACTION_ACTIVE_DEVICE_CHANGED: in onReceive()
78 intent.getIntExtra(BluetoothHeadset.EXTRA_STATE, in handleAudioStateChanged()
79 BluetoothHeadset.STATE_AUDIO_DISCONNECTED); in handleAudioStateChanged()
95 case BluetoothHeadset.STATE_AUDIO_CONNECTED: in handleAudioStateChanged()
102 case BluetoothHeadset.STATE_AUDIO_DISCONNECTED: in handleAudioStateChanged()
[all …]
/aosp12/packages/apps/Bluetooth/tests/unit/src/com/android/bluetooth/btservice/
H A DRemoteDevicesTest.java9 import android.bluetooth.BluetoothHeadset;
341 BluetoothHeadset.VENDOR_SPECIFIC_HEADSET_EVENT_XEVENT, in testOnVendorSpecificHeadsetEvent_testCorrectPlantronicsXEvent()
342 BluetoothAssignedNumbers.PLANTRONICS, BluetoothHeadset.AT_CMD_TYPE_SET, in testOnVendorSpecificHeadsetEvent_testCorrectPlantronicsXEvent()
357 BluetoothHeadset.VENDOR_SPECIFIC_HEADSET_EVENT_IPHONEACCEV, in testOnVendorSpecificHeadsetEvent_testCorrectAppleBatteryVsc()
398 BluetoothHeadset.VENDOR_SPECIFIC_HEADSET_EVENT_IPHONEACCEV_BATTERY_LEVEL, in testGetBatteryLevelFromAppleBatteryVsc()
456 Intent intent = new Intent(BluetoothHeadset.ACTION_CONNECTION_STATE_CHANGED); in getHeadsetConnectionStateChangedIntent()
465 Intent intent = new Intent(BluetoothHeadset.ACTION_HF_INDICATORS_VALUE_CHANGED); in getHfIndicatorIntent()
467 intent.putExtra(BluetoothHeadset.EXTRA_HF_INDICATORS_IND_ID, indicatorId); in getHfIndicatorIntent()
468 intent.putExtra(BluetoothHeadset.EXTRA_HF_INDICATORS_IND_VALUE, batteryLevel); in getHfIndicatorIntent()
474 Intent intent = new Intent(BluetoothHeadset.ACTION_VENDOR_SPECIFIC_HEADSET_EVENT); in getVendorSpecificHeadsetEventIntent()
[all …]
H A DSilenceDeviceManagerTest.java25 import android.bluetooth.BluetoothHeadset;
199 Intent intent = new Intent(BluetoothHeadset.ACTION_CONNECTION_STATE_CHANGED); in headsetConnected()
211 Intent intent = new Intent(BluetoothHeadset.ACTION_CONNECTION_STATE_CHANGED); in headsetDisconnected()
H A DActiveDeviceManagerTest.java24 import android.bluetooth.BluetoothHeadset;
344 Intent intent = new Intent(BluetoothHeadset.ACTION_CONNECTION_STATE_CHANGED); in headsetConnected()
355 Intent intent = new Intent(BluetoothHeadset.ACTION_CONNECTION_STATE_CHANGED); in headsetDisconnected()
366 Intent intent = new Intent(BluetoothHeadset.ACTION_ACTIVE_DEVICE_CHANGED); in headsetActiveDeviceChanged()
/aosp12/packages/apps/Bluetooth/tests/unit/src/com/android/bluetooth/hfp/
H A DHeadsetStateMachineTest.java464 BluetoothHeadset.STATE_AUDIO_CONNECTING, BluetoothHeadset.STATE_AUDIO_DISCONNECTED, in testStateTransition_ConnectedToAudioConnecting_ConnectAudio()
487 BluetoothHeadset.STATE_AUDIO_CONNECTING, BluetoothHeadset.STATE_AUDIO_DISCONNECTED, in testStateTransition_ConnectedToAudioConnecting_StackAudioConnecting()
509 BluetoothHeadset.STATE_AUDIO_CONNECTED, BluetoothHeadset.STATE_AUDIO_DISCONNECTED, in testStateTransition_ConnectedToAudioOn_StackAudioConnected()
528 BluetoothHeadset.STATE_AUDIO_DISCONNECTED, BluetoothHeadset.STATE_AUDIO_CONNECTING, in testStateTransition_AudioConnectingToConnected_Timeout()
626 BluetoothHeadset.STATE_AUDIO_CONNECTED, BluetoothHeadset.STATE_AUDIO_CONNECTING, in testStateTransition_AudioConnectingToAudioOn_StackAudioConnected()
686 BluetoothHeadset.STATE_AUDIO_DISCONNECTED, BluetoothHeadset.STATE_AUDIO_CONNECTED, in testStateTransition_AudioOnToConnected_StackAudioDisconnected()
709 BluetoothHeadset.STATE_AUDIO_DISCONNECTED, BluetoothHeadset.STATE_AUDIO_CONNECTED, in testStateTransition_AudioOnToDisconnected_StackDisconnected()
735 BluetoothHeadset.STATE_AUDIO_DISCONNECTED, BluetoothHeadset.STATE_AUDIO_CONNECTED, in testStateTransition_AudioOnToDisconnecting_StackDisconnecting()
758 BluetoothHeadset.STATE_AUDIO_DISCONNECTED, BluetoothHeadset.STATE_AUDIO_CONNECTED, in testStateTransition_AudioDisconnectingToConnected_Timeout()
804 BluetoothHeadset.STATE_AUDIO_CONNECTED, BluetoothHeadset.STATE_AUDIO_CONNECTED, in testStateTransition_AudioDisconnectingToAudioOn_StackAudioConnected()
[all …]
H A DHeadsetTestUtils.java22 import android.bluetooth.BluetoothHeadset;
44 Assert.assertEquals(BluetoothHeadset.ACTION_AUDIO_STATE_CHANGED, intent.getAction()); in verifyAudioStateBroadcast()
64 Assert.assertEquals(BluetoothHeadset.ACTION_CONNECTION_STATE_CHANGED, intent.getAction()); in verifyConnectionStateBroadcast()
100 Assert.assertEquals(BluetoothHeadset.ACTION_ACTIVE_DEVICE_CHANGED, intent.getAction()); in verifyActiveDeviceChangedBroadcast()
H A DHeadsetServiceAndStateMachineTest.java30 import android.bluetooth.BluetoothHeadset;
118 case BluetoothHeadset.ACTION_CONNECTION_STATE_CHANGED: in onReceive()
126 case BluetoothHeadset.ACTION_ACTIVE_DEVICE_CHANGED: in onReceive()
134 case BluetoothHeadset.ACTION_AUDIO_STATE_CHANGED: in onReceive()
233 filter.addAction(BluetoothHeadset.ACTION_AUDIO_STATE_CHANGED); in setUp()
1092 BluetoothHeadset.STATE_AUDIO_CONNECTING, BluetoothHeadset.STATE_AUDIO_DISCONNECTED); in testVoiceRecognition_MultiAgInitiatedDeviceNotActive()
1097 BluetoothHeadset.STATE_AUDIO_CONNECTED, BluetoothHeadset.STATE_AUDIO_CONNECTING); in testVoiceRecognition_MultiAgInitiatedDeviceNotActive()
1141 BluetoothHeadset.STATE_AUDIO_CONNECTING, BluetoothHeadset.STATE_AUDIO_DISCONNECTED); in startVoiceRecognitionFromHf()
1146 BluetoothHeadset.STATE_AUDIO_CONNECTED, BluetoothHeadset.STATE_AUDIO_CONNECTING); in startVoiceRecognitionFromHf()
1159 BluetoothHeadset.STATE_AUDIO_CONNECTING, BluetoothHeadset.STATE_AUDIO_DISCONNECTED); in startVoiceRecognitionFromAg()
[all …]
H A DHeadsetServiceTest.java23 import android.bluetooth.BluetoothHeadset;
139 doReturn(BluetoothHeadset.STATE_AUDIO_DISCONNECTED).when(stateMachine).getAudioState(); in setUp()
182 Assert.assertEquals(BluetoothHeadset.STATE_AUDIO_DISCONNECTED, in testGetHeadsetService()
425 BluetoothHeadset.STATE_AUDIO_CONNECTING); in testConnectAudio_withOneDevice()
436 BluetoothHeadset.STATE_AUDIO_DISCONNECTED); in testConnectAudio_withOneDevice()
496 BluetoothHeadset.STATE_AUDIO_CONNECTING); in testConnectAudio_withMultipleDevices()
504 BluetoothHeadset.STATE_AUDIO_CONNECTED); in testConnectAudio_withMultipleDevices()
510 BluetoothHeadset.STATE_AUDIO_DISCONNECTED); in testConnectAudio_withMultipleDevices()
574 BluetoothHeadset.STATE_AUDIO_CONNECTING); in testConnectAudio_connectTwoAudioChannelsShouldFail()
583 BluetoothHeadset.STATE_AUDIO_CONNECTED); in testConnectAudio_connectTwoAudioChannelsShouldFail()
/aosp12/frameworks/base/packages/SettingsLib/tests/robotests/src/com/android/settingslib/bluetooth/
H A DHeadsetProfileTest.java10 import android.bluetooth.BluetoothHeadset;
35 private BluetoothHeadset mService;
69 thenReturn(BluetoothHeadset.STATE_AUDIO_DISCONNECTED); in testHeadsetProfile_shouldReturnAudioState()
71 isEqualTo(BluetoothHeadset.STATE_AUDIO_DISCONNECTED); in testHeadsetProfile_shouldReturnAudioState()
74 thenReturn(BluetoothHeadset.STATE_AUDIO_CONNECTED); in testHeadsetProfile_shouldReturnAudioState()
76 isEqualTo(BluetoothHeadset.STATE_AUDIO_CONNECTED); in testHeadsetProfile_shouldReturnAudioState()
/aosp12/packages/apps/Bluetooth/src/com/android/bluetooth/hfp/
H A DHeadsetStateMachine.java26 import android.bluetooth.BluetoothHeadset;
445 return BluetoothHeadset.STATE_AUDIO_DISCONNECTED; in getAudioStateInt()
567 return BluetoothHeadset.STATE_AUDIO_DISCONNECTED; in getAudioStateInt()
729 return BluetoothHeadset.STATE_AUDIO_DISCONNECTED; in getAudioStateInt()
1165 return BluetoothHeadset.STATE_AUDIO_CONNECTING; in getAudioStateInt()
1250 return BluetoothHeadset.STATE_AUDIO_CONNECTED; in getAudioStateInt()
1395 return BluetoothHeadset.STATE_AUDIO_CONNECTED; in getAudioStateInt()
1482 return BluetoothHeadset.STATE_DISCONNECTED; in getConnectionState()
2151 case BluetoothHeadset.STATE_AUDIO_CONNECTED: in getConnectionStateFromAudioState()
2153 case BluetoothHeadset.STATE_AUDIO_CONNECTING: in getConnectionStateFromAudioState()
[all …]
H A DBluetoothHeadsetProxy.java20 import android.bluetooth.BluetoothHeadset;
33 private BluetoothHeadset mBluetoothHeadset;
35 public BluetoothHeadsetProxy(BluetoothHeadset headset) { in BluetoothHeadsetProxy()
H A DHeadsetService.java27 import android.bluetooth.BluetoothHeadset;
615 return BluetoothHeadset.STATE_AUDIO_DISCONNECTED; in getAudioState()
1068 return stateMachine.getAudioState() == BluetoothHeadset.STATE_AUDIO_CONNECTED; in isAudioConnected()
1076 return BluetoothHeadset.STATE_AUDIO_DISCONNECTED; in getAudioState()
1270 if (stateMachine.getAudioState() != BluetoothHeadset.STATE_AUDIO_DISCONNECTED) { in connectAudio()
1321 if (stateMachine.getAudioState() == BluetoothHeadset.STATE_AUDIO_DISCONNECTED) { in disconnectAudio()
1671 if (!command.equals(BluetoothHeadset.VENDOR_RESULT_CODE_COMMAND_ANDROID)) { in sendVendorSpecificResultCode()
1682 return BluetoothHeadset.isInbandRingingSupported(this) && !SystemProperties.getBoolean( in isInbandRingingEnabled()
1774 if (toState == BluetoothHeadset.STATE_AUDIO_DISCONNECTED) { in onAudioStateChangedFromStateMachine()
1775 if (fromState != BluetoothHeadset.STATE_AUDIO_DISCONNECTED) { in onAudioStateChangedFromStateMachine()
[all …]
/aosp12/frameworks/base/services/core/java/com/android/server/audio/
H A DBtHelper.java26 import android.bluetooth.BluetoothHeadset;
59 private @Nullable BluetoothHeadset mBluetoothHeadset;
299 if (action.equals(BluetoothHeadset.ACTION_ACTIVE_DEVICE_CHANGED)) { in receiveBtEvent()
302 } else if (action.equals(BluetoothHeadset.ACTION_AUDIO_STATE_CHANGED)) { in receiveBtEvent()
308 case BluetoothHeadset.STATE_AUDIO_CONNECTED: in receiveBtEvent()
319 case BluetoothHeadset.STATE_AUDIO_DISCONNECTED: in receiveBtEvent()
345 case BluetoothHeadset.STATE_AUDIO_CONNECTING: in receiveBtEvent()
374 == BluetoothHeadset.STATE_AUDIO_CONNECTED; in isBluetoothScoOn()
694 if (state == BluetoothHeadset.STATE_AUDIO_CONNECTED) { in requestScoState()
761 } else if (state == BluetoothHeadset.STATE_AUDIO_DISCONNECTED) { in requestScoState()
[all …]
/aosp12/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/
H A DRemoteDevices.java27 import android.bluetooth.BluetoothHeadset;
107 case BluetoothHeadset.ACTION_HF_INDICATORS_VALUE_CHANGED:
110 case BluetoothHeadset.ACTION_VENDOR_SPECIFIC_HEADSET_EVENT:
113 case BluetoothHeadset.ACTION_CONNECTION_STATE_CHANGED:
155 filter.addAction(BluetoothHeadset.ACTION_HF_INDICATORS_VALUE_CHANGED); in init()
156 filter.addAction(BluetoothHeadset.ACTION_VENDOR_SPECIFIC_HEADSET_EVENT); in init()
161 filter.addAction(BluetoothHeadset.ACTION_CONNECTION_STATE_CHANGED); in init()
825 if (cmdType != BluetoothHeadset.AT_CMD_TYPE_SET) { in onVendorSpecificHeadsetEvent()
830 .get(BluetoothHeadset.EXTRA_VENDOR_SPECIFIC_HEADSET_EVENT_ARGS); in onVendorSpecificHeadsetEvent()
837 case BluetoothHeadset.VENDOR_SPECIFIC_HEADSET_EVENT_XEVENT: in onVendorSpecificHeadsetEvent()
[all …]
H A DSilenceDeviceManager.java25 import android.bluetooth.BluetoothHeadset;
100 case BluetoothHeadset.ACTION_CONNECTION_STATE_CHANGED:
108 case BluetoothHeadset.ACTION_ACTIVE_DEVICE_CHANGED:
231 filter.addAction(BluetoothHeadset.ACTION_CONNECTION_STATE_CHANGED); in start()
232 filter.addAction(BluetoothHeadset.ACTION_ACTIVE_DEVICE_CHANGED); in start()
H A DActiveDeviceManager.java24 import android.bluetooth.BluetoothHeadset;
151 case BluetoothHeadset.ACTION_CONNECTION_STATE_CHANGED:
155 case BluetoothHeadset.ACTION_ACTIVE_DEVICE_CHANGED:
390 filter.addAction(BluetoothHeadset.ACTION_CONNECTION_STATE_CHANGED); in start()
391 filter.addAction(BluetoothHeadset.ACTION_ACTIVE_DEVICE_CHANGED); in start()
H A DPhonePolicy.java24 import android.bluetooth.BluetoothHeadset;
113 case BluetoothHeadset.ACTION_CONNECTION_STATE_CHANGED:
133 case BluetoothHeadset.ACTION_ACTIVE_DEVICE_CHANGED:
246 filter.addAction(BluetoothHeadset.ACTION_CONNECTION_STATE_CHANGED); in start()
253 filter.addAction(BluetoothHeadset.ACTION_ACTIVE_DEVICE_CHANGED); in start()
/aosp12/packages/services/Telecomm/src/com/android/server/telecom/
H A DBluetoothHeadsetProxy.java20 import android.bluetooth.BluetoothHeadset;
33 private BluetoothHeadset mBluetoothHeadset;
35 public BluetoothHeadsetProxy(BluetoothHeadset headset) { in BluetoothHeadsetProxy()
/aosp12/frameworks/base/packages/SettingsLib/src/com/android/settingslib/bluetooth/
H A DHeadsetProfile.java26 import android.bluetooth.BluetoothHeadset;
44 private BluetoothHeadset mService;
66 mService = (BluetoothHeadset) proxy; in onServiceConnected()
150 return BluetoothHeadset.STATE_AUDIO_DISCONNECTED; in getAudioState()
H A DBluetoothEventManager.java22 import android.bluetooth.BluetoothHeadset;
115 addHandler(BluetoothHeadset.ACTION_ACTIVE_DEVICE_CHANGED, new ActiveDeviceChangedHandler()); in BluetoothEventManager()
120 addHandler(BluetoothHeadset.ACTION_AUDIO_STATE_CHANGED, in BluetoothEventManager()
439 } else if (Objects.equals(action, BluetoothHeadset.ACTION_ACTIVE_DEVICE_CHANGED)) { in onReceive()
H A DLocalBluetoothProfileManager.java23 import android.bluetooth.BluetoothHeadset;
150 BluetoothHeadset.ACTION_CONNECTION_STATE_CHANGED, in updateLocalProfiles()
151 BluetoothHeadset.ACTION_AUDIO_STATE_CHANGED, in updateLocalProfiles()
152 BluetoothHeadset.STATE_AUDIO_DISCONNECTED); in updateLocalProfiles()
/aosp12/packages/apps/Nfc/src/com/android/nfc/handover/
H A DBluetoothPeripheralHandover.java23 import android.bluetooth.BluetoothHeadset;
116 BluetoothHeadset mHeadset;
174 filter.addAction(BluetoothHeadset.ACTION_CONNECTION_STATE_CHANGED); in start()
494 } else if (BluetoothHeadset.ACTION_CONNECTION_STATE_CHANGED.equals(action) && in handleIntent()
679 mHeadset = (BluetoothHeadset) proxy; in onServiceConnected()
/aosp12/frameworks/base/media/tests/ScoAudioTest/src/com/android/scoaudiotest/
H A DScoAudioTest.java22 import android.bluetooth.BluetoothHeadset;
82 private BluetoothHeadset mBluetoothHeadset;
104 new IntentFilter(BluetoothHeadset.ACTION_AUDIO_STATE_CHANGED); in onCreate()
659 mBluetoothHeadset = (BluetoothHeadset) proxy;
688 if (action.equals(BluetoothHeadset.ACTION_AUDIO_STATE_CHANGED)) { in onReceive()

123