Home
last modified time | relevance | path

Searched refs:mBluetoothAdapter (Results 1 – 18 of 18) sorted by relevance

/cts/hostsidetests/devicepolicy/app/DeviceOwner/src/com/android/cts/deviceowner/
DBluetoothRestrictionTest.java39 private BluetoothAdapter mBluetoothAdapter; field in BluetoothRestrictionTest
45 mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter(); in setUp()
57 if (mBluetoothAdapter == null) { in testEnableBluetoothFailsWhenDisallowed()
68 assertFalse(mBluetoothAdapter.enable()); in testEnableBluetoothFailsWhenDisallowed()
72 if (mBluetoothAdapter == null) { in testBluetoothGetsDisabledAfterRestrictionSet()
87 if (mBluetoothAdapter == null) { in testEnableBluetoothSucceedsAfterRestrictionRemoved()
113 if (mBluetoothAdapter == null) { in testOppDisabledWhenRestrictionSet()
147 if (mBluetoothAdapter == null) in disable()
151 if (mBluetoothAdapter.getState() == BluetoothAdapter.STATE_OFF) { in disable()
152 assertFalse(mBluetoothAdapter.isEnabled()); in disable()
[all …]
/cts/apps/CtsVerifier/src/com/android/cts/verifier/bluetooth/
DDevicePickerActivity.java54 private BluetoothAdapter mBluetoothAdapter; field in DevicePickerActivity
103 mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter(); in onCreate()
104 if (mBluetoothAdapter.isEnabled()) { in onCreate()
126 mBluetoothAdapter.setScanMode(BluetoothAdapter.SCAN_MODE_CONNECTABLE_DISCOVERABLE, 60); in scan()
129 if (mBluetoothAdapter.isDiscovering()) { in scan()
130 mBluetoothAdapter.cancelDiscovery(); in scan()
132 mBluetoothAdapter.startDiscovery(); in scan()
137 Set<BluetoothDevice> pairedDevices = mBluetoothAdapter.getBondedDevices(); in populatePairedDevices()
146 if (mBluetoothAdapter != null) { in onDestroy()
147 mBluetoothAdapter.cancelDiscovery(); in onDestroy()
[all …]
DBluetoothToggleActivity.java46 private BluetoothAdapter mBluetoothAdapter; field in BluetoothToggleActivity
71 mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter(); in onCreate()
76 mToggleButton.setChecked(mBluetoothAdapter.isEnabled()); in onCreate()
111 if (!mBluetoothAdapter.disable()) { in disableBluetooth()
146 mToggleButton.setChecked(mBluetoothAdapter.isEnabled()); in onReceive()
DConnectionAccessClientActivity.java41 private BluetoothAdapter mBluetoothAdapter; field in ConnectionAccessClientActivity
72 mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter(); in onCreate()
73 if (!mBluetoothAdapter.isEnabled()) { in onCreate()
114 BluetoothDevice device = mBluetoothAdapter.getRemoteDevice(mDeviceAddress); in startChartService()
DConnectionAccessServerActivity.java47 private BluetoothAdapter mBluetoothAdapter; field in ConnectionAccessServerActivity
82 mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter(); in onCreate()
83 if (mBluetoothAdapter.isEnabled()) { in onCreate()
114 if (mBluetoothAdapter.getScanMode() != in makeDiscoverable()
DHidHostActivity.java39 BluetoothAdapter mBluetoothAdapter; field in HidHostActivity
55 mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter(); in onCreate()
102 BluetoothDevice bluetoothDevice = mBluetoothAdapter.getRemoteDevice(mDeviceAddress); in connectToDevice()
DBleAdvertiserService.java101 private BluetoothAdapter mBluetoothAdapter; field in BleAdvertiserService
119 mBluetoothAdapter = mBluetoothManager.getAdapter(); in onCreate()
120 mAdvertiser = mBluetoothAdapter.getBluetoothLeAdvertiser(); in onCreate()
198 if (mBluetoothAdapter != null && !mBluetoothAdapter.isMultipleAdvertisementSupported()) { in handleIntent()
DBleConnectionPriorityClientService.java82 private BluetoothAdapter mBluetoothAdapter; field in BleConnectionPriorityClientService
106 mBluetoothAdapter = mBluetoothManager.getAdapter(); in onCreate()
107 mScanner = mBluetoothAdapter.getBluetoothLeScanner(); in onCreate()
203 Set<BluetoothDevice> pairedDevices = mBluetoothAdapter.getBondedDevices();
309 if (!mBluetoothAdapter.isEnabled()) { in startScan()
DHidDeviceActivity.java52 private BluetoothAdapter mBluetoothAdapter; field in HidDeviceActivity
111 mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter(); in onCreate()
112 mBluetoothAdapter.getProfileProxy(getApplicationContext(), mProfileListener, in onCreate()
190 if (mBluetoothAdapter.getScanMode() != in makeDiscoverable()
DMessageTestActivity.java59 private BluetoothAdapter mBluetoothAdapter; field in MessageTestActivity
136 mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter(); in onCreate()
141 if (mBluetoothAdapter.isEnabled()) { in onCreate()
180 BluetoothDevice device = mBluetoothAdapter.getRemoteDevice(mDeviceAddress); in startChatService()
186 if (mBluetoothAdapter.getScanMode() != in makeDiscoverable()
DBleCocClientService.java142 private BluetoothAdapter mBluetoothAdapter; field in BleCocClientService
169 mBluetoothAdapter = mBluetoothManager.getAdapter(); in onCreate()
170 mScanner = mBluetoothAdapter.getBluetoothLeScanner(); in onCreate()
178 if (!mBluetoothAdapter.isEnabled()) { in onStartCommand()
387 Set<BluetoothDevice> pairedDevices = mBluetoothAdapter.getBondedDevices();
DBleEncryptedClientService.java112 private BluetoothAdapter mBluetoothAdapter; field in BleEncryptedClientService
140 mBluetoothAdapter = mBluetoothManager.getAdapter(); in onCreate()
142 mScanner = mBluetoothAdapter.getBluetoothLeScanner(); in onCreate()
175 if (!mBluetoothAdapter.isEnabled()) { in onStartCommand()
DBleClientService.java294 private BluetoothAdapter mBluetoothAdapter; field in BleClientService
336 mBluetoothAdapter = mBluetoothManager.getAdapter(); in onCreate()
337 mScanner = mBluetoothAdapter.getBluetoothLeScanner(); in onCreate()
347 if (!mBluetoothAdapter.isEnabled()) { in onStartCommand()
966 Set<BluetoothDevice> pairedDevices = mBluetoothAdapter.getBondedDevices();
/cts/tests/tests/bluetooth/src/android/bluetooth/cts/
DHearingAidProfileTest.java62 private BluetoothAdapter mBluetoothAdapter; field in HearingAidProfileTest
81 mBluetoothAdapter = manager.getAdapter(); in setUp()
83 if (!BTAdapterUtils.enableAdapter(mBluetoothAdapter, mContext)) { in setUp()
85 assertTrue(mBluetoothAdapter.isEnabled()); in setUp()
92 mIsHearingAidSupported = mBluetoothAdapter.getProfileProxy(getContext(), in setUp()
102 if (!BTAdapterUtils.disableAdapter(mBluetoothAdapter, mContext)) { in tearDown()
104 assertTrue(mBluetoothAdapter.isEnabled()); in tearDown()
134 BluetoothDevice device = mBluetoothAdapter.getRemoteDevice("00:11:22:AA:BB:CC"); in test_getConnectionState()
227 assertTrue(BTAdapterUtils.disableAdapter(mBluetoothAdapter, mContext)); in test_getConnectionStateChangedIntent()
230 assertTrue(BTAdapterUtils.enableAdapter(mBluetoothAdapter, mContext)); in test_getConnectionStateChangedIntent()
[all …]
DBluetoothLeScanTest.java69 private BluetoothAdapter mBluetoothAdapter; field in BluetoothLeScanTest
81 mBluetoothAdapter = manager.getAdapter(); in setUp()
82 if (!mBluetoothAdapter.isEnabled()) { in setUp()
83 assertTrue(BTAdapterUtils.enableAdapter(mBluetoothAdapter, mContext)); in setUp()
85 mScanner = mBluetoothAdapter.getBluetoothLeScanner(); in setUp()
104 assertTrue(BTAdapterUtils.disableAdapter(mBluetoothAdapter, mContext)); in tearDown()
392 return mBluetoothAdapter.isOffloadedScanBatchingSupported(); in isBleBatchScanSupported()
/cts/tests/tests/car/src/android/car/cts/
DCarBluetoothTest.java72 private BluetoothAdapter mBluetoothAdapter; field in CarBluetoothTest
143 mBluetoothAdapter.enable(); in waitForAdapterState()
145 mBluetoothAdapter.disable(); in waitForAdapterState()
149 while (desiredState != mBluetoothAdapter.getState()) { in waitForAdapterState()
241 mBluetoothAdapter.getProfileProxy(mContext, new ProfileServiceListener(), profile); in waitForProfileConnections()
324 mBluetoothAdapter = mBluetoothManager.getAdapter(); in setUp()
342 assertTrue(mBluetoothAdapter.isEnabled()); in setUp()
366 assertNotNull(mBluetoothAdapter); in testRequiredBluetoothProfilesExist()
/cts/tests/tests/permission/src/android/permission/cts/
DNearbyDevicesPermissionTest.java86 private BluetoothAdapter mBluetoothAdapter; field in NearbyDevicesPermissionTest
92 mBluetoothAdapter = mContext.getSystemService(BluetoothManager.class).getAdapter(); in enableBluetooth()
93 mBluetoothAdapterWasEnabled = mBluetoothAdapter.isEnabled(); in enableBluetooth()
94 assertTrue(BTAdapterUtils.enableAdapter(mBluetoothAdapter, mContext)); in enableBluetooth()
103 assertTrue(BTAdapterUtils.disableAdapter(mBluetoothAdapter, mContext)); in disableBluetooth()
DNearbyDevicesRenouncePermissionTest.java75 private BluetoothAdapter mBluetoothAdapter; field in NearbyDevicesRenouncePermissionTest
89 mBluetoothAdapter = mContext.getSystemService(BluetoothManager.class).getAdapter(); in enableBluetooth()
90 mBluetoothAdapterWasEnabled = mBluetoothAdapter.isEnabled(); in enableBluetooth()
91 assertTrue(BTAdapterUtils.enableAdapter(mBluetoothAdapter, mContext)); in enableBluetooth()
100 assertTrue(BTAdapterUtils.disableAdapter(mBluetoothAdapter, mContext)); in disableBluetooth()