Home
last modified time | relevance | path

Searched refs:BluetoothAdapter (Results 1 – 25 of 67) 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()
DBluetoothStressTest.java64 BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter(); in testEnable()
83 BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter(); in testDiscoverable()
106 BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter(); in testScan()
128 BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter(); in testEnablePan()
155 BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter(); in testPair()
181 BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter(); in testAcceptPair()
208 BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter(); in testConnectA2dp()
241 BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter(); in testConnectHeadset()
274 BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter(); in testConnectInput()
307 BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter(); in testConnectPan()
[all …]
DBluetoothTestUtils.java106 if (BluetoothAdapter.ACTION_DISCOVERY_STARTED.equals(intent.getAction())) { in onReceive()
108 } else if (BluetoothAdapter.ACTION_DISCOVERY_FINISHED.equals(intent.getAction())) { in onReceive()
110 } else if (BluetoothAdapter.ACTION_SCAN_MODE_CHANGED.equals(intent.getAction())) { in onReceive()
111 int mode = intent.getIntExtra(BluetoothAdapter.EXTRA_SCAN_MODE, -1); in onReceive()
114 case BluetoothAdapter.SCAN_MODE_NONE: in onReceive()
117 case BluetoothAdapter.SCAN_MODE_CONNECTABLE: in onReceive()
120 case BluetoothAdapter.SCAN_MODE_CONNECTABLE_DISCOVERABLE: in onReceive()
124 } else if (BluetoothAdapter.ACTION_STATE_CHANGED.equals(intent.getAction())) { in onReceive()
125 int state = intent.getIntExtra(BluetoothAdapter.EXTRA_STATE, -1); in onReceive()
128 case BluetoothAdapter.STATE_OFF: in onReceive()
[all …]
/frameworks/base/services/core/java/com/android/server/
DBluetoothManagerService.java21 import android.bluetooth.BluetoothAdapter;
185 if (BluetoothAdapter.ACTION_LOCAL_NAME_CHANGED.equals(action)) {
186 String newName = intent.getStringExtra(BluetoothAdapter.EXTRA_LOCAL_NAME);
201 int st = BluetoothAdapter.STATE_OFF;
217 if (st == BluetoothAdapter.STATE_BLE_ON) {
227 } else if (st == BluetoothAdapter.STATE_ON){
251 mState = BluetoothAdapter.STATE_OFF; in BluetoothManagerService()
262 IntentFilter filter = new IntentFilter(BluetoothAdapter.ACTION_LOCAL_NAME_CHANGED); in BluetoothManagerService()
482 if (mBluetooth != null && (mBluetooth.getState() != BluetoothAdapter.STATE_ON)) { in disableBleScanMode()
548 && mBluetooth.getState() == BluetoothAdapter.STATE_BLE_ON) { in onBluetoothGattServiceUp()
[all …]
DBluetoothService.java19 import android.bluetooth.BluetoothAdapter;
35 publishBinderService(BluetoothAdapter.BLUETOOTH_MANAGER_SERVICE, mBluetoothManagerService); in onStart()
/frameworks/base/packages/SettingsLib/src/com/android/settingslib/bluetooth/
DLocalBluetoothAdapter.java19 import android.bluetooth.BluetoothAdapter;
41 private final BluetoothAdapter mAdapter;
47 private int mState = BluetoothAdapter.ERROR;
53 private LocalBluetoothAdapter(BluetoothAdapter adapter) { in LocalBluetoothAdapter()
69 BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter(); in getInstance()
183 if (state == BluetoothAdapter.STATE_ON) { in setBluetoothStateInt()
209 ? BluetoothAdapter.STATE_TURNING_ON in setBluetoothEnabled()
210 : 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;
77 localBluetoothAdapter.getState() == BluetoothAdapter.STATE_ON) { in onReceive()
80 localBluetoothAdapter.setScanMode(BluetoothAdapter.SCAN_MODE_CONNECTABLE); in onReceive()
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/policy/
DBluetoothControllerImpl.java19 import android.bluetooth.BluetoothAdapter;
44 private int mConnectionState = BluetoothAdapter.STATE_DISCONNECTED;
78 case BluetoothAdapter.STATE_CONNECTED: in stateToString()
80 case BluetoothAdapter.STATE_CONNECTING: in stateToString()
82 case BluetoothAdapter.STATE_DISCONNECTED: in stateToString()
84 case BluetoothAdapter.STATE_DISCONNECTING: in stateToString()
112 return mConnectionState == BluetoothAdapter.STATE_CONNECTED; in isBluetoothConnected()
117 return mConnectionState == BluetoothAdapter.STATE_CONNECTING; in isBluetoothConnecting()
173 if (mLastDevice == null && mConnectionState == BluetoothAdapter.STATE_CONNECTED) { in updateConnected()
176 mConnectionState = 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/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/core/java/android/bluetooth/
DBluetoothAdapter.java93 public final class BluetoothAdapter { class
480 private static BluetoothAdapter sAdapter;
499 public static synchronized BluetoothAdapter getDefaultAdapter() { in getDefaultAdapter()
504 sAdapter = new BluetoothAdapter(managerService); in getDefaultAdapter()
515 BluetoothAdapter(IBluetoothManager managerService) { in BluetoothAdapter() method in BluetoothAdapter
627 if (state == BluetoothAdapter.STATE_ON) { in isLeEnabled()
629 } else if (state == BluetoothAdapter.STATE_BLE_ON) { in isLeEnabled()
690 if (state == BluetoothAdapter.STATE_ON) { in disableBLE()
699 } else if (state == BluetoothAdapter.STATE_BLE_ON) { in disableBLE()
794 if (state == BluetoothAdapter.STATE_BLE_ON in getState()
[all …]
DBluetoothSap.java72 private BluetoothAdapter mAdapter;
128 mAdapter = BluetoothAdapter.getDefaultAdapter(); in BluetoothSap()
415 BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter(); in isEnabled()
417 if (adapter != null && adapter.getState() == BluetoothAdapter.STATE_ON) in isEnabled()
427 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()
DBluetoothHealth.java465 BluetoothAdapter mAdapter;
473 mAdapter = BluetoothAdapter.getDefaultAdapter(); in BluetoothHealth()
541 BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter(); in isEnabled()
543 if (adapter != null && adapter.getState() == BluetoothAdapter.STATE_ON) return true; in isEnabled()
551 if (BluetoothAdapter.checkBluetoothAddress(device.getAddress())) return true; in isValidDevice()
DBluetoothAvrcpController.java69 private BluetoothAdapter mAdapter;
108 mAdapter = BluetoothAdapter.getDefaultAdapter(); in BluetoothAvrcpController()
246 if (mAdapter.getState() == BluetoothAdapter.STATE_ON) return true; in isEnabled()
253 if (BluetoothAdapter.checkBluetoothAddress(device.getAddress())) return true; in isValidDevice()
DBluetoothManager.java53 private final BluetoothAdapter mAdapter;
65 mAdapter = BluetoothAdapter.getDefaultAdapter(); in BluetoothManager()
73 public BluetoothAdapter getAdapter() { in getAdapter()
DBluetoothA2dpSink.java128 private BluetoothAdapter mAdapter;
166 mAdapter = BluetoothAdapter.getDefaultAdapter(); in BluetoothA2dpSink()
418 if (mAdapter.getState() == BluetoothAdapter.STATE_ON) return true; in isEnabled()
425 if (BluetoothAdapter.checkBluetoothAddress(device.getAddress())) return true; in isValidDevice()
DBluetoothPan.java122 private BluetoothAdapter mAdapter;
133 mAdapter = BluetoothAdapter.getDefaultAdapter(); in BluetoothPan()
388 if (mAdapter.getState() == BluetoothAdapter.STATE_ON) return true; in isEnabled()
395 if (BluetoothAdapter.checkBluetoothAddress(device.getAddress())) return true; in isValidDevice()
DBluetoothDevice.java607 BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter(); in getService()
648 if (!BluetoothAdapter.checkBluetoothAddress(address)) { in BluetoothDevice()
1207 BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter(); in isBluetoothEnabled()
1577 BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter(); in connectGatt()
/frameworks/base/core/tests/bluetoothtests/src/android/bluetooth/le/
DScanResultTest.java19 import android.bluetooth.BluetoothAdapter;
39 BluetoothDevice device = BluetoothAdapter.getDefaultAdapter().getRemoteDevice( in testScanResultParceling()
/frameworks/opt/bluetooth/src/android/bluetooth/client/map/
DBluetoothMnsService.java19 import android.bluetooth.BluetoothAdapter;
97 BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter(); in run()
/frameworks/base/docs/html/guide/topics/connectivity/
Dbluetooth.jd33 <li>{@link android.bluetooth.BluetoothAdapter}</li>
85 <dt>{@link android.bluetooth.BluetoothAdapter}</dt>
87 {@link android.bluetooth.BluetoothAdapter} is the entry-point for all Bluetooth
208 accomplished in two steps, using the {@link android.bluetooth.BluetoothAdapter}.</p>
212 <li>Get the {@link android.bluetooth.BluetoothAdapter}
213 <p>The {@link android.bluetooth.BluetoothAdapter} is required for any and all Bluetooth
214 activity. To get the {@link android.bluetooth.BluetoothAdapter}, call the static {@link
215 android.bluetooth.BluetoothAdapter#getDefaultAdapter()} method. This returns a
216 {@link android.bluetooth.BluetoothAdapter} that represents the device's own
219 {@link android.bluetooth.BluetoothAdapter#getDefaultAdapter()} returns null,
[all …]

123