HomeSort by relevance Sort by last modified time
    Searched refs:BluetoothAdapter (Results 1 - 25 of 190) sorted by null

1 2 3 4 5 6 7 8

  /cts/tests/tests/bluetooth/src/android/bluetooth/cts/
BasicAdapterTest.java 19 import android.bluetooth.BluetoothAdapter;
31 * BluetoothAdapter}.
54 assertNotNull(BluetoothAdapter.getDefaultAdapter());
56 assertNull(BluetoothAdapter.getDefaultAdapter());
62 assertFalse(BluetoothAdapter.checkBluetoothAddress(null));
65 assertFalse(BluetoothAdapter.checkBluetoothAddress(""));
66 assertFalse(BluetoothAdapter.checkBluetoothAddress("0"));
67 assertFalse(BluetoothAdapter.checkBluetoothAddress("00"));
68 assertFalse(BluetoothAdapter.checkBluetoothAddress("00:"));
69 assertFalse(BluetoothAdapter.checkBluetoothAddress("00:0"))
    [all...]
  /frameworks/base/core/tests/bluetoothtests/src/android/bluetooth/
BluetoothRebootStressTest.java 54 BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter();
64 BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter();
75 BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter();
88 BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter();
BluetoothStressTest.java 64 BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter();
83 BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter();
106 BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter();
128 BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter();
155 BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter()
    [all...]
  /frameworks/base/core/tests/hosttests/test-apps/ExternalSharedPermsBT/src/com/android/framework/externalsharedpermsbttestapp/
ExternalSharedPermsBTTest.java 18 import android.bluetooth.BluetoothAdapter;
32 BluetoothAdapter mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter();
  /packages/apps/Bluetooth/src/com/android/bluetooth/pbap/
BluetoothPbapReceiver.java 35 import android.bluetooth.BluetoothAdapter;
59 if (action.equals(BluetoothAdapter.ACTION_STATE_CHANGED)) {
60 int state = intent.getIntExtra(BluetoothAdapter.EXTRA_STATE, BluetoothAdapter.ERROR);
61 in.putExtra(BluetoothAdapter.EXTRA_STATE, state);
63 if ((state == BluetoothAdapter.STATE_TURNING_ON)
64 || (state == BluetoothAdapter.STATE_OFF)) {
65 //FIX: We turn on PBAP after BluetoothAdapter.STATE_ON,
66 //but we turn off PBAP right after BluetoothAdapter.STATE_TURNING_OFF
71 BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter()
    [all...]
  /packages/apps/Bluetooth/tests/src/com/android/bluetooth/tests/
BluetoothTestUtils.java 4 import android.bluetooth.BluetoothAdapter;
23 public static void enableBt(BluetoothAdapter adapter) {
24 if (adapter.getState() == BluetoothAdapter.STATE_ON) {
28 assertEquals(BluetoothAdapter.STATE_OFF, adapter.getState());
34 case BluetoothAdapter.STATE_ON:
38 case BluetoothAdapter.STATE_OFF:
43 assertEquals(BluetoothAdapter.STATE_TURNING_ON, adapter.getState());
  /packages/apps/Settings/src/com/android/settings/bluetooth/
BluetoothDiscoveryReceiver.java 19 import android.bluetooth.BluetoothAdapter;
44 if (action.equals(BluetoothAdapter.ACTION_DISCOVERY_STARTED) ||
45 action.equals(BluetoothAdapter.ACTION_DISCOVERY_FINISHED)) {
RequestPermissionActivity.java 21 import android.bluetooth.BluetoothAdapter;
85 && BluetoothAdapter.ACTION_STATE_CHANGED.equals(intent.getAction())) {
86 int state = intent.getIntExtra(BluetoothAdapter.EXTRA_STATE, BluetoothDevice.ERROR);
87 if (state == BluetoothAdapter.STATE_ON) {
109 case BluetoothAdapter.STATE_OFF:
110 case BluetoothAdapter.STATE_TURNING_OFF:
111 case BluetoothAdapter.STATE_TURNING_ON:
126 new IntentFilter(BluetoothAdapter.ACTION_STATE_CHANGED));
134 intent.putExtra(BluetoothAdapter.EXTRA_DISCOVERABLE_DURATION, mTimeout);
139 case BluetoothAdapter.STATE_ON
    [all...]
  /packages/apps/Settings/tests/src/com/android/settings/tests/
BluetoothRequestPermissionTest.java 20 import android.bluetooth.BluetoothAdapter;
36 BluetoothAdapter mAdapter;
71 mAdapter = BluetoothAdapter.getDefaultAdapter();
93 filter.addAction(BluetoothAdapter.ACTION_DISCOVERY_STARTED);
94 filter.addAction(BluetoothAdapter.ACTION_DISCOVERY_FINISHED);
95 filter.addAction(BluetoothAdapter.ACTION_STATE_CHANGED);
105 i.setAction(BluetoothAdapter.ACTION_REQUEST_ENABLE);
108 i.setAction(BluetoothAdapter.ACTION_REQUEST_DISCOVERABLE);
111 i.putExtra(BluetoothAdapter.EXTRA_DISCOVERABLE_DURATION, timeout);
150 if (BluetoothAdapter.ACTION_STATE_CHANGED.equals(action))
    [all...]
  /external/robolectric/src/main/java/com/xtremelabs/robolectric/shadows/
ShadowBluetoothAdapter.java 3 import android.bluetooth.BluetoothAdapter;
16 @Implements(BluetoothAdapter.class)
23 public static BluetoothAdapter getDefaultAdapter() {
24 return (BluetoothAdapter) shadowOf(Robolectric.application).getBluetoothAdapter();
  /cts/apps/CtsVerifier/src/com/android/cts/verifier/bluetooth/
BluetoothToggleActivity.java 24 import android.bluetooth.BluetoothAdapter;
37 * a button that toggles Bluetooth by disabling it via {@link BluetoothAdapter#disable()} and
38 * enabling it via the Intent action {@link BluetoothAdapter#ACTION_REQUEST_ENABLE}.
46 private BluetoothAdapter mBluetoothAdapter;
65 IntentFilter filter = new IntentFilter(BluetoothAdapter.ACTION_STATE_CHANGED);
71 mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter();
92 Intent intent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);
125 int previousState = intent.getIntExtra(BluetoothAdapter.EXTRA_PREVIOUS_STATE, -1);
126 int newState = intent.getIntExtra(BluetoothAdapter.EXTRA_STATE, -1);
129 if (BluetoothAdapter.STATE_OFF == newStat
    [all...]
BleAdvertiserTestActivity.java 23 import android.bluetooth.BluetoothAdapter;
38 BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter();
BleScannerTestActivity.java 23 import android.bluetooth.BluetoothAdapter;
38 BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter();
  /cts/hostsidetests/devicepolicy/app/ManagedProfile/src/com/android/cts/managedprofile/
BluetoothTest.java 19 import android.bluetooth.BluetoothAdapter;
33 * This includes tests for the {@link BluetoothAdapter}.
44 private BluetoothAdapter mAdapter;
49 mAdapter = BluetoothAdapter.getDefaultAdapter();
77 assertTrue(BluetoothAdapter.checkBluetoothAddress(mAdapter.getAddress()));
137 if (mAdapter.getState() == BluetoothAdapter.STATE_OFF) {
142 assertEquals(BluetoothAdapter.STATE_ON, mAdapter.getState());
150 case BluetoothAdapter.STATE_OFF:
154 if (state != BluetoothAdapter.STATE_ON || turnOff) {
155 assertEquals(BluetoothAdapter.STATE_TURNING_OFF, state)
    [all...]
  /frameworks/base/packages/SettingsLib/src/com/android/settingslib/bluetooth/
LocalBluetoothAdapter.java 19 import android.bluetooth.BluetoothAdapter;
30 * and the functionality of the local {@link BluetoothAdapter}, specifically
40 /** This class does not allow direct access to the BluetoothAdapter. */
41 private final BluetoothAdapter mAdapter;
47 private int mState = BluetoothAdapter.ERROR;
53 private LocalBluetoothAdapter(BluetoothAdapter adapter) {
69 BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter();
78 // Pass-through BluetoothAdapter methods that we can intercept if necessary
183 if (state == BluetoothAdapter.STATE_ON)
    [all...]
  /frameworks/base/core/tests/hosttests/test-apps/ExternalSharedPerms/src/com/android/framework/externalsharedpermstestapp/
ExternalSharedPermsTest.java 18 import android.bluetooth.BluetoothAdapter;
48 BluetoothAdapter mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter();
  /frameworks/base/core/tests/hosttests/test-apps/ExternalSharedPermsDiffKey/src/com/android/framework/externalsharedpermsdiffkeytestapp/
ExternalSharedPermsDiffKeyTest.java 18 import android.bluetooth.BluetoothAdapter;
46 BluetoothAdapter mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter();
  /frameworks/base/services/core/java/com/android/server/
BluetoothService.java 19 import android.bluetooth.BluetoothAdapter;
35 publishBinderService(BluetoothAdapter.BLUETOOTH_MANAGER_SERVICE, mBluetoothManagerService);
  /packages/apps/Bluetooth/src/com/android/bluetooth/opp/
BluetoothOppBtEnablingActivity.java 39 import android.bluetooth.BluetoothAdapter;
73 BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter();
79 IntentFilter filter = new IntentFilter(BluetoothAdapter.ACTION_STATE_CHANGED);
139 if (action.equals(BluetoothAdapter.ACTION_STATE_CHANGED)) {
140 switch (intent.getIntExtra(BluetoothAdapter.EXTRA_STATE, BluetoothAdapter.ERROR)) {
141 case BluetoothAdapter.STATE_ON:
  /packages/apps/TvSettings/Settings/src/com/android/tv/settings/name/
DeviceManager.java 19 import android.bluetooth.BluetoothAdapter;
45 BluetoothAdapter.getDefaultAdapter().setName(name);
  /packages/apps/TvSettings/Settings/src/com/android/tv/settings/accessories/
BluetoothConnectionsManager.java 3 import android.bluetooth.BluetoothAdapter;
30 int btState = prefs.getInt(KEY_BT_STATE, BluetoothAdapter.STATE_OFF);
35 if (TextUtils.equals(action, BluetoothAdapter.ACTION_STATE_CHANGED)) {
36 final int newBtState = intent.getIntExtra(BluetoothAdapter.EXTRA_STATE,
37 BluetoothAdapter.ERROR);
42 if (newBtState == BluetoothAdapter.STATE_ON ||
43 newBtState == BluetoothAdapter.STATE_OFF) {
  /packages/apps/Nfc/src/com/android/nfc/beam/
BeamSendService.java 20 import android.bluetooth.BluetoothAdapter;
47 private final BluetoothAdapter mBluetoothAdapter;
52 if (action.equals(BluetoothAdapter.ACTION_STATE_CHANGED)) {
59 mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter();
67 IntentFilter filter = new IntentFilter(BluetoothAdapter.ACTION_STATE_CHANGED);
149 int state = intent.getIntExtra(BluetoothAdapter.EXTRA_STATE,
150 BluetoothAdapter.ERROR);
151 if (state == BluetoothAdapter.STATE_ON) {
156 } else if (state == BluetoothAdapter.STATE_OFF) {
BeamReceiveService.java 4 import android.bluetooth.BluetoothAdapter;
35 private final BluetoothAdapter mBluetoothAdapter;
40 if (BluetoothAdapter.ACTION_STATE_CHANGED.equals(action)) {
41 int state = intent.getIntExtra(BluetoothAdapter.EXTRA_STATE,
42 BluetoothAdapter.ERROR);
43 if (state == BluetoothAdapter.STATE_OFF) {
51 mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter();
84 IntentFilter filter = new IntentFilter(BluetoothAdapter.ACTION_STATE_CHANGED);
  /packages/apps/Bluetooth/src/com/android/bluetooth/btservice/
AdapterState.java 19 import android.bluetooth.BluetoothAdapter;
156 notifyAdapterStateChange(BluetoothAdapter.STATE_BLE_TURNING_ON);
194 notifyAdapterStateChange(BluetoothAdapter.STATE_TURNING_ON);
202 notifyAdapterStateChange(BluetoothAdapter.STATE_BLE_TURNING_OFF);
213 notifyAdapterStateChange(BluetoothAdapter.STATE_BLE_ON);
249 notifyAdapterStateChange(BluetoothAdapter.STATE_TURNING_OFF);
365 notifyAdapterStateChange(BluetoothAdapter.STATE_OFF);
378 notifyAdapterStateChange(BluetoothAdapter.STATE_ON);
385 notifyAdapterStateChange(BluetoothAdapter.STATE_BLE_ON);
404 notifyAdapterStateChange(BluetoothAdapter.STATE_OFF)
    [all...]
  /frameworks/base/core/tests/bluetoothtests/src/android/bluetooth/le/
ScanResultTest.java 19 import android.bluetooth.BluetoothAdapter;
39 BluetoothDevice device = BluetoothAdapter.getDefaultAdapter().getRemoteDevice(

Completed in 729 milliseconds

1 2 3 4 5 6 7 8