diff options
author | Scott Lobdell <slobdell@google.com> | 2022-03-11 19:27:17 +0000 |
---|---|---|
committer | Scott Lobdell <slobdell@google.com> | 2022-03-11 19:57:09 +0000 |
commit | c9218ef1b82430a07d94f74c212a30e7ccc52975 (patch) | |
tree | 241b7fdeb6bdf1cf3af925ba8996f18faa8973d9 /framework/java/android/bluetooth/BluetoothDevice.java | |
parent | a26bda4d37221f2f7ef750b413502091e3bcddd4 (diff) | |
parent | 480d2270b269a0e47bf475eb439111f3f966e2a9 (diff) |
Merge TP1A.220225.003
Change-Id: Id71ac466dbfe3707fe2e544ce22b1da8f474ec2b
Diffstat (limited to 'framework/java/android/bluetooth/BluetoothDevice.java')
-rw-r--r-- | framework/java/android/bluetooth/BluetoothDevice.java | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/framework/java/android/bluetooth/BluetoothDevice.java b/framework/java/android/bluetooth/BluetoothDevice.java index 2b335abc84..9caed4ccac 100644 --- a/framework/java/android/bluetooth/BluetoothDevice.java +++ b/framework/java/android/bluetooth/BluetoothDevice.java @@ -2545,39 +2545,6 @@ public final class BluetoothDevice implements Parcelable, Attributable { return defaultValue; } - /** - * Cancels pairing to this device - * - * @return true if pairing cancelled successfully, false otherwise - * - * @hide - */ - @SystemApi - @RequiresLegacyBluetoothAdminPermission - @RequiresBluetoothConnectPermission - @RequiresPermission(allOf = { - android.Manifest.permission.BLUETOOTH_CONNECT, - android.Manifest.permission.BLUETOOTH_PRIVILEGED, - }) - public boolean cancelPairing() { - if (DBG) log("cancelPairing()"); - final IBluetooth service = sService; - final boolean defaultValue = false; - if (service == null) { - Log.e(TAG, "BT not enabled. Cannot cancel pairing"); - if (DBG) log(Log.getStackTraceString(new Throwable())); - } else { - try { - final SynchronousResultReceiver<Boolean> recv = new SynchronousResultReceiver(); - service.cancelBondProcess(this, mAttributionSource, recv); - return recv.awaitResultNoInterrupt(getSyncTimeout()).getValue(defaultValue); - } catch (RemoteException | TimeoutException e) { - Log.e(TAG, e.toString() + "\n" + Log.getStackTraceString(new Throwable())); - } - } - return defaultValue; - } - boolean isBluetoothEnabled() { boolean ret = false; BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter(); |