diff options
| author | Nataniel Borges <natanieljr@google.com> | 2021-04-20 15:50:03 +0000 |
|---|---|---|
| committer | Nataniel Borges <natanieljr@google.com> | 2021-04-20 15:50:03 +0000 |
| commit | 5aa369359e808a3ebb7e3569436d8a63a5d5a2f3 (patch) | |
| tree | d77c30ddf83d5549a2e5763c2a52c1b6bed00013 /core/java/android/bluetooth | |
| parent | ea303904fd68630e353880a4a5d5cf4c2b6408cd (diff) | |
Revert "Set a floor value for BLE Batch Scan report delay of 5000ms"
This reverts commit ea303904fd68630e353880a4a5d5cf4c2b6408cd.
Reason for revert: b/185890964
Change-Id: I270dc16de0e24728c694830fbe920786b6d90174
Diffstat (limited to 'core/java/android/bluetooth')
| -rw-r--r-- | core/java/android/bluetooth/le/ScanSettings.java | 29 |
1 files changed, 6 insertions, 23 deletions
diff --git a/core/java/android/bluetooth/le/ScanSettings.java b/core/java/android/bluetooth/le/ScanSettings.java index f3e971a0bb30..368d1eecade4 100644 --- a/core/java/android/bluetooth/le/ScanSettings.java +++ b/core/java/android/bluetooth/le/ScanSettings.java @@ -20,7 +20,6 @@ import android.annotation.SystemApi; import android.bluetooth.BluetoothDevice; import android.os.Parcel; import android.os.Parcelable; -import android.provider.DeviceConfig; /** * Bluetooth LE scan settings are passed to {@link BluetoothLeScanner#startScan} to define the @@ -142,12 +141,6 @@ public final class ScanSettings implements Parcelable { */ public static final int PHY_LE_ALL_SUPPORTED = 255; - /** - * The default floor value for report delays greater than 0 in - * {@link Builder#setReportDelay(long)}. - */ - private static final long DEFAULT_REPORT_DELAY_FLOOR = 5000; - // Bluetooth LE scan mode. private int mScanMode; @@ -352,28 +345,18 @@ public final class ScanSettings implements Parcelable { } /** - * Set report delay timestamp for Bluetooth LE scan. If set to 0, you will be notified of - * scan results immediately. If > 0, scan results are queued up and delivered after the - * requested delay or 5000 milliseconds (whichever is higher). Note scan results may be - * delivered sooner if the internal buffers fill up. + * Set report delay timestamp for Bluetooth LE scan. * - * @param reportDelayMillis how frequently scan results should be delivered in - * milliseconds - * @throws IllegalArgumentException if {@code reportDelayMillis} < 0 + * @param reportDelayMillis Delay of report in milliseconds. Set to 0 to be notified of + * results immediately. Values > 0 causes the scan results to be queued up and delivered + * after the requested delay or when the internal buffers fill up. + * @throws IllegalArgumentException If {@code reportDelayMillis} < 0. */ public Builder setReportDelay(long reportDelayMillis) { if (reportDelayMillis < 0) { throw new IllegalArgumentException("reportDelay must be > 0"); } - - long floor = DeviceConfig.getLong(DeviceConfig.NAMESPACE_BLUETOOTH, "report_delay", - DEFAULT_REPORT_DELAY_FLOOR); - - if (reportDelayMillis > 0 && reportDelayMillis < floor) { - mReportDelayMillis = floor; - } else { - mReportDelayMillis = reportDelayMillis; - } + mReportDelayMillis = reportDelayMillis; return this; } |
