/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/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 | 63 private final BluetoothAdapter mBluetoothAdapter; field in TetherPreferenceController 87 mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter(); in TetherPreferenceController() 96 mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter(); in TetherPreferenceController() 132 if (mBluetoothAdapter != null && in onCreate() 133 mBluetoothAdapter.getState() == BluetoothAdapter.STATE_ON) { in onCreate() 134 mBluetoothAdapter.getProfileProxy(mContext, mBtProfileServiceListener, in onCreate() 166 if (profile != null && mBluetoothAdapter != null) { in onDestroy() 167 mBluetoothAdapter.closeProfileProxy(BluetoothProfile.PAN, profile); in onDestroy() 213 && mBluetoothAdapter != null in updateSummary() 214 && mBluetoothAdapter.getState() == BluetoothAdapter.STATE_ON) { in updateSummary()
|
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/network/ |
D | TetherPreferenceController.java | 63 private final BluetoothAdapter mBluetoothAdapter; field in TetherPreferenceController 87 mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter(); in TetherPreferenceController() 96 mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter(); in TetherPreferenceController() 132 if (mBluetoothAdapter != null && in onCreate() 133 mBluetoothAdapter.getState() == BluetoothAdapter.STATE_ON) { in onCreate() 134 mBluetoothAdapter.getProfileProxy(mContext, mBtProfileServiceListener, in onCreate() 166 if (profile != null && mBluetoothAdapter != null) { in onDestroy() 167 mBluetoothAdapter.closeProfileProxy(BluetoothProfile.PAN, profile); in onDestroy() 213 && mBluetoothAdapter != null in updateSummary() 214 && mBluetoothAdapter.getState() == BluetoothAdapter.STATE_ON) { in updateSummary()
|
/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/services/Car/service/src/com/android/car/ |
D | BluetoothDeviceConnectionPolicy.java | 46 private final BluetoothAdapter mBluetoothAdapter; field in BluetoothDeviceConnectionPolicy 68 if (mBluetoothAdapter.getState() == BluetoothAdapter.STATE_ON) { 156 mBluetoothAdapter = Objects.requireNonNull(BluetoothAdapter.getDefaultAdapter()); in BluetoothDeviceConnectionPolicy() 183 if (mBluetoothAdapter.getState() == BluetoothAdapter.STATE_ON) { in init() 228 if (mBluetoothAdapter == null) { in enableBluetooth() 232 mBluetoothAdapter.enable(); in enableBluetooth() 243 if (mBluetoothAdapter == null) { in disableBluetooth() 247 mBluetoothAdapter.disable(false); in disableBluetooth()
|
D | CarBluetoothUserService.java | 42 private final BluetoothAdapter mBluetoothAdapter; field in CarBluetoothUserService 86 mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter(); in CarBluetoothUserService() 99 Preconditions.checkNotNull(mBluetoothAdapter, "Bluetooth adapter cannot be null"); in setupBluetoothConnectionProxies() 110 mBluetoothAdapter.getProfileProxy(mService.getApplicationContext(), in setupBluetoothConnectionProxies() 140 Preconditions.checkNotNull(mBluetoothAdapter, "Bluetooth adapter cannot be null"); in closeBluetoothConnectionProxies() 144 mBluetoothAdapter.closeProfileProxy(BluetoothProfile.A2DP_SINK, mBluetoothA2dpSink); in closeBluetoothConnectionProxies() 147 mBluetoothAdapter.closeProfileProxy(BluetoothProfile.HEADSET_CLIENT, in closeBluetoothConnectionProxies() 151 mBluetoothAdapter.closeProfileProxy(BluetoothProfile.PBAP_CLIENT, in closeBluetoothConnectionProxies() 155 mBluetoothAdapter.closeProfileProxy(BluetoothProfile.MAP_CLIENT, in closeBluetoothConnectionProxies() 159 mBluetoothAdapter.closeProfileProxy(BluetoothProfile.PAN, mBluetoothPan); in closeBluetoothConnectionProxies()
|
/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()
|
/packages/apps/Settings/src/com/android/settings/accessibility/ |
D | AccessibilityHearingAidPreferenceController.java | 84 private final BluetoothAdapter mBluetoothAdapter; field in AccessibilityHearingAidPreferenceController 92 mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter(); in AccessibilityHearingAidPreferenceController() 156 if (mBluetoothAdapter == null || !mBluetoothAdapter.isEnabled()) { in getConnectedHearingAidDevice() 172 if (mBluetoothAdapter == null || !mBluetoothAdapter.isEnabled()) { in isHearingAidProfileSupported() 175 final List<Integer> supportedList = mBluetoothAdapter.getSupportedProfiles(); in isHearingAidProfileSupported()
|
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/accessibility/ |
D | AccessibilityHearingAidPreferenceController.java | 84 private final BluetoothAdapter mBluetoothAdapter; field in AccessibilityHearingAidPreferenceController 92 mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter(); in AccessibilityHearingAidPreferenceController() 156 if (mBluetoothAdapter == null || !mBluetoothAdapter.isEnabled()) { in getConnectedHearingAidDevice() 172 if (mBluetoothAdapter == null || !mBluetoothAdapter.isEnabled()) { in isHearingAidProfileSupported() 175 final List<Integer> supportedList = mBluetoothAdapter.getSupportedProfiles(); in isHearingAidProfileSupported()
|