Home
last modified time | relevance | path

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

1234

/frameworks/base/core/tests/bluetoothtests/src/android/bluetooth/
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 …]
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.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;
179 if (BluetoothAdapter.ACTION_LOCAL_NAME_CHANGED.equals(action)) {
180 String newName = intent.getStringExtra(BluetoothAdapter.EXTRA_LOCAL_NAME);
195 int st = BluetoothAdapter.STATE_OFF;
214 if (st == BluetoothAdapter.STATE_BLE_ON) {
227 } else if (st == BluetoothAdapter.STATE_ON){
252 mState = BluetoothAdapter.STATE_OFF; in BluetoothManagerService()
263 IntentFilter filter = new IntentFilter(BluetoothAdapter.ACTION_LOCAL_NAME_CHANGED); in BluetoothManagerService()
491 if (mBluetooth != null && (mBluetooth.getState() != BluetoothAdapter.STATE_ON)) { in disableBleScanMode()
560 && mBluetooth.getState() == BluetoothAdapter.STATE_BLE_ON) { in onBluetoothGattServiceUp()
[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()
192 if (state == BluetoothAdapter.STATE_ON) { in setBluetoothStateInt()
218 ? BluetoothAdapter.STATE_TURNING_ON in setBluetoothEnabled()
219 : 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.java20 import android.bluetooth.BluetoothAdapter;
48 private int mConnectionState = BluetoothAdapter.STATE_DISCONNECTED;
90 case BluetoothAdapter.STATE_CONNECTED: in stateToString()
92 case BluetoothAdapter.STATE_CONNECTING: in stateToString()
94 case BluetoothAdapter.STATE_DISCONNECTED: in stateToString()
96 case BluetoothAdapter.STATE_DISCONNECTING: in stateToString()
124 return mConnectionState == BluetoothAdapter.STATE_CONNECTED; in isBluetoothConnected()
129 return mConnectionState == BluetoothAdapter.STATE_CONNECTING; in isBluetoothConnecting()
185 if (mLastDevice == null && mConnectionState == BluetoothAdapter.STATE_CONNECTED) { in updateConnected()
188 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/
DBluetoothPbapClient.java45 private BluetoothAdapter mAdapter;
99 mAdapter = BluetoothAdapter.getDefaultAdapter(); in BluetoothPbapClient()
312 BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter(); in isEnabled()
313 if (adapter != null && adapter.getState() == BluetoothAdapter.STATE_ON) { in isEnabled()
324 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()
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()
DBluetoothAdapter.java99 public final class BluetoothAdapter { class
480 private static BluetoothAdapter sAdapter;
501 public static synchronized BluetoothAdapter getDefaultAdapter() { in getDefaultAdapter()
506 sAdapter = new BluetoothAdapter(managerService); in getDefaultAdapter()
517 BluetoothAdapter(IBluetoothManager managerService) { in BluetoothAdapter() method in BluetoothAdapter
638 if (state == BluetoothAdapter.STATE_ON) { in isLeEnabled()
640 } else if (state == BluetoothAdapter.STATE_BLE_ON) { in isLeEnabled()
703 if (state == BluetoothAdapter.STATE_ON) { in disableBLE()
712 } else if (state == BluetoothAdapter.STATE_BLE_ON) { in disableBLE()
800 int state = BluetoothAdapter.STATE_OFF; in getState()
[all …]
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()
DBluetoothManager.java53 private final BluetoothAdapter mAdapter;
65 mAdapter = BluetoothAdapter.getDefaultAdapter(); in BluetoothManager()
73 public BluetoothAdapter getAdapter() { in getAdapter()
DBluetoothDevice.java608 BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter(); in getService()
649 if (!BluetoothAdapter.checkBluetoothAddress(address)) { in BluetoothDevice()
1218 BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter(); in isBluetoothEnabled()
1588 BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter(); in connectGatt()
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()
DBluetoothA2dpSink.java128 private BluetoothAdapter mAdapter;
166 mAdapter = BluetoothAdapter.getDefaultAdapter(); in BluetoothA2dpSink()
501 if (mAdapter.getState() == BluetoothAdapter.STATE_ON) return true; in isEnabled()
508 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/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 …]
/frameworks/opt/bluetooth/src/android/bluetooth/client/map/
DBluetoothMnsService.java19 import android.bluetooth.BluetoothAdapter;
97 BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter(); in run()

1234