Searched refs:bluetoothAdapter (Results 1 – 8 of 8) sorted by relevance
95 public static boolean enableAdapter(BluetoothAdapter bluetoothAdapter, Context context) { in enableAdapter() argument101 if (bluetoothAdapter.isEnabled()) return true; in enableAdapter()103 invokeWithShellPermissions(() -> bluetoothAdapter.enable()); in enableAdapter()107 while (!bluetoothAdapter.isEnabled()) { in enableAdapter()120 return bluetoothAdapter.isEnabled(); in enableAdapter()124 public static boolean disableAdapter(BluetoothAdapter bluetoothAdapter, Context context) { in disableAdapter() argument130 if (bluetoothAdapter.getState() == BluetoothAdapter.STATE_OFF) return true; in disableAdapter()132 invokeWithShellPermissions(() -> bluetoothAdapter.disable()); in disableAdapter()136 while (bluetoothAdapter.getState() != BluetoothAdapter.STATE_OFF) { in disableAdapter()149 return bluetoothAdapter.getState() == BluetoothAdapter.STATE_OFF; in disableAdapter()
41 BluetoothAdapter bluetoothAdapter = BluetoothAdapter.getDefaultAdapter(); in onCreate() local42 if (bluetoothAdapter == null) { in onCreate()64 } else if (!bluetoothAdapter.isMultipleAdvertisementSupported()) { in onCreate()
36 BluetoothAdapter bluetoothAdapter = BluetoothAdapter.getDefaultAdapter(); in onCreate() local37 assertNotNull(bluetoothAdapter); in onCreate()39 bluetoothAdapter.getRemoteDevice("00:11:22:33:AA:BB")); in onCreate()
50 BluetoothAdapter bluetoothAdapter = bluetoothManager.getAdapter(); in onCreate() local57 && !bluetoothAdapter.isEnabled()) in onCreate()59 && bluetoothAdapter.isEnabled())) { in onCreate()
63 final BluetoothAdapter bluetoothAdapter = BluetoothAdapter.getDefaultAdapter(); in testPocCVE_2024_34719() local71 return bluetoothService.get(bluetoothAdapter) != null; in testPocCVE_2024_34719()82 final IBinder binder = ((IInterface) bluetoothService.get(bluetoothAdapter)).asBinder(); in testPocCVE_2024_34719()
52 BluetoothAdapter bluetoothAdapter = bluetoothManager.getAdapter(); in onCreate() local54 && !bluetoothAdapter.isEnabled()) in onCreate()56 && bluetoothAdapter.isEnabled())) { in onCreate()
51 BluetoothAdapter bluetoothAdapter = bluetoothManager.getAdapter(); in onResume() local53 && !bluetoothAdapter.isEnabled()) in onResume()55 && bluetoothAdapter.isEnabled())) { in onResume()
83 private val bluetoothAdapter: BluetoothAdapter = bluetoothManager.adapter in <lambda>() constant in android.companion.cts.uiautomation.UiAutomationTestBase380 bluetoothWasEnabled = bluetoothAdapter.isEnabled in <lambda>()384 bluetoothAdapter.isEnabled in <lambda>()394 !bluetoothAdapter.isEnabled in <lambda>()