/frameworks/base/core/tests/bluetoothtests/src/android/bluetooth/ |
D | BluetoothTestUtils.java | 108 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 …]
|
D | BluetoothRebootStressTest.java | 54 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()
|
/frameworks/base/services/core/java/com/android/server/ |
D | BluetoothManagerService.java | 22 import android.bluetooth.BluetoothAdapter; 262 int st = BluetoothAdapter.STATE_OFF; 276 "Airplane Mode change - current state: " + BluetoothAdapter.nameForState( 284 if (st == BluetoothAdapter.STATE_BLE_ON) { 300 } else if (st == BluetoothAdapter.STATE_ON) { 317 if (BluetoothAdapter.ACTION_LOCAL_NAME_CHANGED.equals(action)) { 318 String newName = intent.getStringExtra(BluetoothAdapter.EXTRA_LOCAL_NAME); 325 } else if (BluetoothAdapter.ACTION_BLUETOOTH_ADDRESS_CHANGED.equals(action)) { 326 String newAddress = intent.getStringExtra(BluetoothAdapter.EXTRA_BLUETOOTH_ADDRESS); 377 mState = BluetoothAdapter.STATE_OFF; in BluetoothManagerService() [all …]
|
D | BluetoothService.java | 19 import android.bluetooth.BluetoothAdapter; 37 publishBinderService(BluetoothAdapter.BLUETOOTH_MANAGER_SERVICE, in onBootPhase()
|
/frameworks/base/packages/SettingsLib/src/com/android/settingslib/bluetooth/ |
D | LocalBluetoothAdapter.java | 19 import android.bluetooth.BluetoothAdapter; 43 private final BluetoothAdapter mAdapter; 49 private int mState = BluetoothAdapter.ERROR; 55 private LocalBluetoothAdapter(BluetoothAdapter adapter) { in LocalBluetoothAdapter() 71 BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter(); in getInstance() 206 if (state == BluetoothAdapter.STATE_ON) { in setBluetoothStateInt() 232 ? BluetoothAdapter.STATE_TURNING_ON in setBluetoothEnabled() 233 : BluetoothAdapter.STATE_TURNING_OFF); in setBluetoothEnabled()
|
D | BluetoothEventManager.java | 20 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, new ScanningStateChangedHandler(true)); in BluetoothEventManager() 98 … addHandler(BluetoothAdapter.ACTION_DISCOVERY_FINISHED, new ScanningStateChangedHandler(false)); in BluetoothEventManager() 190 int state = intent.getIntExtra(BluetoothAdapter.EXTRA_STATE, in onReceive() 191 BluetoothAdapter.ERROR); in onReceive() 193 if (state == BluetoothAdapter.STATE_OFF) in onReceive() 253 int state = intent.getIntExtra(BluetoothAdapter.EXTRA_CONNECTION_STATE, in onReceive() 254 BluetoothAdapter.ERROR); in onReceive()
|
D | BluetoothDiscoverableTimeoutReceiver.java | 22 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/tests/src/com/android/systemui/statusbar/policy/ |
D | BluetoothControllerImplTest.java | 24 import android.bluetooth.BluetoothAdapter; 86 when(mMockAdapter.getConnectionState()).thenReturn(BluetoothAdapter.STATE_DISCONNECTED); in testNoConnectionWithDevices() 89 BluetoothAdapter.STATE_DISCONNECTED); in testNoConnectionWithDevices() 169 when(mMockAdapter.getConnectionState()).thenReturn(BluetoothAdapter.STATE_CONNECTING); in testOnServiceConnected_updatesConnectionState() 179 mBluetoothControllerImpl.onBluetoothStateChanged(BluetoothAdapter.STATE_OFF); in testOnBluetoothStateChange_updatesBluetoothState() 181 assertEquals(BluetoothAdapter.STATE_OFF, mBluetoothControllerImpl.getBluetoothState()); in testOnBluetoothStateChange_updatesBluetoothState() 183 mBluetoothControllerImpl.onBluetoothStateChanged(BluetoothAdapter.STATE_ON); in testOnBluetoothStateChange_updatesBluetoothState() 185 assertEquals(BluetoothAdapter.STATE_ON, mBluetoothControllerImpl.getBluetoothState()); in testOnBluetoothStateChange_updatesBluetoothState() 191 BluetoothAdapter.STATE_CONNECTING, in testOnBluetoothStateChange_updatesConnectionState() 192 BluetoothAdapter.STATE_DISCONNECTED); in testOnBluetoothStateChange_updatesConnectionState() [all …]
|
/frameworks/base/packages/SettingsLib/src/com/android/settingslib/deviceinfo/ |
D | AbstractBluetoothAddressPreferenceController.java | 20 import android.bluetooth.BluetoothAdapter; 40 BluetoothAdapter.ACTION_STATE_CHANGED 51 return BluetoothAdapter.getDefaultAdapter() != null; in isAvailable() 74 BluetoothAdapter bluetooth = BluetoothAdapter.getDefaultAdapter(); in updateConnectivity()
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/policy/ |
D | BluetoothControllerImpl.java | 20 import android.bluetooth.BluetoothAdapter; 59 private int mConnectionState = BluetoothAdapter.STATE_DISCONNECTED; 104 case BluetoothAdapter.STATE_CONNECTED: in stateToString() 106 case BluetoothAdapter.STATE_CONNECTING: in stateToString() 108 case BluetoothAdapter.STATE_DISCONNECTED: in stateToString() 110 case BluetoothAdapter.STATE_DISCONNECTING: in stateToString() 158 return mConnectionState == BluetoothAdapter.STATE_CONNECTED; in isBluetoothConnected() 163 return mConnectionState == BluetoothAdapter.STATE_CONNECTING; in isBluetoothConnecting() 221 if (mConnectedDevices.isEmpty() && state == BluetoothAdapter.STATE_CONNECTED) { in updateConnected() 224 state = BluetoothAdapter.STATE_DISCONNECTED; in updateConnected() [all …]
|
/frameworks/base/core/tests/hosttests/test-apps/ExternalSharedPermsBT/src/com/android/framework/externalsharedpermsbttestapp/ |
D | ExternalSharedPermsBTTest.java | 18 import android.bluetooth.BluetoothAdapter; 32 BluetoothAdapter mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter(); in testRunBluetooth()
|
/frameworks/base/cmds/svc/src/com/android/commands/svc/ |
D | BluetoothCommand.java | 19 import android.bluetooth.BluetoothAdapter; 43 BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter(); in run()
|
/frameworks/base/packages/SettingsLib/tests/robotests/src/com/android/settingslib/deviceinfo/ |
D | BluetoothAddressPreferenceControllerTest.java | 23 import android.bluetooth.BluetoothAdapter; 58 @Implements(BluetoothAdapter.class) 61 public static BluetoothAdapter getDefaultAdapter() { in getDefaultAdapter() 94 .asList().contains(BluetoothAdapter.ACTION_STATE_CHANGED); in testHasBluetoothStateChangedFilter()
|
/frameworks/base/core/tests/hosttests/test-apps/ExternalSharedPermsDiffKey/src/com/android/framework/externalsharedpermsdiffkeytestapp/ |
D | ExternalSharedPermsDiffKeyTest.java | 18 import android.bluetooth.BluetoothAdapter; 46 BluetoothAdapter mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter(); in testRunBluetoothAndFineLocation()
|
/frameworks/base/core/tests/hosttests/test-apps/ExternalSharedPerms/src/com/android/framework/externalsharedpermstestapp/ |
D | ExternalSharedPermsTest.java | 18 import android.bluetooth.BluetoothAdapter; 48 BluetoothAdapter mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter(); in testRunLocationAndBluetooth()
|
/frameworks/base/core/java/android/bluetooth/ |
D | BluetoothPbapClient.java | 48 private BluetoothAdapter mAdapter; 102 mAdapter = BluetoothAdapter.getDefaultAdapter(); in BluetoothPbapClient() 321 BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter(); in isEnabled() 322 if (adapter != null && adapter.getState() == BluetoothAdapter.STATE_ON) { in isEnabled() 330 return device != null && BluetoothAdapter.checkBluetoothAddress(device.getAddress()); in isValidDevice()
|
D | BluetoothAdapter.java | 104 public final class BluetoothAdapter { class 577 private static BluetoothAdapter sAdapter; 600 public static synchronized BluetoothAdapter getDefaultAdapter() { in getDefaultAdapter() 605 sAdapter = new BluetoothAdapter(managerService); in getDefaultAdapter() 616 BluetoothAdapter(IBluetoothManager managerService) { in BluetoothAdapter() method in BluetoothAdapter 767 Log.d(TAG, "isLeEnabled(): " + BluetoothAdapter.nameForState(state)); in isLeEnabled() 769 return (state == BluetoothAdapter.STATE_ON || state == BluetoothAdapter.STATE_BLE_ON); in isLeEnabled() 804 if (state == BluetoothAdapter.STATE_ON || state == BluetoothAdapter.STATE_BLE_ON) { in disableBLE() 893 int state = BluetoothAdapter.STATE_OFF; in getState() 907 if (state == BluetoothAdapter.STATE_BLE_ON || state == BluetoothAdapter.STATE_BLE_TURNING_ON in getState() [all …]
|
D | BluetoothMap.java | 49 private BluetoothAdapter mAdapter; 95 mAdapter = BluetoothAdapter.getDefaultAdapter(); in BluetoothMap() 410 BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter(); in isEnabled() 411 if (adapter != null && adapter.getState() == BluetoothAdapter.STATE_ON) return true; in isEnabled() 416 return device != null && BluetoothAdapter.checkBluetoothAddress(device.getAddress()); in isValidDevice()
|
D | BluetoothSap.java | 74 private BluetoothAdapter mAdapter; 133 mAdapter = BluetoothAdapter.getDefaultAdapter(); in BluetoothSap() 435 BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter(); in isEnabled() 437 if (adapter != null && adapter.getState() == BluetoothAdapter.STATE_ON) { in isEnabled() 445 return device != null && BluetoothAdapter.checkBluetoothAddress(device.getAddress()); in isValidDevice()
|
D | BluetoothMapClient.java | 65 private BluetoothAdapter mAdapter; 111 mAdapter = BluetoothAdapter.getDefaultAdapter(); in BluetoothMapClient() 416 BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter(); in isEnabled() 417 if (adapter != null && adapter.getState() == BluetoothAdapter.STATE_ON) return true; in isEnabled() 423 return device != null && BluetoothAdapter.checkBluetoothAddress(device.getAddress()); in isValidDevice()
|
D | BluetoothManager.java | 58 private final BluetoothAdapter mAdapter; 70 mAdapter = BluetoothAdapter.getDefaultAdapter(); in BluetoothManager() 78 public BluetoothAdapter getAdapter() { in getAdapter()
|
D | BluetoothHealth.java | 468 BluetoothAdapter mAdapter; 476 mAdapter = BluetoothAdapter.getDefaultAdapter(); in BluetoothHealth() 545 BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter(); in isEnabled() 547 if (adapter != null && adapter.getState() == BluetoothAdapter.STATE_ON) return true; in isEnabled() 553 return device != null && BluetoothAdapter.checkBluetoothAddress(device.getAddress()); in isValidDevice()
|
D | BluetoothAvrcpController.java | 85 private BluetoothAdapter mAdapter; 123 mAdapter = BluetoothAdapter.getDefaultAdapter(); in BluetoothAvrcpController() 312 return mAdapter.getState() == BluetoothAdapter.STATE_ON; in isEnabled() 316 return device != null && BluetoothAdapter.checkBluetoothAddress(device.getAddress()); in isValidDevice()
|
/frameworks/base/core/tests/bluetoothtests/src/android/bluetooth/le/ |
D | ScanResultTest.java | 19 import android.bluetooth.BluetoothAdapter; 39 BluetoothDevice device = BluetoothAdapter.getDefaultAdapter().getRemoteDevice( in testScanResultParceling()
|
/frameworks/base/core/java/android/bluetooth/le/ |
D | PeriodicAdvertisingManager.java | 19 import android.bluetooth.BluetoothAdapter; 56 private BluetoothAdapter mBluetoothAdapter; 70 mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter(); in PeriodicAdvertisingManager()
|