From 2b735a548feba04cc584ff34439a1552f8264d69 Mon Sep 17 00:00:00 2001 From: Rahul Sabnis Date: Wed, 24 Mar 2021 00:19:00 -0700 Subject: Remove BluetoothHeadset#setPriority which was deprecated in Android 11 Tag: #feature Bug: 183551808 Test: Manual Change-Id: I88745589ec66d3060d24b530fe49fea8926726c6 --- core/api/system-current.txt | 1 - core/api/system-removed.txt | 8 ++++++++ core/java/android/bluetooth/BluetoothHeadset.java | 1 + 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/core/api/system-current.txt b/core/api/system-current.txt index 86f1eaeea3ad..c9a117042e96 100644 --- a/core/api/system-current.txt +++ b/core/api/system-current.txt @@ -1533,7 +1533,6 @@ package android.bluetooth { method @RequiresPermission(android.Manifest.permission.BLUETOOTH_ADMIN) public boolean disconnect(android.bluetooth.BluetoothDevice); method @RequiresPermission(android.Manifest.permission.BLUETOOTH_PRIVILEGED) public int getConnectionPolicy(@NonNull android.bluetooth.BluetoothDevice); method @RequiresPermission(android.Manifest.permission.BLUETOOTH_PRIVILEGED) public boolean setConnectionPolicy(@NonNull android.bluetooth.BluetoothDevice, int); - method @Deprecated @RequiresPermission(android.Manifest.permission.BLUETOOTH_ADMIN) public boolean setPriority(android.bluetooth.BluetoothDevice, int); } public final class BluetoothHearingAid implements android.bluetooth.BluetoothProfile { diff --git a/core/api/system-removed.txt b/core/api/system-removed.txt index 0c02c43b1084..8895494e01d3 100644 --- a/core/api/system-removed.txt +++ b/core/api/system-removed.txt @@ -48,6 +48,14 @@ package android.app.prediction { } +package android.bluetooth { + + public final class BluetoothHeadset implements android.bluetooth.BluetoothProfile { + method @Deprecated @RequiresPermission(android.Manifest.permission.BLUETOOTH_ADMIN) public boolean setPriority(android.bluetooth.BluetoothDevice, int); + } + +} + package android.content { public class Intent implements java.lang.Cloneable android.os.Parcelable { diff --git a/core/java/android/bluetooth/BluetoothHeadset.java b/core/java/android/bluetooth/BluetoothHeadset.java index 4fb557780d04..632572dea3c6 100644 --- a/core/java/android/bluetooth/BluetoothHeadset.java +++ b/core/java/android/bluetooth/BluetoothHeadset.java @@ -567,6 +567,7 @@ public final class BluetoothHeadset implements BluetoothProfile { * @return true if priority is set, false on error * @hide * @deprecated Replaced with {@link #setConnectionPolicy(BluetoothDevice, int)} + * @removed */ @Deprecated @SystemApi -- cgit v1.2.3-59-g8ed1b