Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5fdc8e1a authored by android-build-team Robot's avatar android-build-team Robot
Browse files

Snap for 7302914 from 19fb7324161549ae2fde38d10ed92d8d9c0b0734 to sc-release

Change-Id: I7baecb5e92a9de348780c0ec40775292f9140676
parents 35c75527 b320c71e
Loading
Loading
Loading
Loading
+1 −16
Original line number Diff line number Diff line
@@ -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;

@@ -365,15 +358,7 @@ public final class ScanSettings implements Parcelable {
            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;
            }
            return this;
        }