/packages/services/Car/tests/carservice_unit_test/src/com/android/car/ |
D | BluetoothProfileDeviceManagerTest.java | 123 private BluetoothAdapter mBluetoothAdapter; field in BluetoothProfileDeviceManagerTest 171 mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter(); in setUp() 172 Assert.assertTrue(mBluetoothAdapter != null); in setUp() 191 mBluetoothAdapter = null; in tearDown() 222 BluetoothDevice device = mBluetoothAdapter.getRemoteDevice(address); in makeDeviceList() 482 BluetoothDevice device = mBluetoothAdapter.getRemoteDevice(SINGLE_DEVICE_LIST.get(0)); in testAddDeviceAlreadyInList_priorityListUnchanged() 504 mProfileDeviceManager.removeDevice(mBluetoothAdapter.getRemoteDevice("DE:AD:BE:EF:00:00")); in testRemoveDeviceFromEmptyList_priorityListUnchanged() 521 BluetoothDevice device = mBluetoothAdapter.getRemoteDevice(SINGLE_DEVICE_LIST.get(0)); in testRemoveDeviceFront_deviceNoLongerInPriorityList() 542 BluetoothDevice device = mBluetoothAdapter.getRemoteDevice(SMALL_DEVICE_LIST.get(1)); in testRemoveDeviceMiddle_deviceNoLongerInPriorityList() 562 BluetoothDevice device = mBluetoothAdapter.getRemoteDevice(SMALL_DEVICE_LIST.get(2)); in testRemoveDeviceEnd_deviceNoLongerInPriorityList() [all …]
|
D | BluetoothAdapterHelper.java | 44 private BluetoothAdapter mBluetoothAdapter; field in BluetoothAdapterHelper 94 mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter(); in BluetoothAdapterHelper() 123 return mBluetoothAdapter.getState(); in getAdapterState() 161 while (desiredState != mBluetoothAdapter.getState()) { in waitForAdapterState() 175 assertTrue(mBluetoothAdapter.getState() == desiredState); in waitForAdapterState() 207 mBluetoothAdapter.enable(); in forceAdapterState() 209 mBluetoothAdapter.disable(persistAcrossReboot); in forceAdapterState()
|
/packages/services/Telecomm/src/com/android/server/telecom/ |
D | BluetoothAdapterProxy.java | 28 private BluetoothAdapter mBluetoothAdapter; field in BluetoothAdapterProxy 31 mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter(); in BluetoothAdapterProxy() 36 if (mBluetoothAdapter == null) { in getProfileProxy() 39 return mBluetoothAdapter.getProfileProxy(context, listener, profile); in getProfileProxy() 43 if (mBluetoothAdapter == null) { in setActiveDevice() 47 return mBluetoothAdapter.setActiveDevice(device, profiles); in setActiveDevice() 49 return mBluetoothAdapter.removeActiveDevice(profiles); in setActiveDevice()
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/bluetooth/ |
D | AlwaysDiscoverableTest.java | 42 private BluetoothAdapter mBluetoothAdapter; field in AlwaysDiscoverableTest 48 mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter(); in setUp() 73 mBluetoothAdapter.setScanMode(BluetoothAdapter.SCAN_MODE_CONNECTABLE); in stopWithoutStart() 78 mBluetoothAdapter.setScanMode(BluetoothAdapter.SCAN_MODE_NONE); in startSetsModeAndRegistersReceiver() 80 assertThat(mBluetoothAdapter.getScanMode()) in startSetsModeAndRegistersReceiver() 95 assertThat(mBluetoothAdapter.getScanMode()) in resetsToDiscoverableModeWhenScanModeChanges() 101 assertThat(mBluetoothAdapter.getScanMode()) in resetsToDiscoverableModeWhenScanModeChanges() 106 mBluetoothAdapter.setScanMode(newMode); in sendScanModeChangedIntent()
|
/packages/apps/Settings/src/com/android/settings/bluetooth/ |
D | AlwaysDiscoverable.java | 36 private BluetoothAdapter mBluetoothAdapter; field in AlwaysDiscoverable 44 mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter(); in AlwaysDiscoverable() 57 if (mBluetoothAdapter.getScanMode() in start() 59 mBluetoothAdapter.setScanMode(BluetoothAdapter.SCAN_MODE_CONNECTABLE_DISCOVERABLE); in start() 69 mBluetoothAdapter.setScanMode(BluetoothAdapter.SCAN_MODE_CONNECTABLE); in stop() 78 if (mBluetoothAdapter.getScanMode() in onReceive() 80 mBluetoothAdapter.setScanMode(BluetoothAdapter.SCAN_MODE_CONNECTABLE_DISCOVERABLE); in onReceive()
|
D | BluetoothEnabler.java | 46 private final BluetoothAdapter mBluetoothAdapter; field in BluetoothEnabler 81 mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter(); in BluetoothEnabler() 82 if (mBluetoothAdapter == null) { in BluetoothEnabler() 105 if (mBluetoothAdapter == null) { in resume() 112 handleStateChanged(mBluetoothAdapter.getState()); in resume() 121 if (mBluetoothAdapter == null) { in pause() 186 if (mBluetoothAdapter != null) { in onSwitchToggled() 249 return isEnabled ? mBluetoothAdapter.enable() : mBluetoothAdapter.disable(); in setBluetoothEnabled()
|
D | BluetoothDiscoverableEnabler.java | 66 private final BluetoothAdapter mBluetoothAdapter; field in BluetoothDiscoverableEnabler 96 mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter(); in BluetoothDiscoverableEnabler() 103 if (mBluetoothAdapter == null) { in resume() 114 handleModeChanged(mBluetoothAdapter.getScanMode()); in resume() 118 if (mBluetoothAdapter == null) { in pause() 140 mBluetoothAdapter in setEnabled() 153 mBluetoothAdapter.setScanMode(BluetoothAdapter.SCAN_MODE_CONNECTABLE); in setEnabled() 252 handleModeChanged(mBluetoothAdapter.getScanMode()); in setNumberOfPairedDevices() 275 int mode = mBluetoothAdapter.getScanMode(); in updateCountdownSummary()
|
D | BluetoothSummaryUpdater.java | 41 private final BluetoothAdapter mBluetoothAdapter; field in BluetoothSummaryUpdater 48 mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter(); in BluetoothSummaryUpdater() 63 if (mBluetoothAdapter == null) { in register() 76 if (mBluetoothAdapter == null || !mBluetoothAdapter.isEnabled()) { in getSummary() 79 switch (mBluetoothAdapter.getConnectionState()) { in getSummary() 95 final Set<BluetoothDevice> devices = mBluetoothAdapter.getBondedDevices(); in getConnectedDeviceSummary()
|
D | BluetoothDeviceNamePreferenceController.java | 47 protected BluetoothAdapter mBluetoothAdapter; field in BluetoothDeviceNamePreferenceController 55 mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter(); in BluetoothDeviceNamePreferenceController() 56 if (mBluetoothAdapter == null) { in BluetoothDeviceNamePreferenceController() 83 return mBluetoothAdapter != null ? AVAILABLE : UNSUPPORTED_ON_DEVICE; in getAvailabilityStatus() 130 return mBluetoothAdapter.getName(); in getDeviceName() 144 if (mPreference != null && mBluetoothAdapter != null 145 && mBluetoothAdapter.isEnabled()) {
|
D | DeviceListPreferenceFragment.java | 67 BluetoothAdapter mBluetoothAdapter; field in DeviceListPreferenceFragment 100 mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter(); in onCreate() 175 if (mBluetoothAdapter.getState() != BluetoothAdapter.STATE_ON) return; in onDeviceAdded() 215 bidiFormatter.unicodeWrap(mBluetoothAdapter.getAddress()))); in updateFooterPreference() 281 if (!mBluetoothAdapter.isDiscovering()) { in startScanning() 282 mBluetoothAdapter.startDiscovery(); in startScanning() 287 if (mBluetoothAdapter.isDiscovering()) { in stopScanning() 288 mBluetoothAdapter.cancelDiscovery(); in stopScanning()
|
D | LocalDeviceNameDialogFragment.java | 32 private BluetoothAdapter mBluetoothAdapter; field in LocalDeviceNameDialogFragment 50 mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter(); in onCreate() 80 if (mBluetoothAdapter != null && mBluetoothAdapter.isEnabled()) { in getDeviceName() 81 return mBluetoothAdapter.getName(); in getDeviceName() 88 mBluetoothAdapter.setName(deviceName); in setDeviceName()
|
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/bluetooth/ |
D | AlwaysDiscoverable.java | 36 private BluetoothAdapter mBluetoothAdapter; field in AlwaysDiscoverable 44 mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter(); in AlwaysDiscoverable() 57 if (mBluetoothAdapter.getScanMode() in start() 59 mBluetoothAdapter.setScanMode(BluetoothAdapter.SCAN_MODE_CONNECTABLE_DISCOVERABLE); in start() 69 mBluetoothAdapter.setScanMode(BluetoothAdapter.SCAN_MODE_CONNECTABLE); in stop() 78 if (mBluetoothAdapter.getScanMode() in onReceive() 80 mBluetoothAdapter.setScanMode(BluetoothAdapter.SCAN_MODE_CONNECTABLE_DISCOVERABLE); in onReceive()
|
D | BluetoothEnabler.java | 46 private final BluetoothAdapter mBluetoothAdapter; field in BluetoothEnabler 81 mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter(); in BluetoothEnabler() 82 if (mBluetoothAdapter == null) { in BluetoothEnabler() 105 if (mBluetoothAdapter == null) { in resume() 112 handleStateChanged(mBluetoothAdapter.getState()); in resume() 121 if (mBluetoothAdapter == null) { in pause() 186 if (mBluetoothAdapter != null) { in onSwitchToggled() 249 return isEnabled ? mBluetoothAdapter.enable() : mBluetoothAdapter.disable(); in setBluetoothEnabled()
|
D | BluetoothDiscoverableEnabler.java | 66 private final BluetoothAdapter mBluetoothAdapter; field in BluetoothDiscoverableEnabler 96 mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter(); in BluetoothDiscoverableEnabler() 103 if (mBluetoothAdapter == null) { in resume() 114 handleModeChanged(mBluetoothAdapter.getScanMode()); in resume() 118 if (mBluetoothAdapter == null) { in pause() 140 mBluetoothAdapter in setEnabled() 153 mBluetoothAdapter.setScanMode(BluetoothAdapter.SCAN_MODE_CONNECTABLE); in setEnabled() 252 handleModeChanged(mBluetoothAdapter.getScanMode()); in setNumberOfPairedDevices() 275 int mode = mBluetoothAdapter.getScanMode(); in updateCountdownSummary()
|
D | BluetoothSummaryUpdater.java | 41 private final BluetoothAdapter mBluetoothAdapter; field in BluetoothSummaryUpdater 48 mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter(); in BluetoothSummaryUpdater() 63 if (mBluetoothAdapter == null) { in register() 76 if (mBluetoothAdapter == null || !mBluetoothAdapter.isEnabled()) { in getSummary() 79 switch (mBluetoothAdapter.getConnectionState()) { in getSummary() 95 final Set<BluetoothDevice> devices = mBluetoothAdapter.getBondedDevices(); in getConnectedDeviceSummary()
|
D | BluetoothDeviceNamePreferenceController.java | 47 protected BluetoothAdapter mBluetoothAdapter; field in BluetoothDeviceNamePreferenceController 55 mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter(); in BluetoothDeviceNamePreferenceController() 56 if (mBluetoothAdapter == null) { in BluetoothDeviceNamePreferenceController() 83 return mBluetoothAdapter != null ? AVAILABLE : UNSUPPORTED_ON_DEVICE; in getAvailabilityStatus() 130 return mBluetoothAdapter.getName(); in getDeviceName() 144 if (mPreference != null && mBluetoothAdapter != null 145 && mBluetoothAdapter.isEnabled()) {
|
D | DeviceListPreferenceFragment.java | 67 BluetoothAdapter mBluetoothAdapter; field in DeviceListPreferenceFragment 100 mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter(); in onCreate() 175 if (mBluetoothAdapter.getState() != BluetoothAdapter.STATE_ON) return; in onDeviceAdded() 215 bidiFormatter.unicodeWrap(mBluetoothAdapter.getAddress()))); in updateFooterPreference() 281 if (!mBluetoothAdapter.isDiscovering()) { in startScanning() 282 mBluetoothAdapter.startDiscovery(); in startScanning() 287 if (mBluetoothAdapter.isDiscovering()) { in stopScanning() 288 mBluetoothAdapter.cancelDiscovery(); in stopScanning()
|
D | LocalDeviceNameDialogFragment.java | 32 private BluetoothAdapter mBluetoothAdapter; field in LocalDeviceNameDialogFragment 54 mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter(); in onCreate() 84 if (mBluetoothAdapter != null && mBluetoothAdapter.isEnabled()) { in getDeviceName() 85 return mBluetoothAdapter.getName(); in getDeviceName() 92 mBluetoothAdapter.setName(deviceName); in setDeviceName()
|
/packages/apps/Settings/src/com/android/settings/network/ |
D | TetherPreferenceController.java | 62 private final BluetoothAdapter mBluetoothAdapter; field in TetherPreferenceController 86 mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter(); in TetherPreferenceController() 95 mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter(); in TetherPreferenceController() 128 if (mBluetoothAdapter != null && in onCreate() 129 mBluetoothAdapter.getState() == BluetoothAdapter.STATE_ON) { in onCreate() 130 mBluetoothAdapter.getProfileProxy(mContext, mBtProfileServiceListener, in onCreate() 162 if (profile != null && mBluetoothAdapter != null) { in onDestroy() 163 mBluetoothAdapter.closeProfileProxy(BluetoothProfile.PAN, profile); in onDestroy() 209 && mBluetoothAdapter != null in updateSummary() 210 && mBluetoothAdapter.getState() == BluetoothAdapter.STATE_ON) { in updateSummary()
|
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/network/ |
D | TetherPreferenceController.java | 62 private final BluetoothAdapter mBluetoothAdapter; field in TetherPreferenceController 86 mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter(); in TetherPreferenceController() 95 mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter(); in TetherPreferenceController() 128 if (mBluetoothAdapter != null && in onCreate() 129 mBluetoothAdapter.getState() == BluetoothAdapter.STATE_ON) { in onCreate() 130 mBluetoothAdapter.getProfileProxy(mContext, mBtProfileServiceListener, in onCreate() 162 if (profile != null && mBluetoothAdapter != null) { in onDestroy() 163 mBluetoothAdapter.closeProfileProxy(BluetoothProfile.PAN, profile); in onDestroy() 209 && mBluetoothAdapter != null in updateSummary() 210 && mBluetoothAdapter.getState() == BluetoothAdapter.STATE_ON) { in updateSummary()
|
/packages/services/Car/service/src/com/android/car/ |
D | CarBluetoothUserService.java | 42 private final BluetoothAdapter mBluetoothAdapter; field in CarBluetoothUserService 84 mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter(); in CarBluetoothUserService() 85 Preconditions.checkNotNull(mBluetoothAdapter, "Bluetooth adapter cannot be null"); in CarBluetoothUserService() 108 mBluetoothAdapter.getProfileProxy(mService.getApplicationContext(), in setupBluetoothConnectionProxies() 121 mBluetoothAdapter.closeProfileProxy(BluetoothProfile.A2DP_SINK, mBluetoothA2dpSink); in closeBluetoothConnectionProxies() 125 mBluetoothAdapter.closeProfileProxy(BluetoothProfile.HEADSET_CLIENT, in closeBluetoothConnectionProxies() 130 mBluetoothAdapter.closeProfileProxy(BluetoothProfile.PBAP_CLIENT, mBluetoothPbapClient); in closeBluetoothConnectionProxies() 134 mBluetoothAdapter.closeProfileProxy(BluetoothProfile.MAP_CLIENT, mBluetoothMapClient); in closeBluetoothConnectionProxies() 138 mBluetoothAdapter.closeProfileProxy(BluetoothProfile.PAN, mBluetoothPan); in closeBluetoothConnectionProxies() 223 if (!mBluetoothAdapter.isEnabled()) return false; in isBluetoothConnectionProxyAvailable() [all …]
|
D | BluetoothDeviceConnectionPolicy.java | 46 private final BluetoothAdapter mBluetoothAdapter; field in BluetoothDeviceConnectionPolicy 68 if (mBluetoothAdapter.getState() == BluetoothAdapter.STATE_ON) { 157 mBluetoothAdapter = Objects.requireNonNull(BluetoothAdapter.getDefaultAdapter()); in BluetoothDeviceConnectionPolicy() 183 if (mBluetoothAdapter.getState() == BluetoothAdapter.STATE_ON) { in init() 227 if (mBluetoothAdapter == null) { in enableBluetooth() 231 mBluetoothAdapter.enable(); in enableBluetooth() 242 if (mBluetoothAdapter == null) { in disableBluetooth() 246 mBluetoothAdapter.disable(false); in disableBluetooth()
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/network/ |
D | TetherPreferenceControllerTest.java | 61 private BluetoothAdapter mBluetoothAdapter; field in TetherPreferenceControllerTest 73 ReflectionHelpers.setField(mController, "mBluetoothAdapter", mBluetoothAdapter); in setUp() 79 when(mBluetoothAdapter.getState()).thenReturn(BluetoothAdapter.STATE_ON); in lifeCycle_onCreate_shouldInitBluetoothPan() 82 verify(mBluetoothAdapter).getState(); in lifeCycle_onCreate_shouldInitBluetoothPan() 83 verify(mBluetoothAdapter).getProfileProxy(mContext, mController.mBtProfileServiceListener, in lifeCycle_onCreate_shouldInitBluetoothPan() 89 when(mBluetoothAdapter.getState()).thenReturn(BluetoothAdapter.STATE_OFF); in lifeCycle_onCreate_shouldNotInitBluetoothPanWhenBluetoothOff() 92 verify(mBluetoothAdapter).getState(); in lifeCycle_onCreate_shouldNotInitBluetoothPanWhenBluetoothOff() 93 verifyNoMoreInteractions(mBluetoothAdapter); in lifeCycle_onCreate_shouldNotInitBluetoothPanWhenBluetoothOff() 105 verify(mBluetoothAdapter).closeProfileProxy(BluetoothProfile.PAN, pan); in goThroughLifecycle_shouldDestoryBluetoothProfile()
|
/packages/apps/Car/Dialer/src/com/android/car/dialer/livedata/ |
D | HfpDeviceListLiveData.java | 36 private final BluetoothAdapter mBluetoothAdapter; field in HfpDeviceListLiveData 52 mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter(); in HfpDeviceListLiveData() 53 if (mBluetoothAdapter != null) { in HfpDeviceListLiveData() 54 mBluetoothAdapter.getProfileProxy(mContext, new BluetoothProfile.ServiceListener() { in HfpDeviceListLiveData() 75 if (mBluetoothAdapter != null) { in onActive() 83 if (mBluetoothAdapter != null) { in onInactive()
|
/packages/apps/Car/Settings/src/com/android/car/settings/bluetooth/ |
D | BluetoothScanningDevicesGroupPreferenceController.java | 48 private final BluetoothAdapter mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter(); field in BluetoothScanningDevicesGroupPreferenceController 55 mAlwaysDiscoverable = new AlwaysDiscoverable(context, mBluetoothAdapter); in BluetoothScanningDevicesGroupPreferenceController() 108 if (!mBluetoothAdapter.isDiscovering()) { in enableScanning() 109 mBluetoothAdapter.startDiscovery(); in enableScanning() 120 if (mBluetoothAdapter.isDiscovering()) { in disableScanning() 121 mBluetoothAdapter.cancelDiscovery(); in disableScanning()
|