aboutsummaryrefslogtreecommitdiff
path: root/framework/java/android/bluetooth/BluetoothAdapter.java
diff options
context:
space:
mode:
authorRahul Sabnis <rahulsabnis@google.com>2021-09-30 18:45:08 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2021-09-30 18:45:08 +0000
commit91a494d1d0f618aef7831bd0b545a54213f969d0 (patch)
treeff9a962a814b22edf05c20b4ad37a75d1493d159 /framework/java/android/bluetooth/BluetoothAdapter.java
parent17e3dda4bd930ccb948d82094b26f95961115464 (diff)
parent26deee6e2dd765af375ad54fa9c40c0a4c4df072 (diff)
Merge "Add BluetoothDevice#connect and BluetoothDevice#disconnect as System APIs" into stage-aosp-master am: 4a39b54ec1 am: b3f3826bd6 am: 26deee6e2d
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15936310 Change-Id: Ia70cd735636ac8311878d30e181aa3d1bca9a289
Diffstat (limited to 'framework/java/android/bluetooth/BluetoothAdapter.java')
-rw-r--r--framework/java/android/bluetooth/BluetoothAdapter.java65
1 files changed, 0 insertions, 65 deletions
diff --git a/framework/java/android/bluetooth/BluetoothAdapter.java b/framework/java/android/bluetooth/BluetoothAdapter.java
index 0783fccbae..06979ecdd4 100644
--- a/framework/java/android/bluetooth/BluetoothAdapter.java
+++ b/framework/java/android/bluetooth/BluetoothAdapter.java
@@ -2005,71 +2005,6 @@ public final class BluetoothAdapter {
}
/**
- * Connects all enabled and supported bluetooth profiles between the local and remote device.
- * Connection is asynchronous and you should listen to each profile's broadcast intent
- * ACTION_CONNECTION_STATE_CHANGED to verify whether connection was successful. For example,
- * to verify a2dp is connected, you would listen for
- * {@link BluetoothA2dp#ACTION_CONNECTION_STATE_CHANGED}
- *
- * @param device is the remote device with which to connect these profiles
- * @return true if message sent to try to connect all profiles, false if an error occurred
- *
- * @hide
- */
- @RequiresBluetoothConnectPermission
- @RequiresPermission(allOf = {
- android.Manifest.permission.BLUETOOTH_CONNECT,
- android.Manifest.permission.BLUETOOTH_PRIVILEGED,
- android.Manifest.permission.MODIFY_PHONE_STATE,
- })
- public boolean connectAllEnabledProfiles(@NonNull BluetoothDevice device) {
- try {
- mServiceLock.readLock().lock();
- if (mService != null) {
- return mService.connectAllEnabledProfiles(device, mAttributionSource);
- }
- } catch (RemoteException e) {
- Log.e(TAG, "", e);
- } finally {
- mServiceLock.readLock().unlock();
- }
-
- return false;
- }
-
- /**
- * Disconnects all enabled and supported bluetooth profiles between the local and remote device.
- * Disconnection is asynchronous and you should listen to each profile's broadcast intent
- * ACTION_CONNECTION_STATE_CHANGED to verify whether disconnection was successful. For example,
- * to verify a2dp is disconnected, you would listen for
- * {@link BluetoothA2dp#ACTION_CONNECTION_STATE_CHANGED}
- *
- * @param device is the remote device with which to disconnect these profiles
- * @return true if message sent to try to disconnect all profiles, false if an error occurred
- *
- * @hide
- */
- @RequiresBluetoothConnectPermission
- @RequiresPermission(allOf = {
- android.Manifest.permission.BLUETOOTH_CONNECT,
- android.Manifest.permission.BLUETOOTH_PRIVILEGED,
- })
- public boolean disconnectAllEnabledProfiles(@NonNull BluetoothDevice device) {
- try {
- mServiceLock.readLock().lock();
- if (mService != null) {
- return mService.disconnectAllEnabledProfiles(device, mAttributionSource);
- }
- } catch (RemoteException e) {
- Log.e(TAG, "", e);
- } finally {
- mServiceLock.readLock().unlock();
- }
-
- return false;
- }
-
- /**
* Return true if the multi advertisement is supported by the chipset
*
* @return true if Multiple Advertisement feature is supported