diff options
author | Rahul Sabnis <rahulsabnis@google.com> | 2021-11-24 16:24:15 -0800 |
---|---|---|
committer | Rahul Sabnis <rahulsabnis@google.com> | 2021-12-02 11:22:36 -0800 |
commit | 7d8bba4d531c96586f0ef3fb1f325d4fc663ccd8 (patch) | |
tree | 8609792d5043b805ffd9ba26f9d4c82a648fe564 /framework/java/android/bluetooth/BluetoothHeadset.java | |
parent | 6f50489a1c02c68f3a1f14a931d18e587629c65c (diff) |
Complete hard removal of BluetoothHeadset#setPriority system API that
was deprecated in 11 and soft removed in 12
Tag: #feature
Bug: 207702651
Test: Manual
Change-Id: I4dd938e0b6c6394e105deeeaee75f6a5d52f2dbf
Diffstat (limited to 'framework/java/android/bluetooth/BluetoothHeadset.java')
-rw-r--r-- | framework/java/android/bluetooth/BluetoothHeadset.java | 43 |
1 files changed, 0 insertions, 43 deletions
diff --git a/framework/java/android/bluetooth/BluetoothHeadset.java b/framework/java/android/bluetooth/BluetoothHeadset.java index c0463243f4..8212eaa4e4 100644 --- a/framework/java/android/bluetooth/BluetoothHeadset.java +++ b/framework/java/android/bluetooth/BluetoothHeadset.java @@ -601,49 +601,6 @@ public final class BluetoothHeadset implements BluetoothProfile { } /** - * Set priority of the profile - * - * <p> The device should already be paired. - * Priority can be one of {@link BluetoothProfile#PRIORITY_ON} or - * {@link BluetoothProfile#PRIORITY_OFF} - * - * @param device Paired bluetooth device - * @param priority - * @return true if priority is set, false on error - * @hide - * @deprecated Replaced with {@link #setConnectionPolicy(BluetoothDevice, int)} - * @removed - */ - @Deprecated - @SystemApi - @RequiresLegacyBluetoothAdminPermission - @RequiresBluetoothConnectPermission - @RequiresPermission(allOf = { - android.Manifest.permission.BLUETOOTH_CONNECT, - android.Manifest.permission.MODIFY_PHONE_STATE, - }) - public boolean setPriority(BluetoothDevice device, int priority) { - if (DBG) log("setPriority(" + device + ", " + priority + ")"); - final IBluetoothHeadset service = mService; - if (service != null && isEnabled() && isValidDevice(device)) { - if (priority != BluetoothProfile.PRIORITY_OFF - && priority != BluetoothProfile.PRIORITY_ON) { - return false; - } - try { - return service.setPriority( - device, BluetoothAdapter.priorityToConnectionPolicy(priority), - mAttributionSource); - } catch (RemoteException e) { - Log.e(TAG, Log.getStackTraceString(new Throwable())); - return false; - } - } - if (service == null) Log.w(TAG, "Proxy not attached to service"); - return false; - } - - /** * Set connection policy of the profile * * <p> The device should already be paired. |