/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 | 26 import android.bluetooth.BluetoothAdapter; 289 if (state == BluetoothAdapter.STATE_BLE_TURNING_ON in onFactoryReset() 290 || state == BluetoothAdapter.STATE_TURNING_ON in onFactoryReset() 291 || state == BluetoothAdapter.STATE_TURNING_OFF) { in onFactoryReset() 292 if (!waitForState(Set.of(BluetoothAdapter.STATE_BLE_ON, BluetoothAdapter.STATE_ON))) { in onFactoryReset() 305 if (state == BluetoothAdapter.STATE_BLE_ON) { in onFactoryReset() 311 } else if (state == BluetoothAdapter.STATE_ON) { in onFactoryReset() 336 int st = BluetoothAdapter.STATE_OFF; in onAirplaneModeChanged() 350 "Airplane Mode change - current state: " + BluetoothAdapter.nameForState( in onAirplaneModeChanged() 358 if (st == BluetoothAdapter.STATE_BLE_ON) { in onAirplaneModeChanged() [all …]
|
D | BluetoothAirplaneModeListener.java | 20 import android.bluetooth.BluetoothAdapter; 155 private final BluetoothAdapter mAdapter; 159 mAdapter = BluetoothAdapter.getDefaultAdapter(); in AirplaneModeHelper() 206 final BluetoothAdapter adapter = mAdapter; in isBluetoothOn() 210 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() 263 int state = intent.getIntExtra(BluetoothAdapter.EXTRA_STATE, in onReceive() 264 BluetoothAdapter.ERROR); in onReceive() 323 int state = intent.getIntExtra(BluetoothAdapter.EXTRA_CONNECTION_STATE, in onReceive() 324 BluetoothAdapter.ERROR); in onReceive() 479 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()
|
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/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() 156 when(mMockAdapter.getConnectionState()).thenReturn(BluetoothAdapter.STATE_CONNECTING); in testOnServiceConnected_updatesConnectionState() 166 mBluetoothControllerImpl.onBluetoothStateChanged(BluetoothAdapter.STATE_OFF); in testOnBluetoothStateChange_updatesBluetoothState() 168 assertEquals(BluetoothAdapter.STATE_OFF, mBluetoothControllerImpl.getBluetoothState()); in testOnBluetoothStateChange_updatesBluetoothState() 170 mBluetoothControllerImpl.onBluetoothStateChanged(BluetoothAdapter.STATE_ON); in testOnBluetoothStateChange_updatesBluetoothState() 172 assertEquals(BluetoothAdapter.STATE_ON, mBluetoothControllerImpl.getBluetoothState()); in testOnBluetoothStateChange_updatesBluetoothState() 178 BluetoothAdapter.STATE_CONNECTING, in testOnBluetoothStateChange_updatesConnectionState() 179 BluetoothAdapter.STATE_DISCONNECTED); in testOnBluetoothStateChange_updatesConnectionState() [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/core/java/android/bluetooth/ |
D | BluetoothPbapClient.java | 54 private BluetoothAdapter mAdapter; 71 mAdapter = BluetoothAdapter.getDefaultAdapter(); in BluetoothPbapClient() 238 BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter(); in isEnabled() 239 if (adapter != null && adapter.getState() == BluetoothAdapter.STATE_ON) { in isEnabled() 247 return device != null && BluetoothAdapter.checkBluetoothAddress(device.getAddress()); in isValidDevice() 264 return setConnectionPolicy(device, BluetoothAdapter.priorityToConnectionPolicy(priority)); in setPriority() 318 return BluetoothAdapter.connectionPolicyToPriority(getConnectionPolicy(device)); in getPriority()
|
D | BluetoothSap.java | 93 private BluetoothAdapter mAdapter; 108 mAdapter = BluetoothAdapter.getDefaultAdapter(); in BluetoothSap() 316 return setConnectionPolicy(device, BluetoothAdapter.priorityToConnectionPolicy(priority)); in setPriority() 366 return BluetoothAdapter.connectionPolicyToPriority(getConnectionPolicy(device)); in getPriority() 402 BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter(); in isEnabled() 404 if (adapter != null && adapter.getState() == BluetoothAdapter.STATE_ON) { in isEnabled() 412 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 | BluetoothMapClient.java | 79 private BluetoothAdapter mAdapter; 94 mAdapter = BluetoothAdapter.getDefaultAdapter(); in BluetoothMapClient() 264 return setConnectionPolicy(device, BluetoothAdapter.priorityToConnectionPolicy(priority)); in setPriority() 314 return BluetoothAdapter.connectionPolicyToPriority(getConnectionPolicy(device)); in getPriority() 412 BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter(); in isEnabled() 413 if (adapter != null && adapter.getState() == BluetoothAdapter.STATE_ON) return true; in isEnabled() 419 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 | 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/packages/SystemUI/src/com/android/systemui/statusbar/policy/ |
D | BluetoothControllerImpl.java | 21 import android.bluetooth.BluetoothAdapter; 68 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/services/core/java/com/android/server/media/ |
D | BluetoothRouteProvider.java | 19 import static android.bluetooth.BluetoothAdapter.ACTIVE_DEVICE_AUDIO; 20 import static android.bluetooth.BluetoothAdapter.STATE_CONNECTED; 21 import static android.bluetooth.BluetoothAdapter.STATE_DISCONNECTED; 26 import android.bluetooth.BluetoothAdapter; 74 private final BluetoothAdapter mBluetoothAdapter; 92 BluetoothAdapter btAdapter = BluetoothAdapter.getDefaultAdapter(); in createInstance() 99 private BluetoothRouteProvider(Context context, BluetoothAdapter btAdapter, in BluetoothRouteProvider() 113 addEventReceiver(BluetoothAdapter.ACTION_STATE_CHANGED, new AdapterStateChangedReceiver()); in start() 459 int state = intent.getIntExtra(BluetoothAdapter.EXTRA_STATE, -1); in onReceive() 460 if (state == BluetoothAdapter.STATE_OFF in onReceive() [all …]
|
/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()
|