summaryrefslogtreecommitdiff
path: root/core/java/android/bluetooth/BluetoothDevice.java
diff options
context:
space:
mode:
authorMathew Inwood <mathewi@google.com>2020-10-27 11:47:29 +0000
committerMathew Inwood <mathewi@google.com>2020-10-27 15:46:07 +0000
commit72f07d6a8a32db4a0dedd7682a0b3385be2b9cd6 (patch)
treeb63a80a2c05239699b1600245ad2648d8ac98102 /core/java/android/bluetooth/BluetoothDevice.java
parent69bca6a5132e9e00dd069ab4c2e1e17d892fab7d (diff)
Add maxTargetSdk restriction to unused APIs.
These are APIs that have @UnsupportedAppUsage but for which we don't have any evidence of them currently being used, so should be safe to remove from the unsupported list. Bug: 170729553 Test: Treehugger Change-Id: I4c8fd0006f950de9955242e93968fb0996ceb372
Diffstat (limited to 'core/java/android/bluetooth/BluetoothDevice.java')
-rw-r--r--core/java/android/bluetooth/BluetoothDevice.java25
1 files changed, 13 insertions, 12 deletions
diff --git a/core/java/android/bluetooth/BluetoothDevice.java b/core/java/android/bluetooth/BluetoothDevice.java
index 1b0fe9dc2d78..3b8dec7bf955 100644
--- a/core/java/android/bluetooth/BluetoothDevice.java
+++ b/core/java/android/bluetooth/BluetoothDevice.java
@@ -28,6 +28,7 @@ import android.annotation.SystemApi;
import android.app.PropertyInvalidatedCache;
import android.compat.annotation.UnsupportedAppUsage;
import android.content.Context;
+import android.os.Build;
import android.os.Handler;
import android.os.Parcel;
import android.os.ParcelUuid;
@@ -369,7 +370,7 @@ public final class BluetoothDevice implements Parcelable {
/** @hide */
@SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION)
- @UnsupportedAppUsage
+ @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553)
public static final String ACTION_SDP_RECORD =
"android.bluetooth.device.action.SDP_RECORD";
@@ -665,7 +666,7 @@ public final class BluetoothDevice implements Parcelable {
*
* @hide
*/
- @UnsupportedAppUsage
+ @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553)
public static final int UNBOND_REASON_AUTH_FAILED = 1;
/**
@@ -674,7 +675,7 @@ public final class BluetoothDevice implements Parcelable {
*
* @hide
*/
- @UnsupportedAppUsage
+ @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553)
public static final int UNBOND_REASON_AUTH_REJECTED = 2;
/**
@@ -689,7 +690,7 @@ public final class BluetoothDevice implements Parcelable {
*
* @hide
*/
- @UnsupportedAppUsage
+ @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553)
public static final int UNBOND_REASON_REMOTE_DEVICE_DOWN = 4;
/**
@@ -697,7 +698,7 @@ public final class BluetoothDevice implements Parcelable {
*
* @hide
*/
- @UnsupportedAppUsage
+ @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553)
public static final int UNBOND_REASON_DISCOVERY_IN_PROGRESS = 5;
/**
@@ -705,7 +706,7 @@ public final class BluetoothDevice implements Parcelable {
*
* @hide
*/
- @UnsupportedAppUsage
+ @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553)
public static final int UNBOND_REASON_AUTH_TIMEOUT = 6;
/**
@@ -713,7 +714,7 @@ public final class BluetoothDevice implements Parcelable {
*
* @hide
*/
- @UnsupportedAppUsage
+ @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553)
public static final int UNBOND_REASON_REPEATED_ATTEMPTS = 7;
/**
@@ -722,7 +723,7 @@ public final class BluetoothDevice implements Parcelable {
*
* @hide
*/
- @UnsupportedAppUsage
+ @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553)
public static final int UNBOND_REASON_REMOTE_AUTH_CANCELED = 8;
/**
@@ -801,7 +802,7 @@ public final class BluetoothDevice implements Parcelable {
"android.bluetooth.device.extra.SDP_RECORD";
/** @hide */
- @UnsupportedAppUsage
+ @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553)
public static final String EXTRA_SDP_SEARCH_STATUS =
"android.bluetooth.device.extra.SDP_SEARCH_STATUS";
@@ -1134,7 +1135,7 @@ public final class BluetoothDevice implements Parcelable {
* @return true on success, false on error
* @hide
*/
- @UnsupportedAppUsage
+ @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553)
@RequiresPermission(Manifest.permission.BLUETOOTH)
public boolean setAlias(@NonNull String alias) {
final IBluetooth service = sService;
@@ -1573,7 +1574,7 @@ public final class BluetoothDevice implements Parcelable {
* @return true pin has been set false for error
* @hide
*/
- @UnsupportedAppUsage
+ @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553)
@RequiresPermission(Manifest.permission.BLUETOOTH_ADMIN)
public boolean setPin(@NonNull String pin) {
byte[] pinBytes = convertPinToBytes(pin);
@@ -2187,7 +2188,7 @@ public final class BluetoothDevice implements Parcelable {
* operations.
* @hide
*/
- @UnsupportedAppUsage
+ @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553)
public BluetoothGatt connectGatt(Context context, boolean autoConnect,
BluetoothGattCallback callback, int transport,
boolean opportunistic, int phy, Handler handler) {