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

1 2 3 4

  /cts/tests/tests/bluetooth/src/android/bluetooth/cts/
BasicAdapterTest.java 19 import android.bluetooth.BluetoothAdapter;
31 * BluetoothAdapter}.
53 assertNotNull(BluetoothAdapter.getDefaultAdapter());
55 assertNull(BluetoothAdapter.getDefaultAdapter());
61 assertFalse(BluetoothAdapter.checkBluetoothAddress(null));
64 assertFalse(BluetoothAdapter.checkBluetoothAddress(""));
65 assertFalse(BluetoothAdapter.checkBluetoothAddress("0"));
66 assertFalse(BluetoothAdapter.checkBluetoothAddress("00"));
67 assertFalse(BluetoothAdapter.checkBluetoothAddress("00:"));
68 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...]
BluetoothTestUtils.java 105 if (BluetoothAdapter.ACTION_DISCOVERY_STARTED.equals(intent.getAction())) {
107 } else if (BluetoothAdapter.ACTION_DISCOVERY_FINISHED.equals(intent.getAction())) {
109 } else if (BluetoothAdapter.ACTION_SCAN_MODE_CHANGED.equals(intent.getAction())) {
110 int mode = intent.getIntExtra(BluetoothAdapter.EXTRA_SCAN_MODE, -1);
113 case BluetoothAdapter.SCAN_MODE_NONE:
116 case BluetoothAdapter.SCAN_MODE_CONNECTABLE:
119 case BluetoothAdapter.SCAN_MODE_CONNECTABLE_DISCOVERABLE:
123 } else if (BluetoothAdapter.ACTION_STATE_CHANGED.equals(intent.getAction())) {
124 int state = intent.getIntExtra(BluetoothAdapter.EXTRA_STATE, -1);
127 case BluetoothAdapter.STATE_OFF
    [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;
57 if (action.equals(BluetoothAdapter.ACTION_STATE_CHANGED)) {
58 int state = intent.getIntExtra(BluetoothAdapter.EXTRA_STATE, BluetoothAdapter.ERROR);
59 in.putExtra(BluetoothAdapter.EXTRA_STATE, state);
60 if ((state == BluetoothAdapter.STATE_TURNING_ON)
61 || (state == BluetoothAdapter.STATE_TURNING_OFF)) {
66 BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter();
  /frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/policy/
BluetoothController.java 21 import android.bluetooth.BluetoothAdapter;
45 filter.addAction(BluetoothAdapter.ACTION_STATE_CHANGED);
46 filter.addAction(BluetoothAdapter.ACTION_CONNECTION_STATE_CHANGED);
49 final BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter();
65 if (action.equals(BluetoothAdapter.ACTION_STATE_CHANGED)) {
67 intent.getIntExtra(BluetoothAdapter.EXTRA_STATE, BluetoothAdapter.ERROR));
68 } else if (action.equals(BluetoothAdapter.ACTION_CONNECTION_STATE_CHANGED)) {
70 intent.getIntExtra(BluetoothAdapter.EXTRA_CONNECTION_STATE
    [all...]
  /packages/apps/Settings/src/com/android/settings/bluetooth/
BluetoothDiscoveryReceiver.java 19 import android.bluetooth.BluetoothAdapter;
42 if (action.equals(BluetoothAdapter.ACTION_DISCOVERY_STARTED) ||
43 action.equals(BluetoothAdapter.ACTION_DISCOVERY_FINISHED)) {
BluetoothEnabler.java 19 import android.bluetooth.BluetoothAdapter;
47 int state = intent.getIntExtra(BluetoothAdapter.EXTRA_STATE, BluetoothAdapter.ERROR);
64 mIntentFilter = new IntentFilter(BluetoothAdapter.ACTION_STATE_CHANGED);
95 int bluetoothState = BluetoothAdapter.STATE_OFF;
97 boolean isOn = bluetoothState == BluetoothAdapter.STATE_ON;
98 boolean isOff = bluetoothState == BluetoothAdapter.STATE_OFF;
120 case BluetoothAdapter.STATE_TURNING_ON:
123 case BluetoothAdapter.STATE_ON:
127 case BluetoothAdapter.STATE_TURNING_OFF
    [all...]
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
179 if (state == BluetoothAdapter.STATE_ON)
    [all...]
RequestPermissionActivity.java 23 import android.bluetooth.BluetoothAdapter;
82 && BluetoothAdapter.ACTION_STATE_CHANGED.equals(intent.getAction())) {
83 int state = intent.getIntExtra(BluetoothAdapter.EXTRA_STATE, BluetoothDevice.ERROR);
84 if (state == BluetoothAdapter.STATE_ON) {
106 case BluetoothAdapter.STATE_OFF:
107 case BluetoothAdapter.STATE_TURNING_OFF:
108 case BluetoothAdapter.STATE_TURNING_ON:
123 new IntentFilter(BluetoothAdapter.ACTION_STATE_CHANGED));
131 intent.putExtra(BluetoothAdapter.EXTRA_DISCOVERABLE_DURATION, mTimeout);
136 case BluetoothAdapter.STATE_ON
    [all...]
BluetoothDiscoverableEnabler.java 19 import android.bluetooth.BluetoothAdapter;
74 if (BluetoothAdapter.ACTION_SCAN_MODE_CHANGED.equals(intent.getAction())) {
75 int mode = intent.getIntExtra(BluetoothAdapter.EXTRA_SCAN_MODE,
76 BluetoothAdapter.ERROR);
77 if (mode != BluetoothAdapter.ERROR) {
105 IntentFilter filter = new IntentFilter(BluetoothAdapter.ACTION_SCAN_MODE_CHANGED);
136 mLocalAdapter.setScanMode(BluetoothAdapter.SCAN_MODE_CONNECTABLE_DISCOVERABLE, timeout);
139 mLocalAdapter.setScanMode(BluetoothAdapter.SCAN_MODE_CONNECTABLE);
241 if (mode == BluetoothAdapter.SCAN_MODE_CONNECTABLE_DISCOVERABLE) {
260 if (mode != BluetoothAdapter.SCAN_MODE_CONNECTABLE_DISCOVERABLE)
    [all...]
DockEventReceiver.java 21 import android.bluetooth.BluetoothAdapter;
52 BluetoothAdapter.EXTRA_STATE, EXTRA_INVALID));
107 } else if (BluetoothAdapter.ACTION_STATE_CHANGED.equals(intent.getAction())) {
108 int btState = intent.getIntExtra(BluetoothAdapter.EXTRA_STATE, BluetoothAdapter.ERROR);
109 if (btState != BluetoothAdapter.STATE_TURNING_ON) {
BluetoothNameDialogFragment.java 22 import android.bluetooth.BluetoothAdapter;
72 if (action.equals(BluetoothAdapter.ACTION_LOCAL_NAME_CHANGED)) {
74 } else if (action.equals(BluetoothAdapter.ACTION_STATE_CHANGED) &&
75 (intent.getIntExtra(BluetoothAdapter.EXTRA_STATE, BluetoothAdapter.ERROR) ==
76 BluetoothAdapter.STATE_ON)) {
165 filter.addAction(BluetoothAdapter.ACTION_STATE_CHANGED);
166 filter.addAction(BluetoothAdapter.ACTION_LOCAL_NAME_CHANGED);
  /packages/apps/Settings/tests/src/com/android/settings/tests/
BluetoothRequestPermissionTest.java 20 import android.bluetooth.BluetoothAdapter;
36 BluetoothAdapter mAdapter;
68 mAdapter = BluetoothAdapter.getDefaultAdapter();
90 filter.addAction(BluetoothAdapter.ACTION_DISCOVERY_STARTED);
91 filter.addAction(BluetoothAdapter.ACTION_DISCOVERY_FINISHED);
92 filter.addAction(BluetoothAdapter.ACTION_STATE_CHANGED);
102 i.setAction(BluetoothAdapter.ACTION_REQUEST_ENABLE);
105 i.setAction(BluetoothAdapter.ACTION_REQUEST_DISCOVERABLE);
106 i.putExtra(BluetoothAdapter.EXTRA_DISCOVERABLE_DURATION, 20);
144 if (BluetoothAdapter.ACTION_STATE_CHANGED.equals(action))
    [all...]
  /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...]
ConnectionAccessServerActivity.java 23 import android.bluetooth.BluetoothAdapter;
47 private BluetoothAdapter mBluetoothAdapter;
82 mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter();
86 Intent intent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);
115 BluetoothAdapter.SCAN_MODE_CONNECTABLE_DISCOVERABLE) {
116 Intent intent = new Intent(BluetoothAdapter.ACTION_REQUEST_DISCOVERABLE);
117 intent.putExtra(BluetoothAdapter.EXTRA_DISCOVERABLE_DURATION, 30);
DevicePickerActivity.java 23 import android.bluetooth.BluetoothAdapter;
54 private BluetoothAdapter mBluetoothAdapter;
87 IntentFilter filter = new IntentFilter(BluetoothAdapter.ACTION_DISCOVERY_STARTED);
88 filter.addAction(BluetoothAdapter.ACTION_DISCOVERY_FINISHED);
100 mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter();
104 Intent intent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);
183 if (BluetoothAdapter.ACTION_DISCOVERY_STARTED.equals(intent.getAction())) {
186 } else if (BluetoothAdapter.ACTION_DISCOVERY_FINISHED.equals(intent.getAction())) {
  /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();
  /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);
140 if (action.equals(BluetoothAdapter.ACTION_STATE_CHANGED)) {
141 switch (intent.getIntExtra(BluetoothAdapter.EXTRA_STATE, BluetoothAdapter.ERROR)) {
142 case BluetoothAdapter.STATE_ON:
  /frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/phone/
PhoneStatusBarPolicy.java 20 import android.bluetooth.BluetoothAdapter;
121 else if (action.equals(BluetoothAdapter.ACTION_STATE_CHANGED) ||
122 action.equals(BluetoothAdapter.ACTION_CONNECTION_STATE_CHANGED)) {
146 filter.addAction(BluetoothAdapter.ACTION_STATE_CHANGED);
147 filter.addAction(BluetoothAdapter.ACTION_CONNECTION_STATE_CHANGED);
166 BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter();
169 mBluetoothEnabled = (adapter.getState() == BluetoothAdapter.STATE_ON);
170 if (adapter.getConnectionState() == BluetoothAdapter.STATE_CONNECTED) {
260 if (action.equals(BluetoothAdapter.ACTION_STATE_CHANGED))
    [all...]
  /frameworks/base/core/java/android/bluetooth/
BluetoothAudioGateway.java 52 private final BluetoothAdapter mAdapter;
57 public BluetoothAudioGateway(BluetoothAdapter adapter) {
61 public BluetoothAudioGateway(BluetoothAdapter adapter, int handsfreeAgRfcommChannel,
76 public BluetoothAdapter mAdapter;
80 IncomingConnectionInfo(BluetoothAdapter adapter, BluetoothDevice remoteDevice,
  /packages/apps/Nfc/src/com/android/nfc/handover/
BluetoothOppHandover.java 3 import android.bluetooth.BluetoothAdapter;
93 IntentFilter filter = new IntentFilter(BluetoothAdapter.ACTION_STATE_CHANGED);
142 if (BluetoothAdapter.ACTION_STATE_CHANGED.equals(action) && mState == STATE_TURNING_ON) {
143 int state = intent.getIntExtra(BluetoothAdapter.EXTRA_STATE, BluetoothAdapter.ERROR);
144 if (state == BluetoothAdapter.STATE_ON) {
153 } else if (state == BluetoothAdapter.STATE_OFF) {
  /frameworks/base/core/java/android/server/
BluetoothAdapterStateMachine.java 19 import android.bluetooth.BluetoothAdapter;
140 // this is the BluetoothAdapter state that reported externally
155 BluetoothAdapter bluetoothAdapter) {
159 mEventLoop = new BluetoothEventLoop(context, bluetoothAdapter, bluetoothService, this);
176 mPublicState = BluetoothAdapter.STATE_OFF;
196 broadcastState(BluetoothAdapter.STATE_TURNING_ON);
208 broadcastState(BluetoothAdapter.STATE_OFF);
219 broadcastState(BluetoothAdapter.STATE_TURNING_ON);
228 broadcastState(BluetoothAdapter.STATE_OFF)
    [all...]

Completed in 1027 milliseconds

1 2 3 4