Home
last modified time | relevance | path

Searched refs:getDefaultAdapter (Results 1 – 25 of 256) sorted by relevance

1234567891011

/packages/apps/Car/Settings/tests/robotests/src/com/android/car/settings/bluetooth/
DBluetoothScanningDevicesGroupPreferenceControllerTest.java106 BluetoothAdapter.getDefaultAdapter().enable(); in setUp()
130 assertThat(BluetoothAdapter.getDefaultAdapter().isDiscovering()).isFalse(); in disallowConfigBluetooth_doesNotStartScanning()
138 assertThat(BluetoothAdapter.getDefaultAdapter().isDiscovering()).isTrue(); in onScanningStateChanged_scanningEnabled_receiveStopped_restartsScanning()
140 BluetoothAdapter.getDefaultAdapter().cancelDiscovery(); in onScanningStateChanged_scanningEnabled_receiveStopped_restartsScanning()
143 assertThat(BluetoothAdapter.getDefaultAdapter().isDiscovering()).isTrue(); in onScanningStateChanged_scanningEnabled_receiveStopped_restartsScanning()
152 assertThat(BluetoothAdapter.getDefaultAdapter().isDiscovering()).isFalse(); in onScanningStateChanged_scanningDisabled_receiveStopped_doesNothing()
156 assertThat(BluetoothAdapter.getDefaultAdapter().isDiscovering()).isFalse(); in onScanningStateChanged_scanningDisabled_receiveStopped_doesNothing()
162 assertThat(BluetoothAdapter.getDefaultAdapter().isDiscovering()).isTrue(); in onDeviceBondStateChanged_refreshesUi()
169 assertThat(BluetoothAdapter.getDefaultAdapter().isDiscovering()).isFalse(); in onDeviceBondStateChanged_refreshesUi()
189 assertThat(BluetoothAdapter.getDefaultAdapter().isDiscovering()).isTrue(); in onDeviceClicked_cancelsScanning()
[all …]
DLocalRenameDialogFragmentTest.java58 BluetoothAdapter.getDefaultAdapter().enable(); in setUp()
68 BluetoothAdapter.getDefaultAdapter().setName(NAME); in getDeviceName_adapterEnabled_returnsLocalAdapterName()
75 BluetoothAdapter.getDefaultAdapter().setName(NAME); in getDeviceName_adapterDisabled_returnsNull()
76 BluetoothAdapter.getDefaultAdapter().disable(); in getDeviceName_adapterDisabled_returnsNull()
83 BluetoothAdapter.getDefaultAdapter().setName(NAME); in localNameChangedBroadcast_updatesDeviceName()
88 BluetoothAdapter.getDefaultAdapter().setName(NAME_UPDATED); in localNameChangedBroadcast_updatesDeviceName()
99 BluetoothAdapter.getDefaultAdapter().setName(NAME); in setDeviceName_updatesLocalAdapterName()
106 assertThat(BluetoothAdapter.getDefaultAdapter().getName()).isEqualTo(NAME_UPDATED); in setDeviceName_updatesLocalAdapterName()
116 return (ShadowBluetoothAdapter) Shadow.extract(BluetoothAdapter.getDefaultAdapter()); in getShadowBluetoothAdapter()
DBluetoothNamePreferenceControllerTest.java78 BluetoothAdapter.getDefaultAdapter().enable(); in setUp()
96 BluetoothAdapter.getDefaultAdapter().setName(NAME); in refreshUi_setsNameAsSummary()
122 BluetoothAdapter.getDefaultAdapter().setName(NAME); in started_localNameChangedBroadcast_updatesSummary()
126 BluetoothAdapter.getDefaultAdapter().setName(NAME_UPDATED); in started_localNameChangedBroadcast_updatesSummary()
135 BluetoothAdapter.getDefaultAdapter().setName(NAME); in stopped_noUpdateOnLocalNameChangedBroadcast()
140 BluetoothAdapter.getDefaultAdapter().setName(NAME_UPDATED); in stopped_noUpdateOnLocalNameChangedBroadcast()
166 return (ShadowBluetoothAdapter) Shadow.extract(BluetoothAdapter.getDefaultAdapter()); in getShadowBluetoothAdapter()
DPairNewDevicePreferenceControllerTest.java152 BluetoothAdapter.getDefaultAdapter().enable(); in refreshUi_bluetoothAdapterEnabled_setsEmptySummary()
161 BluetoothAdapter.getDefaultAdapter().disable(); in refreshUi_bluetoothAdapterDisabled_setsTurnOnToPairSummary()
171 BluetoothAdapter.getDefaultAdapter().enable(); in bluetoothAdapterStateChangedBroadcast_refreshesUi()
175 BluetoothAdapter.getDefaultAdapter().disable(); in bluetoothAdapterStateChangedBroadcast_refreshesUi()
183 BluetoothAdapter.getDefaultAdapter().disable(); in preferenceClicked_enablesAdapter()
187 assertThat(BluetoothAdapter.getDefaultAdapter().isEnabled()).isTrue(); in preferenceClicked_enablesAdapter()
DBluetoothSettingsFragmentTest.java114 assertThat(BluetoothAdapter.getDefaultAdapter().isEnabled()).isFalse(); in switchCheckedOn_enablesAdapter()
118 assertThat(BluetoothAdapter.getDefaultAdapter().isEnabled()).isTrue(); in switchCheckedOn_enablesAdapter()
124 BluetoothAdapter.getDefaultAdapter().enable(); in switchCheckedOff_disablesAdapter()
126 assertThat(BluetoothAdapter.getDefaultAdapter().isEnabled()).isTrue(); in switchCheckedOff_disablesAdapter()
130 assertThat(BluetoothAdapter.getDefaultAdapter().isEnabled()).isFalse(); in switchCheckedOff_disablesAdapter()
251 return Shadow.extract(BluetoothAdapter.getDefaultAdapter()); in getShadowBluetoothAdapter()
DBluetoothPreferenceControllerTest.java119 BluetoothAdapter.getDefaultAdapter().disable(); in getAvailabilityStatus_adapterDisabled_conditionallyUnavailable()
129 BluetoothAdapter.getDefaultAdapter().enable(); in getAvailabilityStatus_available()
140 BluetoothAdapter.getDefaultAdapter().enable(); in onStart_registersEventListener()
151 BluetoothAdapter.getDefaultAdapter().enable(); in onStop_unregistersEventListener()
160 return (ShadowBluetoothAdapter) Shadow.extract(BluetoothAdapter.getDefaultAdapter()); in getShadowBluetoothAdapter()
DBluetoothUnbondedDevicesPreferenceControllerTest.java122 BluetoothAdapter.getDefaultAdapter().enable(); in setUp()
174 assertThat(BluetoothAdapter.getDefaultAdapter().isDiscovering()).isTrue(); in onDeviceClicked_pairingStartFails_resumesScanning()
178 assertThat(BluetoothAdapter.getDefaultAdapter().isDiscovering()).isTrue(); in onDeviceClicked_pairingStartFails_resumesScanning()
215 return (ShadowBluetoothAdapter) Shadow.extract(BluetoothAdapter.getDefaultAdapter()); in getShadowBluetoothAdapter()
DBluetoothDevicesGroupPreferenceControllerTest.java90 mDevice1 = BluetoothAdapter.getDefaultAdapter().getRemoteDevice("00:11:22:33:AA:BB"); in setUp()
92 BluetoothDevice device2 = BluetoothAdapter.getDefaultAdapter().getRemoteDevice( in setUp()
99 BluetoothAdapter.getDefaultAdapter().enable(); in setUp()
286 return (ShadowBluetoothAdapter) Shadow.extract(BluetoothAdapter.getDefaultAdapter()); in getShadowBluetoothAdapter()
DBluetoothDevicePickerPreferenceControllerTest.java116 BluetoothAdapter.getDefaultAdapter().enable(); in setUp()
234 assertThat(BluetoothAdapter.getDefaultAdapter().isDiscovering()).isTrue(); in onDeviceClicked_unbondedDevice_needsAuth_pairingStartFails_resumesScanning()
238 assertThat(BluetoothAdapter.getDefaultAdapter().isDiscovering()).isTrue(); in onDeviceClicked_unbondedDevice_needsAuth_pairingStartFails_resumesScanning()
309 return (ShadowBluetoothAdapter) Shadow.extract(BluetoothAdapter.getDefaultAdapter()); in getShadowBluetoothAdapter()
DBluetoothDeviceProfilesPreferenceControllerTest.java72 mDevice = BluetoothAdapter.getDefaultAdapter().getRemoteDevice("00:11:22:33:AA:BB"); in setUp()
78 BluetoothAdapter.getDefaultAdapter().enable(); in setUp()
224 return (ShadowBluetoothAdapter) Shadow.extract(BluetoothAdapter.getDefaultAdapter()); in getShadowBluetoothAdapter()
DBluetoothAddressPreferenceControllerTest.java60 BluetoothAdapter.getDefaultAdapter().enable(); in refreshUi_setsAddress()
80 return (ShadowBluetoothAdapter) Shadow.extract(BluetoothAdapter.getDefaultAdapter()); in getShadowBluetoothAdapter()
/packages/apps/Bluetooth/tests/unit/src/com/android/bluetooth/btservice/
DAdapterServiceTest.java532 BluetoothDevice device = TestUtils.getTestDevice(BluetoothAdapter.getDefaultAdapter(), 0); in testObfuscateBluetoothAddress_BluetoothDisabled()
550 BluetoothDevice device = TestUtils.getTestDevice(BluetoothAdapter.getDefaultAdapter(), 0); in testObfuscateBluetoothAddress_BluetoothEnabled()
565 BluetoothDevice device = TestUtils.getTestDevice(BluetoothAdapter.getDefaultAdapter(), 0); in testObfuscateBluetoothAddress_PersistentBetweenToggle()
599 BluetoothDevice device = TestUtils.getTestDevice(BluetoothAdapter.getDefaultAdapter(), 0); in testObfuscateBluetoothAddress_PersistentBetweenAdapterServiceInitialization()
635 BluetoothDevice device = TestUtils.getTestDevice(BluetoothAdapter.getDefaultAdapter(), 0); in testObfuscateBluetoothAddress_FactoryReset()
669 BluetoothDevice device = TestUtils.getTestDevice(BluetoothAdapter.getDefaultAdapter(), 0); in testObfuscateBluetoothAddress_FactoryResetAndReloadNativeLayer()
743 BluetoothDevice device = TestUtils.getTestDevice(BluetoothAdapter.getDefaultAdapter(), 0); in testGetMetricId_BluetoothDisabled()
757 BluetoothDevice device = TestUtils.getTestDevice(BluetoothAdapter.getDefaultAdapter(), 0); in testGetMetricId_BluetoothEnabled()
768 BluetoothDevice device = TestUtils.getTestDevice(BluetoothAdapter.getDefaultAdapter(), 0); in testGetMetricId_PersistentBetweenToggle()
793 BluetoothDevice device = TestUtils.getTestDevice(BluetoothAdapter.getDefaultAdapter(), 0); in testgetMetricId_PersistentBetweenAdapterServiceInitialization()
/packages/apps/Car/Settings/tests/robotests/src/com/android/car/settings/security/
DAddTrustedDevicePreferenceControllerTest.java121 BluetoothAdapter.getDefaultAdapter().enable(); in refreshUi_bluetoothAdapterEnabled_setsEmptySummary()
130 BluetoothAdapter.getDefaultAdapter().disable(); in refreshUi_bluetoothAdapterDisabled_setsTurnOnToAddSummary()
140 BluetoothAdapter.getDefaultAdapter().disable(); in onPreferenceClicked_hasPassword_enableBluetooth()
146 assertThat(BluetoothAdapter.getDefaultAdapter().isEnabled()).isTrue(); in onPreferenceClicked_hasPassword_enableBluetooth()
/packages/apps/Car/Dialer/tests/robotests/src/com/android/car/dialer/ui/
DTelecomActivityViewModelTest.java87 (ShadowBluetoothAdapterForDialer) shadowOf(BluetoothAdapter.getDefaultAdapter()); in testDialerAppState_bluetoothNotEnabled_bluetoothError()
103 (ShadowBluetoothAdapterForDialer) shadowOf(BluetoothAdapter.getDefaultAdapter()); in testDialerAppState_noPairedDevices_bluetoothError()
122 (ShadowBluetoothAdapterForDialer) shadowOf(BluetoothAdapter.getDefaultAdapter()); in testDialerAppState_hfpNoConnected_bluetoothError()
145 (ShadowBluetoothAdapterForDialer) shadowOf(BluetoothAdapter.getDefaultAdapter()); in testDialerAppState_bluetoothAllSet_dialerAppStateDefault()
/packages/apps/Car/libs/connected-device-lib/src/com/android/car/connecteddevice/ble/
DCarBlePeripheralManager.java131 BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter(); in start()
216 BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter(); in startAssociation()
262 && adapterName.equals(BluetoothAdapter.getDefaultAdapter().getName())) { in attemptAssociationAdvertising()
345 BluetoothAdapter.getDefaultAdapter().setName(mOriginalBluetoothName); in resetBluetoothAdapterName()
350 String currentName = BluetoothAdapter.getDefaultAdapter().getName(); in verifyBluetoothNameRestored()
/packages/apps/Car/Dialer/tests/robotests/src/com/android/car/dialer/livedata/
DBluetoothHfpStateLiveDataTest.java96 BluetoothAdapter.getDefaultAdapter()); in testOnBluetoothHfpStateChange()
104 assertThat(BluetoothAdapter.getDefaultAdapter().getProfileConnectionState( in testOnBluetoothHfpStateChange()
114 assertThat(BluetoothAdapter.getDefaultAdapter().getProfileConnectionState( in testOnBluetoothHfpStateChange()
DBluetoothPairListLiveDataTest.java101 BluetoothAdapter.getDefaultAdapter()); in testOnBluetoothConnected()
135 assertThat(BluetoothAdapter.getDefaultAdapter().getBondedDevices().containsAll( in verifyBondedDevices()
137 assertThat(BluetoothAdapter.getDefaultAdapter().getBondedDevices().size()).isEqualTo( in verifyBondedDevices()
/packages/apps/Car/libs/connected-device-lib/tests/unit/src/com/android/car/connecteddevice/ble/
DCarBlePeripheralManagerTest.java81 sAdapterName = BluetoothAdapter.getDefaultAdapter().getName(); in beforeSetUp()
105 BluetoothAdapter.getDefaultAdapter().setName(sAdapterName); in afterTearDown()
121 assertThat(BluetoothAdapter.getDefaultAdapter().getName()).isEqualTo(testDeviceName); in testStartAssociationAdvertisingSuccess()
224 BluetoothDevice bluetoothDevice = BluetoothAdapter.getDefaultAdapter() in getChannelForAssociation()
/packages/apps/Bluetooth/src/com/android/bluetooth/avrcp/
DAvrcpNativeInterface.java192 BluetoothAdapter.getDefaultAdapter().getRemoteDevice(bdaddr.toUpperCase()); in setActiveDevice()
199 BluetoothAdapter.getDefaultAdapter().getRemoteDevice(bdaddr.toUpperCase()); in deviceConnected()
211 BluetoothAdapter.getDefaultAdapter().getRemoteDevice(bdaddr.toUpperCase()); in deviceDisconnected()
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/
DTetherSettings.java137 BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter(); in onCreate()
180 BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter(); in onDestroy()
356 BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter(); in updateBluetoothState()
381 BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter(); in startTethering()
/packages/apps/Car/Messenger/src/com/android/car/messenger/bluetooth/
DBluetoothHelper.java24 BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter(); in getPairedDevices()
56 BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter(); in sendMessage()
/packages/apps/Car/Settings/src/com/android/car/settings/security/
DAddTrustedDevicePreferenceController.java68 BluetoothAdapter.getDefaultAdapter().isEnabled() ? "" : getContext().getString( in updateState()
87 BluetoothAdapter.getDefaultAdapter().enable(); in handlePreferenceClicked()
/packages/apps/Car/CompanionDeviceSupport/src/com/android/car/companiondevicesupport/activity/
DAssociationActivity.java94 if (!BluetoothAdapter.getDefaultAdapter().isEnabled()) { in observeViewModel()
228 if (!BluetoothAdapter.getDefaultAdapter().isEnabled()) { in showTurnOnBluetoothDialog()
324 BluetoothAdapter.getDefaultAdapter().enable()) in onCreateDialog()
/packages/apps/Car/Settings/src/com/android/car/settings/bluetooth/
DPairNewDevicePreferenceController.java103 BluetoothAdapter.getDefaultAdapter().isEnabled() ? "" : getContext().getString( in updateState()
110 BluetoothAdapter.getDefaultAdapter().enable(); in handlePreferenceClicked()
/packages/apps/Settings/src/com/android/settings/
DTetherSettings.java150 BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter(); in onCreate()
200 BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter(); in onDestroy()
388 BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter(); in updateBluetoothState()
438 BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter(); in startTethering()

1234567891011