/cts/tests/tests/bluetooth/src/android/bluetooth/cts/ |
BasicAdapterTest.java | 19 import android.bluetooth.BluetoothAdapter; 25 * BluetoothAdapter}. 35 assertNotNull(BluetoothAdapter.getDefaultAdapter()); 40 assertFalse(BluetoothAdapter.checkBluetoothAddress(null)); 43 assertFalse(BluetoothAdapter.checkBluetoothAddress("")); 44 assertFalse(BluetoothAdapter.checkBluetoothAddress("0")); 45 assertFalse(BluetoothAdapter.checkBluetoothAddress("00")); 46 assertFalse(BluetoothAdapter.checkBluetoothAddress("00:")); 47 assertFalse(BluetoothAdapter.checkBluetoothAddress("00:0")); 48 assertFalse(BluetoothAdapter.checkBluetoothAddress("00:00")) [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)) {
|
/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...] |
/packages/apps/Settings/src/com/android/settings/bluetooth/ |
BluetoothNamePreference.java | 22 import android.bluetooth.BluetoothAdapter; 52 if (action.equals(BluetoothAdapter.ACTION_LOCAL_NAME_CHANGED)) { 54 } else if (action.equals(BluetoothAdapter.ACTION_STATE_CHANGED) && 55 (intent.getIntExtra(BluetoothAdapter.EXTRA_STATE, BluetoothAdapter.ERROR) == 56 BluetoothAdapter.STATE_ON)) { 72 filter.addAction(BluetoothAdapter.ACTION_STATE_CHANGED); 73 filter.addAction(BluetoothAdapter.ACTION_LOCAL_NAME_CHANGED); 98 BluetoothAdapter adapter = mLocalManager.getBluetoothAdapter(); 106 BluetoothAdapter adapter = mLocalManager.getBluetoothAdapter() [all...] |
BluetoothEnabler.java | 22 import android.bluetooth.BluetoothAdapter; 48 int state = intent.getIntExtra(BluetoothAdapter.EXTRA_STATE, BluetoothAdapter.ERROR); 64 mIntentFilter = new IntentFilter(BluetoothAdapter.ACTION_STATE_CHANGED); 108 case BluetoothAdapter.STATE_TURNING_ON: 112 case BluetoothAdapter.STATE_ON: 117 case BluetoothAdapter.STATE_TURNING_OFF: 121 case BluetoothAdapter.STATE_OFF:
|
BluetoothDiscoverableEnabler.java | 21 import android.bluetooth.BluetoothAdapter; 56 if (BluetoothAdapter.ACTION_SCAN_MODE_CHANGED.equals(intent.getAction())) { 57 int mode = intent.getIntExtra(BluetoothAdapter.EXTRA_SCAN_MODE, 58 BluetoothAdapter.ERROR); 59 if (mode != BluetoothAdapter.ERROR) { 91 IntentFilter filter = new IntentFilter(BluetoothAdapter.ACTION_SCAN_MODE_CHANGED); 116 BluetoothAdapter manager = mLocalManager.getBluetoothAdapter(); 129 manager.setScanMode(BluetoothAdapter.SCAN_MODE_CONNECTABLE_DISCOVERABLE); 131 manager.setScanMode(BluetoothAdapter.SCAN_MODE_CONNECTABLE); 151 if (mode == BluetoothAdapter.SCAN_MODE_CONNECTABLE_DISCOVERABLE) [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) { 105 case BluetoothAdapter.STATE_OFF: 106 case BluetoothAdapter.STATE_TURNING_OFF: 107 case BluetoothAdapter.STATE_TURNING_ON: 122 new IntentFilter(BluetoothAdapter.ACTION_STATE_CHANGED)); 130 i.putExtra(BluetoothAdapter.EXTRA_DISCOVERABLE_DURATION, mTimeout); 135 case BluetoothAdapter.STATE_ON [all...] |
LocalBluetoothManager.java | 24 import android.bluetooth.BluetoothAdapter; 58 private BluetoothAdapter mAdapter; 64 private int mState = BluetoothAdapter.ERROR; 111 mAdapter = BluetoothAdapter.getDefaultAdapter(); 126 public BluetoothAdapter getBluetoothAdapter() { 212 if (mState == BluetoothAdapter.ERROR) { 221 if (state == BluetoothAdapter.STATE_ON || 222 state == BluetoothAdapter.STATE_OFF) { 224 BluetoothAdapter.STATE_ON); 233 ? BluetoothAdapter.STATE_O [all...] |
RequestPermissionHelperActivity.java | 24 import android.bluetooth.BluetoothAdapter; 101 } while (btState == BluetoothAdapter.STATE_TURNING_OFF && --retryCount > 0); 106 if (btState == BluetoothAdapter.STATE_TURNING_ON 107 || btState == BluetoothAdapter.STATE_ON 132 mTimeout = intent.getIntExtra(BluetoothAdapter.EXTRA_DISCOVERABLE_DURATION,
|
DockEventReceiver.java | 23 import android.bluetooth.BluetoothAdapter; 56 BluetoothAdapter.EXTRA_STATE, EXTRA_INVALID)); 131 } else if (BluetoothAdapter.ACTION_STATE_CHANGED.equals(intent.getAction())) { 132 int btState = intent.getIntExtra(BluetoothAdapter.EXTRA_STATE, BluetoothAdapter.ERROR); 133 if (btState != BluetoothAdapter.STATE_TURNING_ON) {
|
BluetoothEventRedirector.java | 23 import android.bluetooth.BluetoothAdapter; 52 if (action.equals(BluetoothAdapter.ACTION_STATE_CHANGED)) { 53 int state = intent.getIntExtra(BluetoothAdapter.EXTRA_STATE, 54 BluetoothAdapter.ERROR); 56 } else if (action.equals(BluetoothAdapter.ACTION_DISCOVERY_STARTED)) { 60 } else if (action.equals(BluetoothAdapter.ACTION_DISCOVERY_FINISHED)) { 153 filter.addAction(BluetoothAdapter.ACTION_STATE_CHANGED); 156 filter.addAction(BluetoothAdapter.ACTION_DISCOVERY_STARTED); 157 filter.addAction(BluetoothAdapter.ACTION_DISCOVERY_FINISHED);
|
/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; 70 IntentFilter filter = new IntentFilter(BluetoothAdapter.ACTION_STATE_CHANGED); 128 if (action.equals(BluetoothAdapter.ACTION_STATE_CHANGED)) { 129 switch (intent.getIntExtra(BluetoothAdapter.EXTRA_STATE, BluetoothAdapter.ERROR)) { 130 case BluetoothAdapter.STATE_ON:
|
BluetoothOppBatch.java | 38 import android.bluetooth.BluetoothAdapter; 107 BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter();
|
BluetoothOppRfcommListener.java | 39 import android.bluetooth.BluetoothAdapter; 70 private final BluetoothAdapter mAdapter; 76 public BluetoothOppRfcommListener(BluetoothAdapter adapter) { 80 public BluetoothOppRfcommListener(BluetoothAdapter adapter, int channel) {
|
BluetoothOppTransferAdapter.java | 37 import android.bluetooth.BluetoothAdapter; 94 BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter();
|
/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,
|
HeadsetBase.java | 45 private final BluetoothAdapter mAdapter; 77 public HeadsetBase(PowerManager pm, BluetoothAdapter adapter, BluetoothDevice device, 93 public HeadsetBase(PowerManager pm, BluetoothAdapter adapter, BluetoothDevice device,
|
BluetoothAdapter.java | 39 * Represents the local device Bluetooth adapter. The {@link BluetoothAdapter} 46 * <p>To get a {@link BluetoothAdapter} representing the local Bluetooth 64 public final class BluetoothAdapter { 65 private static final String TAG = "BluetoothAdapter"; 72 * <p><code>Intent.getIntExtra(BluetoothAdapter.EXTRA_STATE, 73 * BluetoothAdapter.ERROR)</code> 289 private static BluetoothAdapter sAdapter; 301 public static synchronized BluetoothAdapter getDefaultAdapter() { 303 IBinder b = ServiceManager.getService(BluetoothAdapter.BLUETOOTH_SERVICE); 306 sAdapter = new BluetoothAdapter(service) [all...] |
/development/samples/BluetoothChat/src/com/example/android/BluetoothChat/ |
DeviceListActivity.java | 22 import android.bluetooth.BluetoothAdapter; 55 private BluetoothAdapter mBtAdapter; 99 filter = new IntentFilter(BluetoothAdapter.ACTION_DISCOVERY_FINISHED); 103 mBtAdapter = BluetoothAdapter.getDefaultAdapter(); 134 * Start device discover with the BluetoothAdapter 151 // Request discover from BluetoothAdapter 191 } else if (BluetoothAdapter.ACTION_DISCOVERY_FINISHED.equals(action)) {
|
BluetoothChat.java | 20 import android.bluetooth.BluetoothAdapter; 78 private BluetoothAdapter mBluetoothAdapter = null; 99 mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter(); 117 Intent enableIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE); 195 BluetoothAdapter.SCAN_MODE_CONNECTABLE_DISCOVERABLE) { 196 Intent discoverableIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_DISCOVERABLE); 197 discoverableIntent.putExtra(BluetoothAdapter.EXTRA_DISCOVERABLE_DURATION, 300);
|
/frameworks/base/core/java/android/server/ |
BluetoothService.java | 27 import android.bluetooth.BluetoothAdapter; 86 private BluetoothAdapter mAdapter; // constant after init() 173 mBluetoothState = BluetoothAdapter.STATE_OFF; 201 if (BluetoothAdapter.checkBluetoothAddress(dockAddress)) { 258 mAdapter = BluetoothAdapter.getDefaultAdapter(); 278 return mBluetoothState == BluetoothAdapter.STATE_ON; 303 case BluetoothAdapter.STATE_OFF: 305 case BluetoothAdapter.STATE_ON: 313 setBluetoothState(BluetoothAdapter.STATE_TURNING_OFF); 326 if (mBluetoothState != BluetoothAdapter.STATE_TURNING_OFF) [all...] |
/development/apps/BluetoothDebug/src/com/android/bluetoothdebug/ |
DebugReceiver.java | 20 import android.bluetooth.BluetoothAdapter;
|