diff options
author | Scott Lobdell <slobdell@google.com> | 2022-03-12 18:29:42 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2022-03-12 18:29:42 +0000 |
commit | a1ee0132fb60762afd5e6a2d8259cec2a549aea3 (patch) | |
tree | fb076df85657d65472d1e6e373161849d7998882 /framework/java/android/bluetooth/BluetoothDevice.java | |
parent | 8aa895da9cff3e56e056b033afb94bd017e29682 (diff) | |
parent | d29385cb9c32992e7a12c16521fc306ba44de206 (diff) |
Merge changes from topic "TP1A.220225.003" into t-keystone-qcom-dev
* changes:
Disable call to Process.getPidsForCommand().
Merge TP1A.220225.003
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(); |