summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Hansong Zhang <hsz@google.com> 2018-03-28 12:56:05 -0700
committer Myles Watson <mylesgw@google.com> 2018-03-28 23:18:54 +0000
commit4b410fa9f9a2f5a6ce3dc5cc6547a2b25fa49e0c (patch)
treefd5b0fc40004fc8fb00d60ec1f2fe1693b8a1320
parent631f55ba540651744d6e9856fac70d77b50dfefa (diff)
Bluetooth HIDD: Remove unplug()
Remove the hidden unplug() API because it is not used and it can cause the remote device to be unpaired. System apps should use unbond() and user apps should not use reflection to invoke it. Bug: 67866553 Test: SL4A Change-Id: I1bdc06dbb5460c9fd52230b78cbf9434a4349d24 (cherry picked from commit dbc6d14f6ec399e63cee29adbe01fffcb166500f)
-rw-r--r--core/java/android/bluetooth/BluetoothHidDevice.java23
1 files changed, 0 insertions, 23 deletions
diff --git a/core/java/android/bluetooth/BluetoothHidDevice.java b/core/java/android/bluetooth/BluetoothHidDevice.java
index cb1d1062681f..af99bf7dfd8e 100644
--- a/core/java/android/bluetooth/BluetoothHidDevice.java
+++ b/core/java/android/bluetooth/BluetoothHidDevice.java
@@ -701,29 +701,6 @@ public final class BluetoothHidDevice implements BluetoothProfile {
}
/**
- * Sends Virtual Cable Unplug to currently connected host.
- *
- * @return
- * {@hide}
- */
- public boolean unplug(BluetoothDevice device) {
- boolean result = false;
-
- final IBluetoothHidDevice service = mService;
- if (service != null) {
- try {
- result = service.unplug(device);
- } catch (RemoteException e) {
- Log.e(TAG, e.toString());
- }
- } else {
- Log.w(TAG, "Proxy not attached to service");
- }
-
- return result;
- }
-
- /**
* Initiates connection to host which is currently paired with this device. If the application
* is not registered, #connect(BluetoothDevice) will fail. The connection state should be
* tracked by the application by handling callback from Callback#onConnectionStateChanged. The