/frameworks/base/core/tests/bluetoothtests/src/android/bluetooth/ |
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()
|
D | BluetoothTestUtils.java | 114 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/ |
D | BluetoothManagerService.java | 23 import android.bluetooth.BluetoothAdapter; 300 if (state == BluetoothAdapter.STATE_BLE_TURNING_ON in onFactoryReset() 301 || state == BluetoothAdapter.STATE_TURNING_ON in onFactoryReset() 302 || state == BluetoothAdapter.STATE_TURNING_OFF) { in onFactoryReset() 303 if (!waitForState(Set.of(BluetoothAdapter.STATE_BLE_ON, BluetoothAdapter.STATE_ON))) { in onFactoryReset() 316 if (state == BluetoothAdapter.STATE_BLE_ON) { in onFactoryReset() 322 } else if (state == BluetoothAdapter.STATE_ON) { in onFactoryReset() 347 int st = BluetoothAdapter.STATE_OFF; in onAirplaneModeChanged() 361 "Airplane Mode change - current state: " + BluetoothAdapter.nameForState( in onAirplaneModeChanged() 369 if (st == BluetoothAdapter.STATE_BLE_ON) { in onAirplaneModeChanged() [all …]
|
D | BluetoothAirplaneModeListener.java | 20 import android.bluetooth.BluetoothAdapter; 153 private final BluetoothAdapter mAdapter; 157 mAdapter = BluetoothAdapter.getDefaultAdapter(); in AirplaneModeHelper() 204 final BluetoothAdapter adapter = mAdapter; in isBluetoothOn() 208 return adapter.getLeState() == BluetoothAdapter.STATE_ON; in isBluetoothOn()
|
/frameworks/base/packages/SettingsLib/tests/robotests/testutils/com/android/settingslib/testutils/shadow/ |
D | ShadowBluetoothAdapter.java | 19 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; 33 @Implements(value = BluetoothAdapter.class) 70 protected boolean removeActiveDevice(@BluetoothAdapter.ActiveDeviceUse int profiles) { in removeActiveDevice() 80 @BluetoothAdapter.ActiveDeviceUse int profiles) { in setActiveDevice()
|
/frameworks/base/packages/SettingsLib/src/com/android/settingslib/bluetooth/ |
D | LocalBluetoothAdapter.java | 19 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()
|
D | BluetoothEventManager.java | 20 import android.bluetooth.BluetoothAdapter; 90 addHandler(BluetoothAdapter.ACTION_STATE_CHANGED, new AdapterStateChangedHandler()); in BluetoothEventManager() 92 addHandler(BluetoothAdapter.ACTION_CONNECTION_STATE_CHANGED, in BluetoothEventManager() 96 addHandler(BluetoothAdapter.ACTION_DISCOVERY_STARTED, in BluetoothEventManager() 98 addHandler(BluetoothAdapter.ACTION_DISCOVERY_FINISHED, in BluetoothEventManager() 257 int state = intent.getIntExtra(BluetoothAdapter.EXTRA_STATE, in onReceive() 258 BluetoothAdapter.ERROR); in onReceive() 317 int state = intent.getIntExtra(BluetoothAdapter.EXTRA_CONNECTION_STATE, in onReceive() 318 BluetoothAdapter.ERROR); in onReceive() 473 state = BluetoothAdapter.STATE_CONNECTED; in onReceive() [all …]
|
D | HeadsetProfile.java | 19 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()
|
D | HearingAidProfile.java | 19 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()
|
/frameworks/base/packages/SettingsLib/src/com/android/settingslib/deviceinfo/ |
D | AbstractBluetoothAddressPreferenceController.java | 20 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/ |
D | BluetoothControllerImplTest.java | 27 import android.bluetooth.BluetoothAdapter; 91 when(mMockAdapter.getConnectionState()).thenReturn(BluetoothAdapter.STATE_DISCONNECTED); in testNoConnectionWithDevices() 94 BluetoothAdapter.STATE_DISCONNECTED); in testNoConnectionWithDevices() 174 when(mMockAdapter.getConnectionState()).thenReturn(BluetoothAdapter.STATE_CONNECTING); in testOnServiceConnected_updatesConnectionState() 184 mBluetoothControllerImpl.onBluetoothStateChanged(BluetoothAdapter.STATE_OFF); in testOnBluetoothStateChange_updatesBluetoothState() 186 assertEquals(BluetoothAdapter.STATE_OFF, mBluetoothControllerImpl.getBluetoothState()); in testOnBluetoothStateChange_updatesBluetoothState() 188 mBluetoothControllerImpl.onBluetoothStateChanged(BluetoothAdapter.STATE_ON); in testOnBluetoothStateChange_updatesBluetoothState() 190 assertEquals(BluetoothAdapter.STATE_ON, mBluetoothControllerImpl.getBluetoothState()); in testOnBluetoothStateChange_updatesBluetoothState() 196 BluetoothAdapter.STATE_CONNECTING, in testOnBluetoothStateChange_updatesConnectionState() 197 BluetoothAdapter.STATE_DISCONNECTED); in testOnBluetoothStateChange_updatesConnectionState() [all …]
|
/frameworks/base/core/java/android/bluetooth/ |
D | BluetoothPbapClient.java | 53 private BluetoothAdapter mAdapter; 70 mAdapter = BluetoothAdapter.getDefaultAdapter(); in BluetoothPbapClient() 237 BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter(); in isEnabled() 238 if (adapter != null && adapter.getState() == BluetoothAdapter.STATE_ON) { in isEnabled() 246 return device != null && BluetoothAdapter.checkBluetoothAddress(device.getAddress()); in isValidDevice() 263 return setConnectionPolicy(device, BluetoothAdapter.priorityToConnectionPolicy(priority)); in setPriority() 316 return BluetoothAdapter.connectionPolicyToPriority(getConnectionPolicy(device)); in getPriority()
|
D | BluetoothSap.java | 92 private BluetoothAdapter mAdapter; 107 mAdapter = BluetoothAdapter.getDefaultAdapter(); in BluetoothSap() 315 return setConnectionPolicy(device, BluetoothAdapter.priorityToConnectionPolicy(priority)); in setPriority() 364 return BluetoothAdapter.connectionPolicyToPriority(getConnectionPolicy(device)); in getPriority() 399 BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter(); in isEnabled() 401 if (adapter != null && adapter.getState() == BluetoothAdapter.STATE_ON) { in isEnabled() 409 return device != null && BluetoothAdapter.checkBluetoothAddress(device.getAddress()); in isValidDevice()
|
D | BluetoothMap.java | 74 private BluetoothAdapter mAdapter; 89 mAdapter = BluetoothAdapter.getDefaultAdapter(); in BluetoothMap() 333 return setConnectionPolicy(device, BluetoothAdapter.priorityToConnectionPolicy(priority)); in setPriority() 383 return BluetoothAdapter.connectionPolicyToPriority(getConnectionPolicy(device)); in getPriority() 419 BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter(); in isEnabled() 420 if (adapter != null && adapter.getState() == BluetoothAdapter.STATE_ON) return true; in isEnabled() 425 return device != null && BluetoothAdapter.checkBluetoothAddress(device.getAddress()); in isValidDevice()
|
D | BluetoothManager.java | 59 private final BluetoothAdapter mAdapter; 72 mAdapter = BluetoothAdapter.getDefaultAdapter(); in BluetoothManager() 74 IBinder b = ServiceManager.getService(BluetoothAdapter.BLUETOOTH_MANAGER_SERVICE); in BluetoothManager() 76 mAdapter = new BluetoothAdapter(IBluetoothManager.Stub.asInterface(b)); in BluetoothManager() 94 public BluetoothAdapter getAdapter() { in getAdapter()
|
D | BluetoothMapClient.java | 115 private BluetoothAdapter mAdapter; 130 mAdapter = BluetoothAdapter.getDefaultAdapter(); in BluetoothMapClient() 300 return setConnectionPolicy(device, BluetoothAdapter.priorityToConnectionPolicy(priority)); in setPriority() 349 return BluetoothAdapter.connectionPolicyToPriority(getConnectionPolicy(device)); in getPriority() 478 BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter(); in isEnabled() 479 if (adapter != null && adapter.getState() == BluetoothAdapter.STATE_ON) return true; in isEnabled() 485 return device != null && BluetoothAdapter.checkBluetoothAddress(device.getAddress()); in isValidDevice()
|
D | BluetoothA2dpSink.java | 73 private BluetoothAdapter mAdapter; 88 mAdapter = BluetoothAdapter.getDefaultAdapter(); in BluetoothA2dpSink() 283 return setConnectionPolicy(device, BluetoothAdapter.priorityToConnectionPolicy(priority)); in setPriority() 333 return BluetoothAdapter.connectionPolicyToPriority(getConnectionPolicy(device)); in getPriority() 415 return mAdapter.getState() == BluetoothAdapter.STATE_ON; in isEnabled() 419 return device != null && BluetoothAdapter.checkBluetoothAddress(device.getAddress()); in isValidDevice()
|
/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/packages/CarSystemUI/src/com/android/systemui/statusbar/car/ |
D | CarTrustAgentUnlockDialogHelper.java | 20 import android.bluetooth.BluetoothAdapter; 95 BluetoothAdapter bluetoothAdapter = BluetoothAdapter.getDefaultAdapter(); in CarTrustAgentUnlockDialogHelper() 97 && bluetoothAdapter.getLeState() == BluetoothAdapter.STATE_BLE_ON) { in CarTrustAgentUnlockDialogHelper() 109 filter.addAction(BluetoothAdapter.ACTION_BLE_STATE_CHANGED); in getIntentFilter() 183 case BluetoothAdapter.ACTION_BLE_STATE_CHANGED: in onReceive() 185 int state = intent.getIntExtra(BluetoothAdapter.EXTRA_STATE, -1); in onReceive() 186 if (state == BluetoothAdapter.STATE_BLE_ON) { in onReceive()
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/policy/ |
D | BluetoothControllerImpl.java | 23 import android.bluetooth.BluetoothAdapter; 69 private int mConnectionState = BluetoothAdapter.STATE_DISCONNECTED; 121 case BluetoothAdapter.STATE_CONNECTED: in stateToString() 123 case BluetoothAdapter.STATE_CONNECTING: in stateToString() 125 case BluetoothAdapter.STATE_DISCONNECTED: in stateToString() 127 case BluetoothAdapter.STATE_DISCONNECTING: in stateToString() 175 return mConnectionState == BluetoothAdapter.STATE_CONNECTED; in isBluetoothConnected() 180 return mConnectionState == BluetoothAdapter.STATE_CONNECTING; in isBluetoothConnecting() 248 if (mConnectedDevices.isEmpty() && state == BluetoothAdapter.STATE_CONNECTED) { in updateConnected() 251 state = BluetoothAdapter.STATE_DISCONNECTED; in updateConnected() [all …]
|
/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; 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/ |
D | ExternalSharedPermsTest.java | 18 import android.bluetooth.BluetoothAdapter; 48 BluetoothAdapter mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter(); in testRunLocationAndBluetooth()
|
/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/packages/SettingsLib/tests/robotests/src/com/android/settingslib/bluetooth/ |
D | BluetoothEventManagerTest.java | 25 import android.bluetooth.BluetoothAdapter; 144 BluetoothAdapter.STATE_DISCONNECTED); in dispatchAclConnectionStateChanged_aclDisconnected_shouldDispatchCallback() 156 BluetoothAdapter.STATE_CONNECTED); in dispatchAclConnectionStateChanged_aclConnected_shouldDispatchCallback() 169 BluetoothAdapter.STATE_DISCONNECTED); in dispatchAclConnectionStateChanged_aclDisconnected_shouldNotCallbackSubDevice() 182 BluetoothAdapter.STATE_CONNECTED); in dispatchAclConnectionStateChanged_aclConnected_shouldNotCallbackSubDevice() 195 BluetoothAdapter.STATE_CONNECTED); in dispatchAclConnectionStateChanged_findDeviceReturnNull_shouldNotDispatchCallback()
|