/cts/tests/tests/bluetooth/src/android/bluetooth/cts/ |
D | BasicAdapterTest.java | 19 import android.bluetooth.BluetoothAdapter; 66 assertNotNull(BluetoothAdapter.getDefaultAdapter()); in test_getDefaultAdapter() 68 assertNull(BluetoothAdapter.getDefaultAdapter()); in test_getDefaultAdapter() 74 assertFalse(BluetoothAdapter.checkBluetoothAddress(null)); in test_checkBluetoothAddress() 77 assertFalse(BluetoothAdapter.checkBluetoothAddress("")); in test_checkBluetoothAddress() 78 assertFalse(BluetoothAdapter.checkBluetoothAddress("0")); in test_checkBluetoothAddress() 79 assertFalse(BluetoothAdapter.checkBluetoothAddress("00")); in test_checkBluetoothAddress() 80 assertFalse(BluetoothAdapter.checkBluetoothAddress("00:")); in test_checkBluetoothAddress() 81 assertFalse(BluetoothAdapter.checkBluetoothAddress("00:0")); in test_checkBluetoothAddress() 82 assertFalse(BluetoothAdapter.checkBluetoothAddress("00:00")); in test_checkBluetoothAddress() [all …]
|
D | ScanResultTest.java | 19 import android.bluetooth.BluetoothAdapter; 49 BluetoothAdapter.getDefaultAdapter().getRemoteDevice(DEVICE_ADDRESS); in testScanResultParceling() 70 BluetoothAdapter.getDefaultAdapter().getRemoteDevice(DEVICE_ADDRESS); in testDescribeContents()
|
D | LeL2capSocketTest.java | 18 import android.bluetooth.BluetoothAdapter; 30 private BluetoothAdapter mAdapter = null; 38 mAdapter = BluetoothAdapter.getDefaultAdapter(); in setUp()
|
/cts/hostsidetests/devicepolicy/app/ManagedProfile/src/com/android/cts/managedprofile/ |
D | BluetoothTest.java | 21 import android.bluetooth.BluetoothAdapter; 43 private BluetoothAdapter mAdapter; 48 mAdapter = BluetoothAdapter.getDefaultAdapter(); in setUp() 76 assertTrue(BluetoothAdapter.checkBluetoothAddress(mAdapter.getAddress())); in testGetAddress() 135 if (mAdapter.getState() == BluetoothAdapter.STATE_OFF) { in disable() 140 assertThat(mAdapter.getState()).isEqualTo(BluetoothAdapter.STATE_ON); in disable() 145 BluetoothAdapter.ACTION_STATE_CHANGED, in disable() 158 if (mAdapter.getState() == BluetoothAdapter.STATE_ON) { in enable() 163 assertThat(mAdapter.getState()).isEqualTo(BluetoothAdapter.STATE_OFF); in enable() 167 BluetoothAdapter.ACTION_STATE_CHANGED, in enable() [all …]
|
D | BluetoothSharingRestrictionPrimaryProfileTest.java | 21 import android.bluetooth.BluetoothAdapter; 30 if (BluetoothAdapter.getDefaultAdapter() == null) { in testBluetoothSharingAvailable()
|
/cts/apps/CtsVerifier/src/com/android/cts/verifier/bluetooth/ |
D | BluetoothToggleActivity.java | 24 import android.bluetooth.BluetoothAdapter; 46 private BluetoothAdapter mBluetoothAdapter; 65 IntentFilter filter = new IntentFilter(BluetoothAdapter.ACTION_STATE_CHANGED); in onCreate() 71 mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter(); in onCreate() 92 Intent intent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE); in enableBluetooth() 125 int previousState = intent.getIntExtra(BluetoothAdapter.EXTRA_PREVIOUS_STATE, -1); in onReceive() 126 int newState = intent.getIntExtra(BluetoothAdapter.EXTRA_STATE, -1); in onReceive() 129 if (BluetoothAdapter.STATE_OFF == newState in onReceive() 130 && (BluetoothAdapter.STATE_ON == previousState in onReceive() 131 || BluetoothAdapter.STATE_TURNING_OFF == previousState)) { in onReceive() [all …]
|
D | ConnectionAccessServerActivity.java | 23 import android.bluetooth.BluetoothAdapter; 47 private BluetoothAdapter mBluetoothAdapter; 82 mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter(); in onCreate() 86 Intent intent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE); in onCreate() 115 BluetoothAdapter.SCAN_MODE_CONNECTABLE_DISCOVERABLE) { in makeDiscoverable() 116 Intent intent = new Intent(BluetoothAdapter.ACTION_REQUEST_DISCOVERABLE); in makeDiscoverable() 117 intent.putExtra(BluetoothAdapter.EXTRA_DISCOVERABLE_DURATION, 30); in makeDiscoverable()
|
D | DevicePickerActivity.java | 23 import android.bluetooth.BluetoothAdapter; 54 private BluetoothAdapter mBluetoothAdapter; 90 IntentFilter filter = new IntentFilter(BluetoothAdapter.ACTION_DISCOVERY_STARTED); in onCreate() 91 filter.addAction(BluetoothAdapter.ACTION_DISCOVERY_FINISHED); in onCreate() 103 mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter(); in onCreate() 107 Intent intent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE); in onCreate() 126 mBluetoothAdapter.setScanMode(BluetoothAdapter.SCAN_MODE_CONNECTABLE_DISCOVERABLE, 60); in scan() 187 if (BluetoothAdapter.ACTION_DISCOVERY_STARTED.equals(intent.getAction())) { in onReceive() 190 } else if (BluetoothAdapter.ACTION_DISCOVERY_FINISHED.equals(intent.getAction())) { in onReceive()
|
D | BleCocInsecureServerTestListActivity.java | 19 import android.bluetooth.BluetoothAdapter; 38 BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter(); in onCreate()
|
D | BleCocInsecureClientTestListActivity.java | 19 import android.bluetooth.BluetoothAdapter; 40 BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter(); in onCreate()
|
D | BleCocSecureServerTestListActivity.java | 19 import android.bluetooth.BluetoothAdapter; 38 BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter(); in onCreate()
|
D | BleCocSecureClientTestListActivity.java | 19 import android.bluetooth.BluetoothAdapter; 40 BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter(); in onCreate()
|
D | BleSecureServerTestListActivity.java | 19 import android.bluetooth.BluetoothAdapter; 38 BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter(); in onCreate()
|
D | BleInsecureClientTestListActivity.java | 19 import android.bluetooth.BluetoothAdapter; 40 BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter(); in onCreate()
|
D | BleInsecureServerTestListActivity.java | 19 import android.bluetooth.BluetoothAdapter; 38 BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter(); in onCreate()
|
D | BleSecureClientTestListActivity.java | 19 import android.bluetooth.BluetoothAdapter; 40 BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter(); in onCreate()
|
D | BleScannerTestActivity.java | 21 import android.bluetooth.BluetoothAdapter; 41 BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter(); in onCreate()
|
D | BleAdvertiserTestActivity.java | 21 import android.bluetooth.BluetoothAdapter; 41 BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter(); in onCreate()
|
D | BleConnectionPriorityClientBaseActivity.java | 22 import android.bluetooth.BluetoothAdapter; 229 private BluetoothAdapter mAdapter; 238 IntentFilter filter = new IntentFilter(BluetoothAdapter.ACTION_STATE_CHANGED); in executeSwitching() 253 if (intent.getAction().equals(BluetoothAdapter.ACTION_STATE_CHANGED)) { in onReceive() 254 int state = intent.getIntExtra(BluetoothAdapter.EXTRA_STATE, -1); in onReceive() 255 if (state == BluetoothAdapter.STATE_OFF) { in onReceive() 262 } else if (state == BluetoothAdapter.STATE_ON) { in onReceive()
|
D | BluetoothTestActivity.java | 19 import android.bluetooth.BluetoothAdapter; 40 BluetoothAdapter bluetoothAdapter = BluetoothAdapter.getDefaultAdapter(); in onCreate()
|
D | HidDeviceActivity.java | 19 import android.bluetooth.BluetoothAdapter; 52 private BluetoothAdapter mBluetoothAdapter; 111 mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter(); in onCreate() 191 BluetoothAdapter.SCAN_MODE_CONNECTABLE_DISCOVERABLE) { in makeDiscoverable() 192 Intent intent = new Intent(BluetoothAdapter.ACTION_REQUEST_DISCOVERABLE); in makeDiscoverable() 193 intent.putExtra(BluetoothAdapter.EXTRA_DISCOVERABLE_DURATION, 30); in makeDiscoverable()
|
/cts/hostsidetests/devicepolicy/app/DeviceOwner/src/com/android/cts/deviceowner/ |
D | BluetoothRestrictionTest.java | 19 import android.bluetooth.BluetoothAdapter; 39 private BluetoothAdapter mBluetoothAdapter; 45 mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter(); in setUp() 151 if (mBluetoothAdapter.getState() == BluetoothAdapter.STATE_OFF) { in disable() 156 assertEquals(BluetoothAdapter.STATE_ON, mBluetoothAdapter.getState()); in disable() 172 case BluetoothAdapter.STATE_OFF: in assertDisabledAfterTimeout() 176 if (state != BluetoothAdapter.STATE_ON || turnOff) { in assertDisabledAfterTimeout() 177 assertEquals(BluetoothAdapter.STATE_TURNING_OFF, state); in assertDisabledAfterTimeout() 212 if (mBluetoothAdapter.getState() == BluetoothAdapter.STATE_ON) { in enable() 217 assertEquals(BluetoothAdapter.STATE_OFF, mBluetoothAdapter.getState()); in enable() [all …]
|
/cts/tests/tests/bluetooth/bluetoothTestUtilLib/src/android/bluetooth/cts/ |
D | BTAdapterUtils.java | 19 import android.bluetooth.BluetoothAdapter; 63 if (BluetoothAdapter.ACTION_STATE_CHANGED.equals(intent.getAction())) { in onReceive() 64 int previousState = intent.getIntExtra(BluetoothAdapter.EXTRA_PREVIOUS_STATE, -1); in onReceive() 65 int newState = intent.getIntExtra(BluetoothAdapter.EXTRA_STATE, -1); in onReceive() 68 if (newState == BluetoothAdapter.STATE_ON) { in onReceive() 76 } else if (newState == BluetoothAdapter.STATE_OFF) { in onReceive() 90 public static boolean enableAdapter(BluetoothAdapter bluetoothAdapter, Context context) { in enableAdapter() 119 public static boolean disableAdapter(BluetoothAdapter bluetoothAdapter, Context context) { in disableAdapter() 124 if (bluetoothAdapter.getState() == BluetoothAdapter.STATE_OFF) return true; in disableAdapter() 131 while (bluetoothAdapter.getState() != BluetoothAdapter.STATE_OFF) { in disableAdapter() [all …]
|
/cts/hostsidetests/securitybulletin/test-apps/CVE-2021-0591/src/android/security/cts/CVE_2021_0591/ |
D | PocActivity.java | 20 import android.bluetooth.BluetoothAdapter; 36 BluetoothAdapter bluetoothAdapter = BluetoothAdapter.getDefaultAdapter(); in onCreate()
|
/cts/tests/tests/car/src/android/car/cts/ |
D | CarBluetoothTest.java | 23 import android.bluetooth.BluetoothAdapter; 72 private BluetoothAdapter mBluetoothAdapter; 94 if (BluetoothAdapter.ACTION_STATE_CHANGED.equals(action)) { in onReceive() 95 int newState = intent.getIntExtra(BluetoothAdapter.EXTRA_STATE, -1); in onReceive() 108 } else if (newState == BluetoothAdapter.STATE_OFF) { in onReceive() 123 waitForAdapterState(BluetoothAdapter.STATE_ON); in waitForAdapterOn() 130 waitForAdapterState(BluetoothAdapter.STATE_OFF); in waitForAdapterOff() 142 if (desiredState == BluetoothAdapter.STATE_ON) { in waitForAdapterState() 337 IntentFilter filter = new IntentFilter(BluetoothAdapter.ACTION_STATE_CHANGED); in setUp()
|