Home
last modified time | relevance | path

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

12345

/frameworks/base/core/tests/bluetoothtests/src/android/bluetooth/
DBluetoothRebootStressTest.java54 BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter(); in testStart()
64 BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter(); in testMiddleNoToggle()
75 BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter(); in testMiddleToggle()
88 BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter(); in testStop()
DBluetoothTestUtils.java114 if (BluetoothAdapter.ACTION_DISCOVERY_STARTED.equals(intent.getAction())) { in onReceive()
116 } else if (BluetoothAdapter.ACTION_DISCOVERY_FINISHED.equals(intent.getAction())) { in onReceive()
118 } else if (BluetoothAdapter.ACTION_SCAN_MODE_CHANGED.equals(intent.getAction())) { in onReceive()
119 int mode = intent.getIntExtra(BluetoothAdapter.EXTRA_SCAN_MODE, -1); in onReceive()
122 case BluetoothAdapter.SCAN_MODE_NONE: in onReceive()
125 case BluetoothAdapter.SCAN_MODE_CONNECTABLE: in onReceive()
128 case BluetoothAdapter.SCAN_MODE_CONNECTABLE_DISCOVERABLE: in onReceive()
132 } else if (BluetoothAdapter.ACTION_STATE_CHANGED.equals(intent.getAction())) { in onReceive()
133 int state = intent.getIntExtra(BluetoothAdapter.EXTRA_STATE, -1); in onReceive()
136 case BluetoothAdapter.STATE_OFF: in onReceive()
[all …]
/frameworks/base/services/core/java/com/android/server/
DBluetoothManagerService.java36 import android.bluetooth.BluetoothAdapter;
317 if (state == BluetoothAdapter.STATE_BLE_TURNING_ON in onFactoryReset()
318 || state == BluetoothAdapter.STATE_TURNING_ON in onFactoryReset()
319 || state == BluetoothAdapter.STATE_TURNING_OFF) { in onFactoryReset()
320 if (!waitForState(Set.of(BluetoothAdapter.STATE_BLE_ON, BluetoothAdapter.STATE_ON))) { in onFactoryReset()
333 if (state == BluetoothAdapter.STATE_BLE_ON) { in onFactoryReset()
339 } else if (state == BluetoothAdapter.STATE_ON) { in onFactoryReset()
365 int st = BluetoothAdapter.STATE_OFF; in onAirplaneModeChanged()
379 "Airplane Mode change - current state: " + BluetoothAdapter.nameForState( in onAirplaneModeChanged()
387 if (st == BluetoothAdapter.STATE_BLE_ON) { in onAirplaneModeChanged()
[all …]
DBluetoothModeChangeHelper.java21 import android.bluetooth.BluetoothAdapter;
40 private final BluetoothAdapter mAdapter;
44 mAdapter = BluetoothAdapter.getDefaultAdapter(); in BluetoothModeChangeHelper()
91 final BluetoothAdapter adapter = mAdapter; in isBluetoothOn()
95 return adapter.getLeState() == BluetoothAdapter.STATE_ON; in isBluetoothOn()
DBluetoothService.java21 import android.bluetooth.BluetoothAdapter;
50 publishBinderService(BluetoothAdapter.BLUETOOTH_MANAGER_SERVICE, in onBootPhase()
/frameworks/base/packages/SettingsLib/tests/robotests/testutils/com/android/settingslib/testutils/shadow/
DShadowBluetoothAdapter.java19 import static android.bluetooth.BluetoothAdapter.ACTIVE_DEVICE_ALL;
20 import static android.bluetooth.BluetoothAdapter.ACTIVE_DEVICE_AUDIO;
21 import static android.bluetooth.BluetoothAdapter.ACTIVE_DEVICE_PHONE_CALL;
23 import android.bluetooth.BluetoothAdapter;
34 @Implements(value = BluetoothAdapter.class)
72 protected boolean removeActiveDevice(@BluetoothAdapter.ActiveDeviceUse int profiles) { in removeActiveDevice()
82 @BluetoothAdapter.ActiveDeviceUse int profiles) { in setActiveDevice()
/frameworks/base/packages/SettingsLib/src/com/android/settingslib/bluetooth/
DLocalBluetoothAdapter.java19 import android.bluetooth.BluetoothAdapter;
46 private final BluetoothAdapter mAdapter;
52 private int mState = BluetoothAdapter.ERROR;
58 private LocalBluetoothAdapter(BluetoothAdapter adapter) { in LocalBluetoothAdapter()
74 BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter(); in getInstance()
209 if (state == BluetoothAdapter.STATE_ON) { in setBluetoothStateInt()
235 ? BluetoothAdapter.STATE_TURNING_ON in setBluetoothEnabled()
236 : BluetoothAdapter.STATE_TURNING_OFF); in setBluetoothEnabled()
DBluetoothEventManager.java20 import android.bluetooth.BluetoothAdapter;
91 addHandler(BluetoothAdapter.ACTION_STATE_CHANGED, new AdapterStateChangedHandler()); in BluetoothEventManager()
93 addHandler(BluetoothAdapter.ACTION_CONNECTION_STATE_CHANGED, in BluetoothEventManager()
97 addHandler(BluetoothAdapter.ACTION_DISCOVERY_STARTED, in BluetoothEventManager()
99 addHandler(BluetoothAdapter.ACTION_DISCOVERY_FINISHED, in BluetoothEventManager()
264 int state = intent.getIntExtra(BluetoothAdapter.EXTRA_STATE, in onReceive()
265 BluetoothAdapter.ERROR); in onReceive()
318 int state = intent.getIntExtra(BluetoothAdapter.EXTRA_CONNECTION_STATE, in onReceive()
319 BluetoothAdapter.ERROR); in onReceive()
477 state = BluetoothAdapter.STATE_CONNECTED; in onReceive()
[all …]
DHeadsetProfile.java19 import static android.bluetooth.BluetoothAdapter.ACTIVE_DEVICE_PHONE_CALL;
23 import android.bluetooth.BluetoothAdapter;
49 private final BluetoothAdapter mBluetoothAdapter;
104 mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter(); in HeadsetProfile()
232 BluetoothAdapter.getDefaultAdapter().closeProfileProxy(BluetoothProfile.HEADSET, in finalize()
DHearingAidProfile.java19 import static android.bluetooth.BluetoothAdapter.ACTIVE_DEVICE_ALL;
23 import android.bluetooth.BluetoothAdapter;
49 private final BluetoothAdapter mBluetoothAdapter;
102 mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter(); in HearingAidProfile()
256 BluetoothAdapter.getDefaultAdapter().closeProfileProxy(BluetoothProfile.HEARING_AID, in finalize()
DBluetoothDiscoverableTimeoutReceiver.java22 import android.bluetooth.BluetoothAdapter;
78 localBluetoothAdapter.getState() == BluetoothAdapter.STATE_ON) { in onReceive()
80 localBluetoothAdapter.setScanMode(BluetoothAdapter.SCAN_MODE_CONNECTABLE); in onReceive()
DPbapServerProfile.java21 import android.bluetooth.BluetoothAdapter;
82 BluetoothAdapter.getDefaultAdapter().getProfileProxy(context, new PbapServiceListener(), in PbapServerProfile()
147 BluetoothAdapter.getDefaultAdapter().closeProfileProxy(BluetoothProfile.PBAP, in finalize()
/frameworks/base/packages/SettingsLib/src/com/android/settingslib/deviceinfo/
DAbstractBluetoothAddressPreferenceController.java20 import android.bluetooth.BluetoothAdapter;
41 BluetoothAdapter.ACTION_STATE_CHANGED
52 return BluetoothAdapter.getDefaultAdapter() != null; in isAvailable()
75 BluetoothAdapter bluetooth = BluetoothAdapter.getDefaultAdapter(); in updateConnectivity()
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/
DBluetoothControllerImplTest.java27 import android.bluetooth.BluetoothAdapter;
95 when(mMockAdapter.getConnectionState()).thenReturn(BluetoothAdapter.STATE_DISCONNECTED); in testNoConnectionWithDevices()
98 BluetoothAdapter.STATE_DISCONNECTED); in testNoConnectionWithDevices()
160 when(mMockAdapter.getConnectionState()).thenReturn(BluetoothAdapter.STATE_CONNECTING); in testOnServiceConnected_updatesConnectionState()
170 mBluetoothControllerImpl.onBluetoothStateChanged(BluetoothAdapter.STATE_OFF); in testOnBluetoothStateChange_updatesBluetoothState()
172 assertEquals(BluetoothAdapter.STATE_OFF, mBluetoothControllerImpl.getBluetoothState()); in testOnBluetoothStateChange_updatesBluetoothState()
174 mBluetoothControllerImpl.onBluetoothStateChanged(BluetoothAdapter.STATE_ON); in testOnBluetoothStateChange_updatesBluetoothState()
176 assertEquals(BluetoothAdapter.STATE_ON, mBluetoothControllerImpl.getBluetoothState()); in testOnBluetoothStateChange_updatesBluetoothState()
182 BluetoothAdapter.STATE_CONNECTING, in testOnBluetoothStateChange_updatesConnectionState()
183 BluetoothAdapter.STATE_DISCONNECTED); in testOnBluetoothStateChange_updatesConnectionState()
[all …]
/frameworks/base/core/tests/hosttests/test-apps/ExternalSharedPermsBT/src/com/android/framework/externalsharedpermsbttestapp/
DExternalSharedPermsBTTest.java18 import android.bluetooth.BluetoothAdapter;
32 BluetoothAdapter mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter(); in testRunBluetooth()
/frameworks/base/cmds/svc/src/com/android/commands/svc/
DBluetoothCommand.java19 import android.bluetooth.BluetoothAdapter;
43 BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter(); in run()
/frameworks/base/packages/SettingsLib/tests/robotests/src/com/android/settingslib/deviceinfo/
DBluetoothAddressPreferenceControllerTest.java23 import android.bluetooth.BluetoothAdapter;
59 @Implements(BluetoothAdapter.class)
62 public static BluetoothAdapter getDefaultAdapter() { in getDefaultAdapter()
95 .asList().contains(BluetoothAdapter.ACTION_STATE_CHANGED); in testHasBluetoothStateChangedFilter()
/frameworks/base/core/tests/hosttests/test-apps/ExternalSharedPerms/src/com/android/framework/externalsharedpermstestapp/
DExternalSharedPermsTest.java18 import android.bluetooth.BluetoothAdapter;
48 BluetoothAdapter mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter(); in testRunLocationAndBluetooth()
/frameworks/base/core/tests/hosttests/test-apps/ExternalSharedPermsDiffKey/src/com/android/framework/externalsharedpermsdiffkeytestapp/
DExternalSharedPermsDiffKeyTest.java18 import android.bluetooth.BluetoothAdapter;
46 BluetoothAdapter mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter(); in testRunBluetoothAndFineLocation()
/frameworks/base/services/core/java/com/android/server/media/
DBluetoothRouteProvider.java19 import static android.bluetooth.BluetoothAdapter.ACTIVE_DEVICE_AUDIO;
20 import static android.bluetooth.BluetoothAdapter.STATE_CONNECTED;
21 import static android.bluetooth.BluetoothAdapter.STATE_DISCONNECTED;
26 import android.bluetooth.BluetoothAdapter;
74 private final BluetoothAdapter mBluetoothAdapter;
92 BluetoothAdapter btAdapter = BluetoothAdapter.getDefaultAdapter(); in createInstance()
99 private BluetoothRouteProvider(Context context, BluetoothAdapter btAdapter, in BluetoothRouteProvider()
113 addEventReceiver(BluetoothAdapter.ACTION_STATE_CHANGED, new AdapterStateChangedReceiver()); in start()
461 int state = intent.getIntExtra(BluetoothAdapter.EXTRA_STATE, -1); in onReceive()
462 if (state == BluetoothAdapter.STATE_OFF in onReceive()
[all …]
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/policy/
DBluetoothControllerImpl.java21 import android.bluetooth.BluetoothAdapter;
74 private int mConnectionState = BluetoothAdapter.STATE_DISCONNECTED;
133 case BluetoothAdapter.STATE_CONNECTED: in stateToString()
135 case BluetoothAdapter.STATE_CONNECTING: in stateToString()
137 case BluetoothAdapter.STATE_DISCONNECTED: in stateToString()
139 case BluetoothAdapter.STATE_DISCONNECTING: in stateToString()
191 return mConnectionState == BluetoothAdapter.STATE_CONNECTED; in isBluetoothConnected()
196 return mConnectionState == BluetoothAdapter.STATE_CONNECTING; in isBluetoothConnecting()
266 if (newList.isEmpty() && state == BluetoothAdapter.STATE_CONNECTED) { in updateConnected()
269 state = BluetoothAdapter.STATE_DISCONNECTED; in updateConnected()
[all …]
/frameworks/opt/telephony/src/java/com/android/internal/telephony/
DBtSmsInterfaceManager.java21 import android.bluetooth.BluetoothAdapter;
45 BluetoothAdapter btAdapter = BluetoothAdapter.getDefaultAdapter(); in sendText()
111 BluetoothAdapter.getDefaultAdapter() in onServiceConnected()
/frameworks/base/apex/jobscheduler/service/java/com/android/server/deviceidle/
DBluetoothConstraint.java19 import android.bluetooth.BluetoothAdapter;
70 filter.addAction(BluetoothAdapter.ACTION_STATE_CHANGED); in startMonitoring()
114 BluetoothAdapter adapter = bluetoothManager.getAdapter(); in isBluetoothConnected()
/frameworks/base/core/tests/bluetoothtests/src/android/bluetooth/le/
DScanResultTest.java19 import android.bluetooth.BluetoothAdapter;
39 BluetoothDevice device = BluetoothAdapter.getDefaultAdapter().getRemoteDevice( in testScanResultParceling()
/frameworks/base/core/java/android/bluetooth/
DBluetoothA2dpSink.java83 private final BluetoothAdapter mAdapter;
99 BluetoothAdapter adapter) { in BluetoothA2dpSink()
316 return setConnectionPolicy(device, BluetoothAdapter.priorityToConnectionPolicy(priority)); in setPriority()
374 return BluetoothAdapter.connectionPolicyToPriority(getConnectionPolicy(device)); in getPriority()
464 return mAdapter.getState() == BluetoothAdapter.STATE_ON; in isEnabled()
468 return device != null && BluetoothAdapter.checkBluetoothAddress(device.getAddress()); in isValidDevice()

12345