From 6ea20906f34b094abff5b44f0c21f73e706784c1 Mon Sep 17 00:00:00 2001 From: Jakub Pawlowski Date: Wed, 14 Jul 2021 13:03:25 +0200 Subject: [PATCH] Bluetooth: deprecate TruncatedFilter and ResultStorageDescriptor It's not used anywhere, and the implementation actually never do anything. Bug: 192615539 Merged-In: Icf8906c972cf18d65a22d30c3a628fd54db59179 Change-Id: Icf8906c972cf18d65a22d30c3a628fd54db59179 --- core/api/system-current.txt | 26 +++++++++---------- .../bluetooth/le/BluetoothLeScanner.java | 3 +++ .../bluetooth/le/ResultStorageDescriptor.java | 3 +++ .../android/bluetooth/le/TruncatedFilter.java | 3 +++ 4 files changed, 22 insertions(+), 13 deletions(-) diff --git a/core/api/system-current.txt b/core/api/system-current.txt index 675347085f095..9a8591d0e5311 100644 --- a/core/api/system-current.txt +++ b/core/api/system-current.txt @@ -1752,17 +1752,17 @@ package android.bluetooth.le { public final class BluetoothLeScanner { method @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_ADMIN, android.Manifest.permission.UPDATE_DEVICE_STATS}) public void startScanFromSource(android.os.WorkSource, android.bluetooth.le.ScanCallback); method @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_ADMIN, android.Manifest.permission.UPDATE_DEVICE_STATS}) public void startScanFromSource(java.util.List, android.bluetooth.le.ScanSettings, android.os.WorkSource, android.bluetooth.le.ScanCallback); - method public void startTruncatedScan(java.util.List, android.bluetooth.le.ScanSettings, android.bluetooth.le.ScanCallback); + method @Deprecated public void startTruncatedScan(java.util.List, android.bluetooth.le.ScanSettings, android.bluetooth.le.ScanCallback); } - public final class ResultStorageDescriptor implements android.os.Parcelable { - ctor public ResultStorageDescriptor(int, int, int); - method public int describeContents(); - method public int getLength(); - method public int getOffset(); - method public int getType(); - method public void writeToParcel(android.os.Parcel, int); - field @NonNull public static final android.os.Parcelable.Creator CREATOR; + @Deprecated public final class ResultStorageDescriptor implements android.os.Parcelable { + ctor @Deprecated public ResultStorageDescriptor(int, int, int); + method @Deprecated public int describeContents(); + method @Deprecated public int getLength(); + method @Deprecated public int getOffset(); + method @Deprecated public int getType(); + method @Deprecated public void writeToParcel(android.os.Parcel, int); + field @Deprecated @NonNull public static final android.os.Parcelable.Creator CREATOR; } public final class ScanFilter implements android.os.Parcelable { @@ -1786,10 +1786,10 @@ package android.bluetooth.le { method public android.bluetooth.le.ScanSettings.Builder setScanResultType(int); } - public final class TruncatedFilter { - ctor public TruncatedFilter(android.bluetooth.le.ScanFilter, java.util.List); - method public android.bluetooth.le.ScanFilter getFilter(); - method public java.util.List getStorageDescriptors(); + @Deprecated public final class TruncatedFilter { + ctor @Deprecated public TruncatedFilter(android.bluetooth.le.ScanFilter, java.util.List); + method @Deprecated public android.bluetooth.le.ScanFilter getFilter(); + method @Deprecated public java.util.List getStorageDescriptors(); } } diff --git a/core/java/android/bluetooth/le/BluetoothLeScanner.java b/core/java/android/bluetooth/le/BluetoothLeScanner.java index 26d63db879c78..32de821c0aecd 100644 --- a/core/java/android/bluetooth/le/BluetoothLeScanner.java +++ b/core/java/android/bluetooth/le/BluetoothLeScanner.java @@ -327,8 +327,11 @@ public final class BluetoothLeScanner { /** * Start truncated scan. * + * @deprecated this is not used anywhere + * * @hide */ + @Deprecated @SystemApi public void startTruncatedScan(List truncatedFilters, ScanSettings settings, final ScanCallback callback) { diff --git a/core/java/android/bluetooth/le/ResultStorageDescriptor.java b/core/java/android/bluetooth/le/ResultStorageDescriptor.java index 796c815d69bbd..f65048975deb5 100644 --- a/core/java/android/bluetooth/le/ResultStorageDescriptor.java +++ b/core/java/android/bluetooth/le/ResultStorageDescriptor.java @@ -23,8 +23,11 @@ import android.os.Parcelable; /** * Describes the way to store scan result. * + * @deprecated this is not used anywhere + * * @hide */ +@Deprecated @SystemApi public final class ResultStorageDescriptor implements Parcelable { private int mType; diff --git a/core/java/android/bluetooth/le/TruncatedFilter.java b/core/java/android/bluetooth/le/TruncatedFilter.java index a753aa6fef170..00f2f8a89c94f 100644 --- a/core/java/android/bluetooth/le/TruncatedFilter.java +++ b/core/java/android/bluetooth/le/TruncatedFilter.java @@ -23,8 +23,11 @@ import java.util.List; /** * A special scan filter that lets the client decide how the scan record should be stored. * + * @deprecated this is not used anywhere + * * @hide */ +@Deprecated @SystemApi public final class TruncatedFilter { private final ScanFilter mFilter;