diff options
author | William Escande <wescande@google.com> | 2022-02-08 15:49:43 +0100 |
---|---|---|
committer | William Escande <wescande@google.com> | 2022-02-14 17:54:47 +0000 |
commit | 7ee7826407067da09b290ff73585fc1e4b85810f (patch) | |
tree | 8db47430acd380faff53132ff892b47d64bfcc72 /framework/java/android/bluetooth/BluetoothDevice.java | |
parent | 9c060ea2a01c07dfffba5d5cc56c010eae4e2db1 (diff) |
Remove duplicate method exposure
Bug: 217352944
Test: Build
Tag: #refactor
Merged-In: I92007320df801df53e797873048b654cf376ed31
Change-Id: I92007320df801df53e797873048b654cf376ed31
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 ab8eaa66da..170e8469b0 100644 --- a/framework/java/android/bluetooth/BluetoothDevice.java +++ b/framework/java/android/bluetooth/BluetoothDevice.java @@ -2316,39 +2316,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(); |