OSDN Git Service

Bluetooth: Fix Periodic Adv interval check
authorSunny Kapdi <sunnyk@codeaurora.org>
Fri, 5 May 2017 22:27:33 +0000 (15:27 -0700)
committerJakub Pawlowski <jpawlowski@google.com>
Wed, 10 May 2017 07:23:06 +0000 (07:23 +0000)
The MIN and MAX values need to be swapped else
the parameter check in setInterval would always
fail

Bug: 37579882
Change-Id: I48538c2a61be88caaf04abd94074b3d9eb6dde96

core/java/android/bluetooth/le/PeriodicAdvertisingParameters.java

index 8891d2e..cf8f08f 100644 (file)
@@ -26,8 +26,8 @@ import android.os.Parcelable;
  */
 public final class PeriodicAdvertisingParameters implements Parcelable {
 
-    private static final int INTERVAL_MAX = 80;
-    private static final int INTERVAL_MIN = 65519;
+    private static final int INTERVAL_MIN = 80;
+    private static final int INTERVAL_MAX = 65519;
 
     private final boolean includeTxPower;
     private final int interval;