Home
last modified time | relevance | path

Searched refs:bluetoothAdapter (Results 1 – 25 of 67) sorted by relevance

123

/packages/modules/Bluetooth/android/pandora/server/src/
DHfpHandsfree.kt52 private val bluetoothAdapter = bluetoothManager.adapter constant
67 bluetoothAdapter.closeProfileProxy(BluetoothProfile.HEADSET_CLIENT, bluetoothHfpClient) in close()
77 request.connection.toBluetoothDevice(bluetoothAdapter), in answerCallAsHandsfree()
91 request.connection.toBluetoothDevice(bluetoothAdapter) in endCallAsHandsfree()
94 request.connection.toBluetoothDevice(bluetoothAdapter), in endCallAsHandsfree()
107 bluetoothHfpClient.rejectCall(request.connection.toBluetoothDevice(bluetoothAdapter)) in declineCallAsHandsfree()
117 bluetoothHfpClient.connectAudio(request.connection.toBluetoothDevice(bluetoothAdapter)) in connectToAudioAsHandsfree()
128 request.connection.toBluetoothDevice(bluetoothAdapter) in disconnectFromAudioAsHandsfree()
140 request.connection.toBluetoothDevice(bluetoothAdapter), in makeCallAsHandsfree()
153 request.connection.toBluetoothDevice(bluetoothAdapter) in callTransferAsHandsfree()
[all …]
DHost.kt116 private val bluetoothAdapter = bluetoothManager.adapter constant
155 if (bluetoothAdapter.isEnabled) { in rebootBluetooth()
156 bluetoothAdapter.disable() in rebootBluetooth()
160 bluetoothAdapter.enable() in rebootBluetooth()
169 for (device in bluetoothAdapter.bondedDevices) { in factoryReset()
191 bluetoothAdapter.clearBluetooth() in factoryReset()
223 val localMacAddress = MacAddress.fromString(bluetoothAdapter.getAddress()) in readLocalAddress()
300 var bluetoothDevice = request.address.toBluetoothDevice(bluetoothAdapter) in waitConnection()
304 if (!bluetoothAdapter.isEnabled) { in waitConnection()
327 val bluetoothDevice = request.connection.toBluetoothDevice(bluetoothAdapter) in waitDisconnection()
[all …]
DVcp.kt49 private val bluetoothAdapter = bluetoothManager.adapter constant
74 val device = request.connection.toBluetoothDevice(bluetoothAdapter) in setDeviceVolume()
89 val device = request.connection.toBluetoothDevice(bluetoothAdapter) in setVolumeOffset()
101 val device = request.connection.toBluetoothDevice(bluetoothAdapter) in waitConnect()
123 val device = request.connection.toBluetoothDevice(bluetoothAdapter) in setGainSetting()
136 val device = request.connection.toBluetoothDevice(bluetoothAdapter) in setMute()
149 val device = request.connection.toBluetoothDevice(bluetoothAdapter) in setGainMode()
DHap.kt61 private val bluetoothAdapter = bluetoothManager.adapter in <lambda>() constant
141 val device = request.connection.toBluetoothDevice(bluetoothAdapter) in <lambda>()
154 val device = request.connection.toBluetoothDevice(bluetoothAdapter) in <lambda>()
181 val device = request.connection.toBluetoothDevice(bluetoothAdapter) in <lambda>()
208 val device = request.connection.toBluetoothDevice(bluetoothAdapter) in <lambda>()
222 val device = request.connection.toBluetoothDevice(bluetoothAdapter) in <lambda>()
236 val device = request.connection.toBluetoothDevice(bluetoothAdapter) in <lambda>()
262 val device = request.connection.toBluetoothDevice(bluetoothAdapter) in <lambda>()
276 val device = request.connection.toBluetoothDevice(bluetoothAdapter) in <lambda>()
317 val device = request.connection.toBluetoothDevice(bluetoothAdapter) in <lambda>()
DHfp.kt59 private val bluetoothAdapter = bluetoothManager.adapter constant
82 bluetoothAdapter.closeProfileProxy(BluetoothProfile.HEADSET, bluetoothHfp) in close()
95 val device = request.connection.toBluetoothDevice(bluetoothAdapter) in enableSlc()
105 val device = request.connection.toBluetoothDevice(bluetoothAdapter) in disableSlc()
215 request.connection.toBluetoothDevice(bluetoothAdapter) in setVoiceRecognition()
219 request.connection.toBluetoothDevice(bluetoothAdapter) in setVoiceRecognition()
DA2dp.kt66 private val bluetoothAdapter = bluetoothManager.adapter constant in com.android.pandora.A2dp
82 bluetoothAdapter.closeProfileProxy(BluetoothProfile.A2DP, bluetoothA2dp) in close()
91 val device = request.connection.toBluetoothDevice(bluetoothAdapter) in openSource()
122 val device = request.connection.toBluetoothDevice(bluetoothAdapter) in waitSource()
152 val device = bluetoothAdapter.getRemoteDevice(request.source.cookie.toString("UTF-8")) in start()
184 val device = bluetoothAdapter.getRemoteDevice(request.source.cookie.toString("UTF-8")) in suspend()
216 val device = bluetoothAdapter.getRemoteDevice(request.source.cookie.toString("UTF-8")) in isSuspended()
231 val device = bluetoothAdapter.getRemoteDevice(request.source.cookie.toString("UTF-8")) in close()
310 val device = bluetoothAdapter.getRemoteDevice(request.source.cookie.toString("UTF-8")) in getAudioEncoding()
329 val device = request.connection.toBluetoothDevice(bluetoothAdapter) in getConfiguration()
[all …]
DL2cap.kt47 private val bluetoothAdapter = bluetoothManager.adapter constant
65 val device = request.connection.toBluetoothDevice(bluetoothAdapter) in connect()
93 request.connection.toBluetoothDevice(bluetoothAdapter) in waitConnection()
114 bluetoothAdapter.listenUsingInsecureL2capChannel() in waitConnection()
116 bluetoothAdapter.listenUsingInsecureL2capOn(psm) in waitConnection()
DOpp.kt62 private val bluetoothAdapter = bluetoothManager.adapter constant
91 val bluetoothDevice = request.address.toBluetoothDevice(bluetoothAdapter) in openRfcommChannel()
102 val bluetoothDevice = request.address.toBluetoothDevice(bluetoothAdapter) in openL2capChannel()
141 bluetoothAdapter.startDiscovery() in waitBluetoothDevice()
148 bluetoothAdapter.cancelDiscovery() in waitBluetoothDevice()
DA2dpSink.kt54 private val bluetoothAdapter = bluetoothManager.adapter constant
67 bluetoothAdapter.closeProfileProxy(BluetoothProfile.A2DP_SINK, bluetoothA2dpSink) in close()
76 val device = request.connection.toBluetoothDevice(bluetoothAdapter) in waitSink()
105 val device = bluetoothAdapter.getRemoteDevice(request.sink.cookie.toString("UTF-8")) in close()
DServer.kt38 val bluetoothAdapter = context.getSystemService(BluetoothManager::class.java)!!.adapter constant
73 .filter { bluetoothAdapter.isEnabled } in <lambda>()
74 .filter { bluetoothAdapter.getSupportedProfiles().contains(it.key) == true } in <lambda>()
DLeAudio.kt60 private val bluetoothAdapter = bluetoothManager.adapter constant in com.android.pandora.LeAudio
75 bluetoothAdapter.closeProfileProxy(BluetoothProfile.LE_AUDIO, bluetoothLeAudio) in close()
81 val device = request.connection.toBluetoothDevice(bluetoothAdapter) in open()
113 val device = request.connection.toBluetoothDevice(bluetoothAdapter) in leAudioStart()
DPan.kt46 private val bluetoothAdapter = bluetoothManager.adapter constant
71 bluetoothAdapter.closeProfileProxy(BluetoothProfile.PAN, bluetoothPan) in close()
99 val device = request.address.toBluetoothDevice(bluetoothAdapter) in connectPan()
/packages/apps/Settings/tests/robotests/src/com/android/settings/connecteddevice/
DBluetoothPreferenceTest.kt37 private lateinit var bluetoothAdapter: BluetoothAdapter variable in com.android.settings.connecteddevice.BluetoothPreferenceTest
42 bluetoothAdapter = spy(BluetoothAdapter.getDefaultAdapter()) in setUp()
43 whenever(bluetoothAdapter.state).thenReturn(BluetoothAdapter.STATE_ON) in setUp()
45 BluetoothPreference(BluetoothPreference.createDataStore(context, bluetoothAdapter)) in setUp()
55 whenever(bluetoothAdapter.state).thenReturn(BluetoothAdapter.STATE_TURNING_ON) in isEnabled_bluetoothTurningOn_returnFalse()
64 verify(bluetoothAdapter).disable() in storageSetOff_turnOff()
71 verify(bluetoothAdapter).enable() in storageSetOn_turnOn()
/packages/apps/Settings/src/com/android/settings/connecteddevice/
DBluetoothPreference.kt97 bluetoothDataStore.bluetoothAdapter?.state.let { in storage()
136 override val bluetoothAdapter: BluetoothAdapter?, constant in com.android.settings.connecteddevice.BluetoothPreference.BluetoothStorage
141 override fun contains(key: String) = key == KEY && bluetoothAdapter != null in contains()
144 return (bluetoothAdapter?.state.let { in contains()
154 bluetoothAdapter?.enable() in setValue()
156 bluetoothAdapter?.disable() in setValue()
197 bluetoothAdapter: BluetoothAdapter?, in createDataStore()
198 ): BluetoothDataStore = BluetoothStorage(context, bluetoothAdapter) in createDataStore()
204 val bluetoothAdapter: BluetoothAdapter? in createDataStore() constant
/packages/apps/Settings/tests/robotests/src/com/android/settings/bluetooth/
DRequestPermissionActivityTest.kt36 private lateinit var bluetoothAdapter: ShadowBluetoothAdapter variable in com.android.settings.bluetooth.RequestPermissionActivityTest
40 bluetoothAdapter = Shadow.extract(BluetoothAdapter.getDefaultAdapter()) in setUp()
51 bluetoothAdapter.setState(BluetoothAdapter.STATE_OFF) in requestEnable_whenBluetoothIsOff_showConfirmDialog()
63 bluetoothAdapter.setState(BluetoothAdapter.STATE_ON) in requestEnable_whenBluetoothIsOn_doNothing()
73 bluetoothAdapter.setState(BluetoothAdapter.STATE_OFF) in requestDisable_whenBluetoothIsOff_doNothing()
83 bluetoothAdapter.setState(BluetoothAdapter.STATE_ON) in requestDisable_whenBluetoothIsOn_showConfirmDialog()
/packages/modules/Uwb/ranging/service/tests/unittests/src/com/android/ranging/tests/cs/
DCsCapabilitiesAdapterTest.java74 BluetoothAdapter bluetoothAdapter = mock(BluetoothAdapter.class); in testBleCsEnabled() local
75 when(mMockBluetoothManager.getAdapter()).thenReturn(bluetoothAdapter); in testBleCsEnabled()
76 when(bluetoothAdapter.getState()).thenReturn(BluetoothAdapter.STATE_ON); in testBleCsEnabled()
84 BluetoothAdapter bluetoothAdapter = mock(BluetoothAdapter.class); in testBleCsDisabled() local
85 when(mMockBluetoothManager.getAdapter()).thenReturn(bluetoothAdapter); in testBleCsDisabled()
86 when(bluetoothAdapter.getState()).thenReturn(BluetoothAdapter.STATE_OFF); in testBleCsDisabled()
/packages/modules/Uwb/ranging/service/tests/unittests/src/com/android/ranging/tests/blerssi/
DBleRssiCapabilitiesAdapterTest.java73 BluetoothAdapter bluetoothAdapter = mock(BluetoothAdapter.class); in testBleRssiEnabled() local
74 when(mMockBluetoothManager.getAdapter()).thenReturn(bluetoothAdapter); in testBleRssiEnabled()
75 when(bluetoothAdapter.getState()).thenReturn(BluetoothAdapter.STATE_ON); in testBleRssiEnabled()
83 BluetoothAdapter bluetoothAdapter = mock(BluetoothAdapter.class); in testBleRssiDisabled() local
84 when(mMockBluetoothManager.getAdapter()).thenReturn(bluetoothAdapter); in testBleRssiDisabled()
85 when(bluetoothAdapter.getState()).thenReturn(BluetoothAdapter.STATE_OFF); in testBleRssiDisabled()
/packages/apps/Test/connectivity/PMC/src/com/android/pmc/
DGattServer.java65 BluetoothAdapter bluetoothAdapter = BluetoothAdapter.getDefaultAdapter(); in GattServer() local
67 if (bluetoothAdapter == null) { in GattServer()
71 if (!bluetoothAdapter.isEnabled()) { in GattServer()
73 bluetoothAdapter.enable(); in GattServer()
74 if (!bluetoothAdapter.isEnabled()) { in GattServer()
105 mBleAdvertiser = new MyBleAdvertiser(bluetoothAdapter); in GattServer()
208 MyBleAdvertiser(BluetoothAdapter bluetoothAdapter) { in MyBleAdvertiser() argument
210 mAdvertiser = bluetoothAdapter.getBluetoothLeAdvertiser(); in MyBleAdvertiser()
/packages/modules/Bluetooth/framework/tests/metrics/device/android/bluetooth/
DBluetoothMetricsHelperTest.kt77 private val bluetoothAdapter: BluetoothAdapter = constant in android.bluetooth.BluetoothMetricsHelperTest
79 private val adapterState = MutableStateFlow(bluetoothAdapter.state)
118 bluetoothAdapter.enable() in setUp()
146 val localMacAddress = MacAddress.fromString(bluetoothAdapter.getAddress()) in incomingClassicConnectionTest()
163 bluetoothAdapter.disable() in <lambda>()
165 bluetoothAdapter.enable() in <lambda>()
/packages/apps/Settings/tests/anomaly-tester/src/com/android/settings/anomaly/tester/utils/
DAnomalyActions.java64 BluetoothAdapter bluetoothAdapter = BluetoothAdapter.getDefaultAdapter(); in doUnoptimizedBleScan() local
65 if (bluetoothAdapter == null || !bluetoothAdapter.isEnabled() ) { in doUnoptimizedBleScan()
69 BluetoothLeScanner bleScanner = bluetoothAdapter.getBluetoothLeScanner(); in doUnoptimizedBleScan()
/packages/apps/Settings/src/com/android/settings/bluetooth/
DBluetoothFeatureProviderImpl.kt75 bluetoothAdapter: BluetoothAdapter, in getDeviceSettingRepository()
78 DeviceSettingRepositoryImpl(context, bluetoothAdapter, scope, Dispatchers.IO) in getDeviceSettingRepository()
83 bluetoothAdapter: BluetoothAdapter, in getDeviceSettingRepository()
91 bluetoothAdapter, in getDeviceSettingRepository()
/packages/apps/TvSettings/Settings/src/com/android/tv/settings/accessories/
DBluetoothDevicePairer.java345 final BluetoothAdapter bluetoothAdapter = BluetoothAdapter.getDefaultAdapter(); in start() local
346 if (!bluetoothAdapter.isEnabled()) { in start()
365 bluetoothAdapter.enable(); in start()
376 final int scanMode = bluetoothAdapter.getScanMode(); in start()
381 bluetoothAdapter.setDiscoverableTimeout(Duration.ZERO); in start()
382 bluetoothAdapter.setScanMode( in start()
419 final BluetoothAdapter bluetoothAdapter = BluetoothAdapter.getDefaultAdapter(); in dispose() local
421 && mDefaultScanMode != bluetoothAdapter.getScanMode()) { in dispose()
423 bluetoothAdapter.setScanMode(mDefaultScanMode); in dispose()
/packages/modules/Bluetooth/framework/tests/bumble/src/android/bluetooth/
DDckTestRule.kt61 private val bluetoothAdapter = bluetoothManager.adapter constant
62 private val leScanner = bluetoothAdapter.bluetoothLeScanner
270 if (bluetoothAdapter.isEnabled()) { in <lambda>()
272 bluetoothAdapter.disable() in <lambda>()
278 bluetoothAdapter.enable() in <lambda>()
315 bluetoothAdapter.getRemoteLeDevice( in <lambda>()
/packages/modules/Bluetooth/android/leaudio/app/src/main/java/com/android/bluetooth/leaudio/
DBluetoothProxy.java60 private final BluetoothAdapter bluetoothAdapter; field in BluetoothProxy
577 bluetoothAdapter = BluetoothAdapter.getDefaultAdapter(); in BluetoothProxy()
861 bluetoothAdapter.getProfileProxy( in initCsisProxy()
869 bluetoothAdapter.closeProfileProxy(BluetoothProfile.LE_AUDIO, bluetoothCsis); in cleanupCsisProxy()
876 bluetoothAdapter.getProfileProxy( in initLeAudioProxy()
890 bluetoothAdapter.closeProfileProxy(BluetoothProfile.LE_AUDIO, bluetoothLeAudio); in cleanupLeAudioProxy()
897 bluetoothAdapter.getProfileProxy( in initVolumeControlProxy()
910 bluetoothAdapter.closeProfileProxy( in cleanupVolumeControlProxy()
918 bluetoothAdapter.getProfileProxy( in initHapProxy()
933 bluetoothAdapter.closeProfileProxy(BluetoothProfile.HAP_CLIENT, bluetoothHapClient); in cleanupHapProxy()
[all …]
/packages/apps/Settings/src/com/android/settings/bluetooth/ui/viewmodel/
DBluetoothDeviceDetailsViewModel.kt44 private val bluetoothAdapter: BluetoothAdapter, in <lambda>() constant in com.android.settings.bluetooth.ui.viewmodel.BluetoothDeviceDetailsViewModel
52 bluetoothAdapter, in <lambda>()
140 private val bluetoothAdapter: BluetoothAdapter, in <lambda>() constant in com.android.settings.bluetooth.ui.viewmodel.Factory
148 bluetoothAdapter, in <lambda>()

123