Home
last modified time | relevance | path

Searched refs:BluetoothAdapter (Results 1 – 25 of 509) sorted by relevance

12345678910>>...21

/packages/apps/Car/Settings/tests/multivalent/src/com/android/car/settings/bluetooth/
DBluetoothRequestPermissionActivityTest.java31 import android.bluetooth.BluetoothAdapter;
100 BluetoothAdapter.SCAN_MODE_CONNECTABLE_DISCOVERABLE, DEFAULT_DISCOVERABLE_TIMEOUT)) in setUp()
113 Intent intent = new Intent(BluetoothAdapter.ACTION_REQUEST_DISABLE); in onCreate_requestDisableIntent_hasDisableRequestType()
123 Intent intent = new Intent(BluetoothAdapter.ACTION_REQUEST_DISCOVERABLE); in onCreate_requestDiscoverableIntent_hasDiscoverableRequestType()
133 Intent intent = new Intent(BluetoothAdapter.ACTION_REQUEST_DISCOVERABLE); in onCreate_requestDiscoverableIntent_noTimeoutSpecified_hasDefaultTimeout()
143 Intent intent = new Intent(BluetoothAdapter.ACTION_REQUEST_DISCOVERABLE); in onCreate_requestDiscoverableIntent_timeoutSpecified_hasTimeout()
144 intent.putExtra(BluetoothAdapter.EXTRA_DISCOVERABLE_DURATION, in onCreate_requestDiscoverableIntent_timeoutSpecified_hasTimeout()
155 when(mMockLocalBluetoothAdapter.getState()).thenReturn(BluetoothAdapter.STATE_ON); in onCreate_requestDiscoverableIntent_bypassforSetup_startsDiscoverableScan()
160 BluetoothAdapter.SCAN_MODE_CONNECTABLE_DISCOVERABLE, DEFAULT_DISCOVERABLE_TIMEOUT); in onCreate_requestDiscoverableIntent_bypassforSetup_startsDiscoverableScan()
165 when(mMockLocalBluetoothAdapter.getState()).thenReturn(BluetoothAdapter.STATE_TURNING_ON); in onCreate_requestDiscoverableIntent_bypassforSetup_turningOn_noDialog()
[all …]
/packages/apps/Settings/tests/robotests/src/com/android/settings/bluetooth/
DBluetoothSummaryUpdaterTest.java28 import android.bluetooth.BluetoothAdapter;
71 private final int[] mAdapterConnectionState = {BluetoothAdapter.STATE_DISCONNECTED};
91 mShadowBluetoothAdapter = Shadow.extract(BluetoothAdapter.getDefaultAdapter()); in setUp()
114 mShadowBluetoothAdapter.setConnectionState(BluetoothAdapter.STATE_CONNECTED); in register_true_shouldSendSummaryChange()
128 mShadowBluetoothAdapter.setConnectionState(BluetoothAdapter.STATE_CONNECTED); in onBluetoothStateChanged_btDisabled_shouldSendDisabledSummary()
133 mSummaryUpdater.onBluetoothStateChanged(BluetoothAdapter.STATE_OFF); in onBluetoothStateChanged_btDisabled_shouldSendDisabledSummary()
141 mShadowBluetoothAdapter.setConnectionState(BluetoothAdapter.STATE_CONNECTED); in onBluetoothStateChanged_btEnabled_connected_shouldSendConnectedSummary()
146 mSummaryUpdater.onBluetoothStateChanged(BluetoothAdapter.STATE_ON); in onBluetoothStateChanged_btEnabled_connected_shouldSendConnectedSummary()
155 mShadowBluetoothAdapter.setConnectionState(BluetoothAdapter.STATE_CONNECTED); in onBluetoothStateChanged_btEnabled_connectedMisMatch_shouldSendNotConnected()
161 mSummaryUpdater.onBluetoothStateChanged(BluetoothAdapter.STATE_ON); in onBluetoothStateChanged_btEnabled_connectedMisMatch_shouldSendNotConnected()
[all …]
DAlwaysDiscoverableTest.java24 import android.bluetooth.BluetoothAdapter;
42 private BluetoothAdapter mBluetoothAdapter;
48 mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter(); in setUp()
73 mBluetoothAdapter.setScanMode(BluetoothAdapter.SCAN_MODE_CONNECTABLE); in stopWithoutStart()
78 mBluetoothAdapter.setScanMode(BluetoothAdapter.SCAN_MODE_NONE); in startSetsModeAndRegistersReceiver()
81 .isEqualTo(BluetoothAdapter.SCAN_MODE_CONNECTABLE_DISCOVERABLE); in startSetsModeAndRegistersReceiver()
97 .isEqualTo(BluetoothAdapter.SCAN_MODE_CONNECTABLE_DISCOVERABLE); in resetsToDiscoverableModeWhenScanModeChanges()
99 sendScanModeChangedIntent(BluetoothAdapter.SCAN_MODE_CONNECTABLE, in resetsToDiscoverableModeWhenScanModeChanges()
100 BluetoothAdapter.SCAN_MODE_CONNECTABLE_DISCOVERABLE); in resetsToDiscoverableModeWhenScanModeChanges()
103 .isEqualTo(BluetoothAdapter.SCAN_MODE_CONNECTABLE_DISCOVERABLE); in resetsToDiscoverableModeWhenScanModeChanges()
[all …]
DBluetoothEnablerTest.java29 import android.bluetooth.BluetoothAdapter;
102 mShadowBluetoothAdapter = Shadow.extract(BluetoothAdapter.getDefaultAdapter()); in setUp()
205 mShadowBluetoothAdapter.setState(BluetoothAdapter.STATE_OFF); in startWithBluetoothOff_switchIsOff()
213 mShadowBluetoothAdapter.setState(BluetoothAdapter.STATE_ON); in startWithBluetoothOn_switchIsOn()
226 mShadowBluetoothAdapter.setState(BluetoothAdapter.STATE_ON); in bluetoothTurnsOff_switchTurnsOff()
234 Intent turningOff = new Intent(BluetoothAdapter.ACTION_STATE_CHANGED); in bluetoothTurnsOff_switchTurnsOff()
235 turningOff.putExtra(BluetoothAdapter.EXTRA_STATE, BluetoothAdapter.STATE_TURNING_OFF); in bluetoothTurnsOff_switchTurnsOff()
237 Intent off = new Intent(BluetoothAdapter.ACTION_STATE_CHANGED); in bluetoothTurnsOff_switchTurnsOff()
238 off.putExtra(BluetoothAdapter.EXTRA_STATE, BluetoothAdapter.STATE_OFF); in bluetoothTurnsOff_switchTurnsOff()
251 mShadowBluetoothAdapter.setState(BluetoothAdapter.STATE_OFF); in bluetoothTurnsOn_switchTurnsOn()
[all …]
DRequestPermissionActivityTest.kt18 import android.bluetooth.BluetoothAdapter
40 bluetoothAdapter = Shadow.extract(BluetoothAdapter.getDefaultAdapter()) in setUp()
51 bluetoothAdapter.setState(BluetoothAdapter.STATE_OFF) in requestEnable_whenBluetoothIsOff_showConfirmDialog()
53 createActivity(action = BluetoothAdapter.ACTION_REQUEST_ENABLE) in requestEnable_whenBluetoothIsOff_showConfirmDialog()
63 bluetoothAdapter.setState(BluetoothAdapter.STATE_ON) in requestEnable_whenBluetoothIsOn_doNothing()
65 createActivity(action = BluetoothAdapter.ACTION_REQUEST_ENABLE) in requestEnable_whenBluetoothIsOn_doNothing()
73 bluetoothAdapter.setState(BluetoothAdapter.STATE_OFF) in requestDisable_whenBluetoothIsOff_doNothing()
75 createActivity(action = BluetoothAdapter.ACTION_REQUEST_DISABLE) in requestDisable_whenBluetoothIsOff_doNothing()
83 bluetoothAdapter.setState(BluetoothAdapter.STATE_ON) in requestDisable_whenBluetoothIsOn_showConfirmDialog()
85 createActivity(action = BluetoothAdapter.ACTION_REQUEST_DISABLE) in requestDisable_whenBluetoothIsOn_showConfirmDialog()
/packages/apps/Settings/src/com/android/settings/bluetooth/
DRequestPermissionActivity.java22 import android.bluetooth.BluetoothAdapter;
68 private BluetoothAdapter mBluetoothAdapter;
99 case BluetoothAdapter.STATE_OFF: in onCreate()
100 case BluetoothAdapter.STATE_TURNING_OFF: in onCreate()
103 case BluetoothAdapter.STATE_ON: in onCreate()
104 case BluetoothAdapter.STATE_TURNING_ON: in onCreate()
126 case BluetoothAdapter.STATE_OFF: in onCreate()
127 case BluetoothAdapter.STATE_TURNING_OFF: in onCreate()
128 case BluetoothAdapter.STATE_TURNING_ON: in onCreate()
153 case BluetoothAdapter.STATE_ON: in onCreate()
[all …]
DAlwaysDiscoverable.java19 import android.bluetooth.BluetoothAdapter;
38 private BluetoothAdapter mBluetoothAdapter;
46 mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter(); in AlwaysDiscoverable()
48 mIntentFilter.addAction(BluetoothAdapter.ACTION_SCAN_MODE_CHANGED); in AlwaysDiscoverable()
62 != BluetoothAdapter.SCAN_MODE_CONNECTABLE_DISCOVERABLE) { in start()
63 mBluetoothAdapter.setScanMode(BluetoothAdapter.SCAN_MODE_CONNECTABLE_DISCOVERABLE); in start()
75 () -> mBluetoothAdapter.setScanMode(BluetoothAdapter.SCAN_MODE_CONNECTABLE)); in stop()
81 if (action != BluetoothAdapter.ACTION_SCAN_MODE_CHANGED) { in onReceive()
86 != BluetoothAdapter.SCAN_MODE_CONNECTABLE_DISCOVERABLE) { in onReceive()
87 mBluetoothAdapter.setScanMode(BluetoothAdapter.SCAN_MODE_CONNECTABLE_DISCOVERABLE); in onReceive()
DLocalDeviceNameDialogFragment.java20 import android.bluetooth.BluetoothAdapter;
32 private BluetoothAdapter mBluetoothAdapter;
38 if (BluetoothAdapter.ACTION_LOCAL_NAME_CHANGED.equals(action) ||
39 (BluetoothAdapter.ACTION_STATE_CHANGED.equals(action) &&
40 intent.getIntExtra(BluetoothAdapter.EXTRA_STATE, BluetoothAdapter.ERROR)
41 == BluetoothAdapter.STATE_ON)) {
50 mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter(); in onCreate()
57 filter.addAction(BluetoothAdapter.ACTION_STATE_CHANGED); in onResume()
58 filter.addAction(BluetoothAdapter.ACTION_LOCAL_NAME_CHANGED); in onResume()
DBluetoothDiscoverableEnabler.java19 import android.bluetooth.BluetoothAdapter;
68 private final BluetoothAdapter mBluetoothAdapter;
80 if (BluetoothAdapter.ACTION_SCAN_MODE_CHANGED.equals(intent.getAction())) {
81 int mode = intent.getIntExtra(BluetoothAdapter.EXTRA_SCAN_MODE,
82 BluetoothAdapter.ERROR);
83 if (mode != BluetoothAdapter.ERROR) {
98 mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter(); in BluetoothDiscoverableEnabler()
113 IntentFilter filter = new IntentFilter(BluetoothAdapter.ACTION_SCAN_MODE_CHANGED); in resume()
142 mBluetoothAdapter.setScanMode(BluetoothAdapter.SCAN_MODE_CONNECTABLE_DISCOVERABLE); in setEnabled()
154 mBluetoothAdapter.setScanMode(BluetoothAdapter.SCAN_MODE_CONNECTABLE); in setEnabled()
[all …]
/packages/modules/Bluetooth/framework/tests/bumble/src/android/bluetooth/
DDeviceDiscoveryTest.java50 private final BluetoothAdapter mAdapter = mManager.getAdapter();
65 if (BluetoothAdapter.ACTION_DISCOVERY_STARTED.equals(intent.getAction())) {
67 BluetoothAdapter.ACTION_DISCOVERY_STARTED);
68 } else if (BluetoothAdapter.ACTION_DISCOVERY_FINISHED.equals(
71 BluetoothAdapter.ACTION_DISCOVERY_FINISHED);
83 IntentFilter filter = new IntentFilter(BluetoothAdapter.ACTION_DISCOVERY_STARTED); in startDeviceDiscoveryTest()
84 filter.addAction(BluetoothAdapter.ACTION_DISCOVERY_FINISHED); in startDeviceDiscoveryTest()
89 .isEqualTo(BluetoothAdapter.ACTION_DISCOVERY_STARTED); in startDeviceDiscoveryTest()
93 .isEqualTo(BluetoothAdapter.ACTION_DISCOVERY_FINISHED); in startDeviceDiscoveryTest()
103 IntentFilter filter = new IntentFilter(BluetoothAdapter.ACTION_DISCOVERY_STARTED); in cancelDeviceDiscoveryTest()
[all …]
/packages/apps/Settings/tests/legacy_unit/src/com/android/settings/tests/
DBluetoothRequestPermissionTest.java20 import android.bluetooth.BluetoothAdapter;
38 BluetoothAdapter mAdapter;
73 mAdapter = BluetoothAdapter.getDefaultAdapter(); in onCreate()
95 filter.addAction(BluetoothAdapter.ACTION_DISCOVERY_STARTED); in onCreate()
96 filter.addAction(BluetoothAdapter.ACTION_DISCOVERY_FINISHED); in onCreate()
97 filter.addAction(BluetoothAdapter.ACTION_STATE_CHANGED); in onCreate()
107 i.setAction(BluetoothAdapter.ACTION_REQUEST_ENABLE); in requestPermission()
110 i.setAction(BluetoothAdapter.ACTION_REQUEST_DISCOVERABLE); in requestPermission()
113 i.putExtra(BluetoothAdapter.EXTRA_DISCOVERABLE_DURATION, timeout); in requestPermission()
152 if (BluetoothAdapter.ACTION_STATE_CHANGED.equals(action)) {
[all …]
/packages/apps/Car/Settings/tests/deviceless/src/com/android/car/settings/bluetooth/
DBluetoothPreferenceControllerTest.java32 import android.bluetooth.BluetoothAdapter;
172 BluetoothAdapter.getDefaultAdapter().disable(); in getAvailabilityStatus_adapterDisabled_conditionallyUnavailable()
173 getShadowBluetoothAdapter().setState(BluetoothAdapter.STATE_OFF); in getAvailabilityStatus_adapterDisabled_conditionallyUnavailable()
183 BluetoothAdapter.getDefaultAdapter().disable(); in getAvailabilityStatus_adapterDisabled_conditionallyUnavailable_zoneWrite()
184 getShadowBluetoothAdapter().setState(BluetoothAdapter.STATE_OFF); in getAvailabilityStatus_adapterDisabled_conditionallyUnavailable_zoneWrite()
194 BluetoothAdapter.getDefaultAdapter().disable(); in getAvailabilityStatus_adapterDisabled_conditionallyUnavailable_zoneRead()
195 getShadowBluetoothAdapter().setState(BluetoothAdapter.STATE_OFF); in getAvailabilityStatus_adapterDisabled_conditionallyUnavailable_zoneRead()
205 BluetoothAdapter.getDefaultAdapter().disable(); in getAvailabilityStatus_adapterDisabled_conditionallyUnavailable_zoneHidden()
206 getShadowBluetoothAdapter().setState(BluetoothAdapter.STATE_OFF); in getAvailabilityStatus_adapterDisabled_conditionallyUnavailable_zoneHidden()
215 BluetoothAdapter.getDefaultAdapter().enable(); in getAvailabilityStatus_available()
[all …]
DLocalRenameDialogFragmentTest.java19 import static android.bluetooth.BluetoothAdapter.EXTRA_LOCAL_NAME;
20 import static android.bluetooth.BluetoothAdapter.STATE_ON;
25 import android.bluetooth.BluetoothAdapter;
63 BluetoothAdapter.getDefaultAdapter().enable(); in setUp()
73 BluetoothAdapter.getDefaultAdapter().setName(NAME); in getDeviceName_adapterEnabled_returnsLocalAdapterName()
80 BluetoothAdapter.getDefaultAdapter().setName(NAME); in getDeviceName_adapterDisabled_returnsNull()
81 BluetoothAdapter.getDefaultAdapter().disable(); in getDeviceName_adapterDisabled_returnsNull()
88 BluetoothAdapter.getDefaultAdapter().setName(NAME); in localNameChangedBroadcast_updatesDeviceName()
93 BluetoothAdapter.getDefaultAdapter().setName(NAME_UPDATED); in localNameChangedBroadcast_updatesDeviceName()
94 Intent intent = new Intent(BluetoothAdapter.ACTION_LOCAL_NAME_CHANGED); in localNameChangedBroadcast_updatesDeviceName()
[all …]
DBluetoothNamePreferenceControllerTest.java28 import android.bluetooth.BluetoothAdapter;
70 BluetoothAdapter.getDefaultAdapter().enable(); in setUp()
71 getShadowBluetoothAdapter().setState(BluetoothAdapter.STATE_ON); in setUp()
87 BluetoothAdapter.getDefaultAdapter().setName(NAME); in refreshUi_setsNameAsSummary()
113 BluetoothAdapter.getDefaultAdapter().setName(NAME); in started_localNameChangedBroadcast_updatesSummary()
117 BluetoothAdapter.getDefaultAdapter().setName(NAME_UPDATED); in started_localNameChangedBroadcast_updatesSummary()
119 new Intent(BluetoothAdapter.ACTION_LOCAL_NAME_CHANGED)); in started_localNameChangedBroadcast_updatesSummary()
126 BluetoothAdapter.getDefaultAdapter().setName(NAME); in stopped_noUpdateOnLocalNameChangedBroadcast()
131 BluetoothAdapter.getDefaultAdapter().setName(NAME_UPDATED); in stopped_noUpdateOnLocalNameChangedBroadcast()
133 new Intent(BluetoothAdapter.ACTION_LOCAL_NAME_CHANGED)); in stopped_noUpdateOnLocalNameChangedBroadcast()
[all …]
/packages/services/Car/tests/carservice_unit_test/src/com/android/car/bluetooth/
DFastPairProviderTest.java38 import android.bluetooth.BluetoothAdapter;
130 @Mock BluetoothAdapter mMockBluetoothAdapter;
177 when(mMockBluetoothAdapter.getState()).thenReturn(BluetoothAdapter.STATE_OFF); in setUp()
314 Intent intent = new Intent(BluetoothAdapter.ACTION_STATE_CHANGED); in sendAdapterStateChange()
315 intent.putExtra(BluetoothAdapter.EXTRA_STATE, newState); in sendAdapterStateChange()
316 intent.putExtra(BluetoothAdapter.EXTRA_PREVIOUS_STATE, fromState); in sendAdapterStateChange()
328 Intent intent = new Intent(BluetoothAdapter.ACTION_SCAN_MODE_CHANGED); in sendScanModeChange()
329 intent.putExtra(BluetoothAdapter.EXTRA_SCAN_MODE, mode); in sendScanModeChange()
436 sendAdapterStateChange(BluetoothAdapter.STATE_TURNING_ON, BluetoothAdapter.STATE_OFF); in testReceiveAdapterOn_startGattService()
437 sendAdapterStateChange(BluetoothAdapter.STATE_ON, BluetoothAdapter.STATE_TURNING_ON); in testReceiveAdapterOn_startGattService()
[all …]
/packages/apps/Car/Settings/src/com/android/car/settings/bluetooth/
DBluetoothRequestPermissionActivity.java24 import android.bluetooth.BluetoothAdapter;
117 case BluetoothAdapter.STATE_OFF: in onCreate()
118 case BluetoothAdapter.STATE_TURNING_OFF: in onCreate()
122 case BluetoothAdapter.STATE_ON: in onCreate()
123 case BluetoothAdapter.STATE_TURNING_ON: in onCreate()
136 case BluetoothAdapter.STATE_OFF: in onCreate()
137 case BluetoothAdapter.STATE_TURNING_OFF: in onCreate()
141 case BluetoothAdapter.STATE_ON: in onCreate()
142 case BluetoothAdapter.STATE_TURNING_ON: in onCreate()
153 case BluetoothAdapter.STATE_OFF: in onCreate()
[all …]
DBluetoothStateSwitchPreferenceController.java25 import android.bluetooth.BluetoothAdapter;
53 BluetoothAdapter.ACTION_STATE_CHANGED);
57 int state = intent.getIntExtra(BluetoothAdapter.EXTRA_STATE, BluetoothAdapter.ERROR);
61 private final BluetoothAdapter mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter();
90 updateSwitchPreference(mBluetoothAdapter.getState() == BluetoothAdapter.STATE_ON in updateState()
91 || mBluetoothAdapter.getState() == BluetoothAdapter.STATE_TURNING_ON); in updateState()
178 case BluetoothAdapter.STATE_TURNING_ON: in handleStateChanged()
182 case BluetoothAdapter.STATE_ON: in handleStateChanged()
186 case BluetoothAdapter.STATE_TURNING_OFF: in handleStateChanged()
190 case BluetoothAdapter.STATE_OFF: in handleStateChanged()
[all …]
/packages/services/Car/service/src/com/android/car/bluetooth/
DFastPairProvider.java21 import android.bluetooth.BluetoothAdapter;
56 private final BluetoothAdapter mBluetoothAdapter;
75 if (successful || mScanMode != BluetoothAdapter.SCAN_MODE_CONNECTABLE_DISCOVERABLE) {
108 case BluetoothAdapter.ACTION_SCAN_MODE_CHANGED:
109 int newScanMode = intent.getIntExtra(BluetoothAdapter.EXTRA_SCAN_MODE,
110 BluetoothAdapter.ERROR);
120 if (mScanMode == BluetoothAdapter.SCAN_MODE_CONNECTABLE_DISCOVERABLE) {
135 } else if (mBluetoothAdapter.getState() == BluetoothAdapter.STATE_ON) {
140 case BluetoothAdapter.ACTION_STATE_CHANGED:
141 int newState = intent.getIntExtra(BluetoothAdapter.EXTRA_STATE,
[all …]
/packages/apps/Settings/src/com/android/settings/network/tether/
DBluetoothTetherSwitchPreference.kt19 import android.bluetooth.BluetoothAdapter
60 BluetoothAdapter.getDefaultAdapter() ?: return false in storage()
67 val adapter = BluetoothAdapter.getDefaultAdapter() ?: return false in isEnabled()
72 BluetoothAdapter.STATE_TURNING_OFF, in isEnabled()
73 BluetoothAdapter.STATE_TURNING_ON -> return false in isEnabled()
101 BluetoothAdapter.ACTION_STATE_CHANGED, in getReadPermit()
118 filter.addAction(BluetoothAdapter.ACTION_STATE_CHANGED) in getReadPermit()
140 val adapter = BluetoothAdapter.getDefaultAdapter() ?: return false as T in contains()
165 return ((btState == BluetoothAdapter.STATE_ON || in contains()
166 btState == BluetoothAdapter.STATE_TURNING_OFF) && pan != null && pan.isTetheringOn) in contains()
[all …]
DTetherSettings.java28 import android.bluetooth.BluetoothAdapter;
175 BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter(); in onCreate()
184 new IntentFilter(BluetoothAdapter.ACTION_STATE_CHANGED)); in onCreate()
246 BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter(); in onDestroy()
303 if (TextUtils.equals(action, BluetoothAdapter.ACTION_STATE_CHANGED)) { in onReceive()
305 intent.getIntExtra(BluetoothAdapter.EXTRA_STATE, BluetoothAdapter.ERROR); in onReceive()
306 Log.i(TAG, "onReceive: state: " + BluetoothAdapter.nameForState(state)); in onReceive()
309 case BluetoothAdapter.STATE_ON: in onReceive()
310 BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter(); in onReceive()
351 } else if (action.equals(BluetoothAdapter.ACTION_STATE_CHANGED)) { in onReceive()
[all …]
/packages/modules/Bluetooth/android/app/src/com/android/bluetooth/avrcpcontroller/
DAvrcpControllerNativeInterface.java19 import android.bluetooth.BluetoothAdapter;
123 BluetoothDevice device = BluetoothAdapter.getDefaultAdapter().getRemoteDevice(address); in onConnectionStateChanged()
138 BluetoothDevice device = BluetoothAdapter.getDefaultAdapter().getRemoteDevice(address); in getRcPsm()
146 BluetoothDevice device = BluetoothAdapter.getDefaultAdapter().getRemoteDevice(address); in handlePlayerAppSetting()
154 BluetoothDevice device = BluetoothAdapter.getDefaultAdapter().getRemoteDevice(address); in onPlayerAppSettingChanged()
162 BluetoothDevice device = BluetoothAdapter.getDefaultAdapter().getRemoteDevice(address); in handleSetAbsVolume()
170 BluetoothDevice device = BluetoothAdapter.getDefaultAdapter().getRemoteDevice(address); in handleRegisterNotificationAbsVol()
178 BluetoothDevice device = BluetoothAdapter.getDefaultAdapter().getRemoteDevice(address); in onTrackChanged()
186 BluetoothDevice device = BluetoothAdapter.getDefaultAdapter().getRemoteDevice(address); in onPlayPositionChanged()
194 BluetoothDevice device = BluetoothAdapter.getDefaultAdapter().getRemoteDevice(address); in onPlayStatusChanged()
[all …]
/packages/apps/Settings/src/com/android/settings/connecteddevice/
DBluetoothPreference.kt22 import android.bluetooth.BluetoothAdapter
98 it == BluetoothAdapter.STATE_ON || it == BluetoothAdapter.STATE_OFF in storage()
136 override val bluetoothAdapter: BluetoothAdapter?,
145 it == BluetoothAdapter.STATE_ON || it == BluetoothAdapter.STATE_TURNING_ON in contains()
167 intent.getIntExtra(BluetoothAdapter.EXTRA_STATE, BluetoothAdapter.ERROR) in onFirstObserverAdded()
169 state == BluetoothAdapter.STATE_ON || in onFirstObserverAdded()
170 state == BluetoothAdapter.STATE_OFF in onFirstObserverAdded()
178 IntentFilter(BluetoothAdapter.ACTION_STATE_CHANGED), in onFirstObserverAdded()
193 createDataStore(context, BluetoothAdapter.getDefaultAdapter()) in createDataStore()
197 bluetoothAdapter: BluetoothAdapter?, in createDataStore()
[all …]
/packages/modules/Bluetooth/android/app/tests/unit/src/com/android/bluetooth/btservice/
DProfileServiceTest.java30 import android.bluetooth.BluetoothAdapter;
203 setAllProfilesState(BluetoothAdapter.STATE_ON, 1); in testEnableDisable()
204 setAllProfilesState(BluetoothAdapter.STATE_OFF, 1); in testEnableDisable()
212 setAllProfilesState(BluetoothAdapter.STATE_ON, 1); in testEnableDisableTwice()
213 setAllProfilesState(BluetoothAdapter.STATE_OFF, 1); in testEnableDisableTwice()
214 setAllProfilesState(BluetoothAdapter.STATE_ON, 2); in testEnableDisableTwice()
215 setAllProfilesState(BluetoothAdapter.STATE_OFF, 2); in testEnableDisableTwice()
231 setProfileState(profile, BluetoothAdapter.STATE_ON); in testEnableDisableInterleaved()
232 setProfileState(profile, BluetoothAdapter.STATE_OFF); in testEnableDisableInterleaved()
237 .onProfileServiceStateChanged(starts.capture(), eq(BluetoothAdapter.STATE_ON)); in testEnableDisableInterleaved()
[all …]
/packages/modules/Bluetooth/android/app/src/com/android/bluetooth/
DObexServerSockets.java18 import android.bluetooth.BluetoothAdapter;
78 BluetoothAdapter.SOCKET_CHANNEL_AUTO_STATIC_NO_SDP, in create()
79 BluetoothAdapter.SOCKET_CHANNEL_AUTO_STATIC_NO_SDP, in create()
94 BluetoothAdapter.SOCKET_CHANNEL_AUTO_STATIC_NO_SDP, in createInsecure()
95 BluetoothAdapter.SOCKET_CHANNEL_AUTO_STATIC_NO_SDP, in createInsecure()
118 BluetoothAdapter bt = BluetoothAdapter.getDefaultAdapter(); in create()
155 if ((state != BluetoothAdapter.STATE_TURNING_ON) in create()
156 && (state != BluetoothAdapter.STATE_ON)) { in create()
232 BluetoothAdapter mAdapter = BluetoothAdapter.getDefaultAdapter(); in onAcceptFailed()
233 if ((mAdapter != null) && (mAdapter.getState() == BluetoothAdapter.STATE_ON)) { in onAcceptFailed()
/packages/apps/TvSettings/Settings/src/com/android/tv/settings/accessories/
DBluetoothRequestPermissionActivity.java21 import android.bluetooth.BluetoothAdapter;
41 private BluetoothAdapter mBluetoothAdapter;
48 mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter(); in onCreate()
78 mBluetoothAdapter.setScanMode(BluetoothAdapter.SCAN_MODE_CONNECTABLE_DISCOVERABLE); in proceedAndFinish()
89 if (intent.getAction().equals(BluetoothAdapter.ACTION_REQUEST_DISCOVERABLE) in parseIntent()
90 || intent.getAction().equals(BluetoothAdapter.ACTION_REQUEST_ENABLE)) { in parseIntent()
91 mTimeoutSeconds = intent.getIntExtra(BluetoothAdapter.EXTRA_DISCOVERABLE_DURATION, in parseIntent()
100 + BluetoothAdapter.ACTION_REQUEST_DISCOVERABLE); in parseIntent()

12345678910>>...21