summaryrefslogtreecommitdiff
path: root/framework/java/android/bluetooth/BluetoothDevice.java
diff options
context:
space:
mode:
authorWilliam Escande <wescande@google.com>2022-02-08 15:49:43 +0100
committerWilliam Escande <wescande@google.com>2022-02-08 20:01:58 +0100
commitdd30037e722996d0f3ca3e10631d519e9f0bd681 (patch)
tree55b4a39d46409923b247333f1c33af18077ba9ed /framework/java/android/bluetooth/BluetoothDevice.java
parent5f48c3a4c824d86b7fef31eb02722ad5c2609957 (diff)
Remove duplicate method exposure
This partially revert ag/16736843 as there is already the cancelBondProces exposed as systemAPI Bug: 217352944 Test: Build Tag: #refactor Ignore-AOSP-First: api is not expose on aosp Change-Id: I92007320df801df53e797873048b654cf376ed31
Diffstat (limited to 'framework/java/android/bluetooth/BluetoothDevice.java')
-rw-r--r--framework/java/android/bluetooth/BluetoothDevice.java33
1 files changed, 0 insertions, 33 deletions
diff --git a/framework/java/android/bluetooth/BluetoothDevice.java b/framework/java/android/bluetooth/BluetoothDevice.java
index ba265e473e..95e9abc37b 100644
--- a/framework/java/android/bluetooth/BluetoothDevice.java
+++ b/framework/java/android/bluetooth/BluetoothDevice.java
@@ -2321,39 +2321,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();