summaryrefslogtreecommitdiff
path: root/framework/java/android/bluetooth/BluetoothDevice.java
diff options
context:
space:
mode:
authorMathew Inwood <mathewi@google.com>2020-11-04 09:29:36 +0000
committerMathew Inwood <mathewi@google.com>2020-11-04 09:45:53 +0000
commit049f0f5f4196aa3c1897bcbfd1a86c66ab1affcc (patch)
tree53e09578163e93a09a6b0913d62a4ab13828fc32 /framework/java/android/bluetooth/BluetoothDevice.java
parentabe939579993fca39d7798c8dafcfb7cce77fa17 (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 Merged-In: I626caf7c1fe46c5ab1f39c2895b42a34319f771a Change-Id: I54e5ecd11e76ca1de3c5893e3a98b0108e735413
Diffstat (limited to 'framework/java/android/bluetooth/BluetoothDevice.java')
-rw-r--r--framework/java/android/bluetooth/BluetoothDevice.java25
1 files changed, 13 insertions, 12 deletions
diff --git a/framework/java/android/bluetooth/BluetoothDevice.java b/framework/java/android/bluetooth/BluetoothDevice.java
index cf8cdd4ea9..0f864a81c1 100644
--- a/framework/java/android/bluetooth/BluetoothDevice.java
+++ b/framework/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;
@@ -349,7 +350,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";
@@ -645,7 +646,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;
/**
@@ -654,7 +655,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;
/**
@@ -669,7 +670,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;
/**
@@ -677,7 +678,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;
/**
@@ -685,7 +686,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;
/**
@@ -693,7 +694,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;
/**
@@ -702,7 +703,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;
/**
@@ -781,7 +782,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";
@@ -1102,7 +1103,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;
@@ -1541,7 +1542,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);
@@ -2155,7 +2156,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) {