Home
last modified time | relevance | path

Searched refs:BluetoothAdapter (Results 1 – 25 of 55) sorted by relevance

123

/cts/tests/tests/bluetooth/src/android/bluetooth/cts/
DBasicAdapterTest.java19 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 …]
DScanResultTest.java19 import android.bluetooth.BluetoothAdapter;
49 BluetoothAdapter.getDefaultAdapter().getRemoteDevice(DEVICE_ADDRESS); in testScanResultParceling()
70 BluetoothAdapter.getDefaultAdapter().getRemoteDevice(DEVICE_ADDRESS); in testDescribeContents()
DLeL2capSocketTest.java18 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/
DBluetoothTest.java21 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 …]
DBluetoothSharingRestrictionPrimaryProfileTest.java21 import android.bluetooth.BluetoothAdapter;
30 if (BluetoothAdapter.getDefaultAdapter() == null) { in testBluetoothSharingAvailable()
/cts/apps/CtsVerifier/src/com/android/cts/verifier/bluetooth/
DBluetoothToggleActivity.java24 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 …]
DConnectionAccessServerActivity.java23 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()
DDevicePickerActivity.java23 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()
DBleCocInsecureServerTestListActivity.java19 import android.bluetooth.BluetoothAdapter;
38 BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter(); in onCreate()
DBleCocInsecureClientTestListActivity.java19 import android.bluetooth.BluetoothAdapter;
40 BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter(); in onCreate()
DBleCocSecureServerTestListActivity.java19 import android.bluetooth.BluetoothAdapter;
38 BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter(); in onCreate()
DBleCocSecureClientTestListActivity.java19 import android.bluetooth.BluetoothAdapter;
40 BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter(); in onCreate()
DBleSecureServerTestListActivity.java19 import android.bluetooth.BluetoothAdapter;
38 BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter(); in onCreate()
DBleInsecureClientTestListActivity.java19 import android.bluetooth.BluetoothAdapter;
40 BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter(); in onCreate()
DBleInsecureServerTestListActivity.java19 import android.bluetooth.BluetoothAdapter;
38 BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter(); in onCreate()
DBleSecureClientTestListActivity.java19 import android.bluetooth.BluetoothAdapter;
40 BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter(); in onCreate()
DBleScannerTestActivity.java21 import android.bluetooth.BluetoothAdapter;
41 BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter(); in onCreate()
DBleAdvertiserTestActivity.java21 import android.bluetooth.BluetoothAdapter;
41 BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter(); in onCreate()
DBleConnectionPriorityClientBaseActivity.java22 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()
DBluetoothTestActivity.java19 import android.bluetooth.BluetoothAdapter;
40 BluetoothAdapter bluetoothAdapter = BluetoothAdapter.getDefaultAdapter(); in onCreate()
DHidDeviceActivity.java19 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/
DBluetoothRestrictionTest.java19 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/
DBTAdapterUtils.java19 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/
DPocActivity.java20 import android.bluetooth.BluetoothAdapter;
36 BluetoothAdapter bluetoothAdapter = BluetoothAdapter.getDefaultAdapter(); in onCreate()
/cts/tests/tests/car/src/android/car/cts/
DCarBluetoothTest.java23 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()

123