Home
last modified time | relevance | path

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

123

/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.java108 if (BluetoothAdapter.ACTION_DISCOVERY_STARTED.equals(intent.getAction())) { in onReceive()
110 } else if (BluetoothAdapter.ACTION_DISCOVERY_FINISHED.equals(intent.getAction())) { in onReceive()
112 } else if (BluetoothAdapter.ACTION_SCAN_MODE_CHANGED.equals(intent.getAction())) { in onReceive()
113 int mode = intent.getIntExtra(BluetoothAdapter.EXTRA_SCAN_MODE, -1); in onReceive()
116 case BluetoothAdapter.SCAN_MODE_NONE: in onReceive()
119 case BluetoothAdapter.SCAN_MODE_CONNECTABLE: in onReceive()
122 case BluetoothAdapter.SCAN_MODE_CONNECTABLE_DISCOVERABLE: in onReceive()
126 } else if (BluetoothAdapter.ACTION_STATE_CHANGED.equals(intent.getAction())) { in onReceive()
127 int state = intent.getIntExtra(BluetoothAdapter.EXTRA_STATE, -1); in onReceive()
130 case BluetoothAdapter.STATE_OFF: in onReceive()
[all …]
/frameworks/base/services/core/java/com/android/server/
DBluetoothManagerService.java22 import android.bluetooth.BluetoothAdapter;
267 int st = BluetoothAdapter.STATE_OFF;
281 BluetoothAdapter.nameForState(st));
288 if (st == BluetoothAdapter.STATE_BLE_ON) {
301 } else if (st == BluetoothAdapter.STATE_ON){
315 if (BluetoothAdapter.ACTION_LOCAL_NAME_CHANGED.equals(action)) {
316 String newName = intent.getStringExtra(BluetoothAdapter.EXTRA_LOCAL_NAME);
321 } else if (BluetoothAdapter.ACTION_BLUETOOTH_ADDRESS_CHANGED.equals(action)) {
322 String newAddress = intent.getStringExtra(BluetoothAdapter.EXTRA_BLUETOOTH_ADDRESS);
370 mState = BluetoothAdapter.STATE_OFF; in BluetoothManagerService()
[all …]
DBluetoothService.java19 import android.bluetooth.BluetoothAdapter;
37 publishBinderService(BluetoothAdapter.BLUETOOTH_MANAGER_SERVICE, in onBootPhase()
/frameworks/base/packages/SettingsLib/src/com/android/settingslib/bluetooth/
DLocalBluetoothAdapter.java19 import android.bluetooth.BluetoothAdapter;
42 private final BluetoothAdapter mAdapter;
48 private int mState = BluetoothAdapter.ERROR;
54 private LocalBluetoothAdapter(BluetoothAdapter adapter) { in LocalBluetoothAdapter()
70 BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter(); in getInstance()
196 if (state == BluetoothAdapter.STATE_ON) { in setBluetoothStateInt()
222 ? BluetoothAdapter.STATE_TURNING_ON in setBluetoothEnabled()
223 : BluetoothAdapter.STATE_TURNING_OFF); in setBluetoothEnabled()
DBluetoothEventManager.java19 import android.bluetooth.BluetoothAdapter;
85 addHandler(BluetoothAdapter.ACTION_STATE_CHANGED, new AdapterStateChangedHandler()); in BluetoothEventManager()
87 addHandler(BluetoothAdapter.ACTION_CONNECTION_STATE_CHANGED, in BluetoothEventManager()
91 … addHandler(BluetoothAdapter.ACTION_DISCOVERY_STARTED, new ScanningStateChangedHandler(true)); in BluetoothEventManager()
92 … addHandler(BluetoothAdapter.ACTION_DISCOVERY_FINISHED, new ScanningStateChangedHandler(false)); in BluetoothEventManager()
154 int state = intent.getIntExtra(BluetoothAdapter.EXTRA_STATE, in onReceive()
155 BluetoothAdapter.ERROR); in onReceive()
211 int state = intent.getIntExtra(BluetoothAdapter.EXTRA_CONNECTION_STATE, in onReceive()
212 BluetoothAdapter.ERROR); in onReceive()
DPanProfile.java19 import android.bluetooth.BluetoothAdapter;
72 BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter(); in PanProfile()
175BluetoothAdapter.getDefaultAdapter().closeProfileProxy(BluetoothProfile.PAN, mService); in finalize()
DBluetoothDiscoverableTimeoutReceiver.java22 import android.bluetooth.BluetoothAdapter;
79 localBluetoothAdapter.getState() == BluetoothAdapter.STATE_ON) { in onReceive()
81 localBluetoothAdapter.setScanMode(BluetoothAdapter.SCAN_MODE_CONNECTABLE); in onReceive()
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/policy/
DBluetoothControllerImpl.java20 import android.bluetooth.BluetoothAdapter;
56 private int mConnectionState = BluetoothAdapter.STATE_DISCONNECTED;
100 case BluetoothAdapter.STATE_CONNECTED: in stateToString()
102 case BluetoothAdapter.STATE_CONNECTING: in stateToString()
104 case BluetoothAdapter.STATE_DISCONNECTED: in stateToString()
106 case BluetoothAdapter.STATE_DISCONNECTING: in stateToString()
149 return mConnectionState == BluetoothAdapter.STATE_CONNECTED; in isBluetoothConnected()
154 return mConnectionState == BluetoothAdapter.STATE_CONNECTING; in isBluetoothConnecting()
213 if (mLastDevice == null && state == BluetoothAdapter.STATE_CONNECTED) { in updateConnected()
216 state = BluetoothAdapter.STATE_DISCONNECTED; in updateConnected()
[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/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/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/java/android/bluetooth/
DBluetoothPbapClient.java46 private BluetoothAdapter mAdapter;
100 mAdapter = BluetoothAdapter.getDefaultAdapter(); in BluetoothPbapClient()
313 BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter(); in isEnabled()
314 if (adapter != null && adapter.getState() == BluetoothAdapter.STATE_ON) { in isEnabled()
325 if (BluetoothAdapter.checkBluetoothAddress(device.getAddress())) { in isValidDevice()
DBluetoothAdapter.java104 public final class BluetoothAdapter { class
549 private static BluetoothAdapter sAdapter;
571 public static synchronized BluetoothAdapter getDefaultAdapter() { in getDefaultAdapter()
576 sAdapter = new BluetoothAdapter(managerService); in getDefaultAdapter()
587 BluetoothAdapter(IBluetoothManager managerService) { in BluetoothAdapter() method in BluetoothAdapter
728 if (DBG) Log.d(TAG, "isLeEnabled(): " + BluetoothAdapter.nameForState(state)); in isLeEnabled()
729 return (state == BluetoothAdapter.STATE_ON || state == BluetoothAdapter.STATE_BLE_ON); in isLeEnabled()
763 if (state == BluetoothAdapter.STATE_ON || state == BluetoothAdapter.STATE_BLE_ON) { in disableBLE()
843 int state = BluetoothAdapter.STATE_OFF; in getState()
857 if (state == BluetoothAdapter.STATE_BLE_ON in getState()
[all …]
DBluetoothSap.java73 private BluetoothAdapter mAdapter;
129 mAdapter = BluetoothAdapter.getDefaultAdapter(); in BluetoothSap()
416 BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter(); in isEnabled()
418 if (adapter != null && adapter.getState() == BluetoothAdapter.STATE_ON) in isEnabled()
428 if (BluetoothAdapter.checkBluetoothAddress(device.getAddress())) in isValidDevice()
DBluetoothMap.java45 private BluetoothAdapter mAdapter;
91 mAdapter = BluetoothAdapter.getDefaultAdapter(); in BluetoothMap()
393 BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter(); in isEnabled()
394 if (adapter != null && adapter.getState() == BluetoothAdapter.STATE_ON) return true; in isEnabled()
401 if (BluetoothAdapter.checkBluetoothAddress(device.getAddress())) return true; in isValidDevice()
DBluetoothMapClient.java65 private BluetoothAdapter mAdapter;
111 mAdapter = BluetoothAdapter.getDefaultAdapter(); in BluetoothMapClient()
410 BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter(); in isEnabled()
411 if (adapter != null && adapter.getState() == BluetoothAdapter.STATE_ON) return true; in isEnabled()
419 if (BluetoothAdapter.checkBluetoothAddress(device.getAddress())) return true; in isValidDevice()
DBluetoothHealth.java466 BluetoothAdapter mAdapter;
474 mAdapter = BluetoothAdapter.getDefaultAdapter(); in BluetoothHealth()
542 BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter(); in isEnabled()
544 if (adapter != null && adapter.getState() == BluetoothAdapter.STATE_ON) return true; in isEnabled()
552 if (BluetoothAdapter.checkBluetoothAddress(device.getAddress())) return true; in isValidDevice()
DBluetoothManager.java58 private final BluetoothAdapter mAdapter;
70 mAdapter = BluetoothAdapter.getDefaultAdapter(); in BluetoothManager()
78 public BluetoothAdapter getAdapter() { in getAdapter()
DBluetoothAvrcpController.java87 private BluetoothAdapter mAdapter;
126 mAdapter = BluetoothAdapter.getDefaultAdapter(); in BluetoothAvrcpController()
305 if (mAdapter.getState() == BluetoothAdapter.STATE_ON) return true; in isEnabled()
312 if (BluetoothAdapter.checkBluetoothAddress(device.getAddress())) return true; in isValidDevice()
DBluetoothPan.java123 private BluetoothAdapter mAdapter;
134 mAdapter = BluetoothAdapter.getDefaultAdapter(); in BluetoothPan()
389 if (mAdapter.getState() == BluetoothAdapter.STATE_ON) return true; in isEnabled()
396 if (BluetoothAdapter.checkBluetoothAddress(device.getAddress())) return true; in isValidDevice()
/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/le/
DPeriodicAdvertisingManager.java19 import android.bluetooth.BluetoothAdapter;
54 private BluetoothAdapter mBluetoothAdapter;
68 mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter(); in PeriodicAdvertisingManager()
/frameworks/opt/bluetooth/src/android/bluetooth/client/map/
DBluetoothMnsService.java19 import android.bluetooth.BluetoothAdapter;
97 BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter(); in run()
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/
DBluetoothControllerImplTest.java23 import android.bluetooth.BluetoothAdapter;
82 when(mMockAdapter.getConnectionState()).thenReturn(BluetoothAdapter.STATE_DISCONNECTED); in testNoConnectionWithDevices()
85 BluetoothAdapter.STATE_DISCONNECTED); in testNoConnectionWithDevices()

123