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

Commit 2d7d617e authored by Jakub Pawlowski's avatar Jakub Pawlowski Committed by Android (Google) Code Review
Browse files

Merge changes from topic 'bt5-cherry-pickery-2' into oc-dev

* changes:
  Remove enable from PeriodicAdvertisingPariameters (1/2)
  Bluetooth 5 fix default AdvertisingSetParameters values
  Bluetooth: fix comment wording
parents c62250ad 32699691
Loading
Loading
Loading
Loading
+0 −2
Original line number Original line Diff line number Diff line
@@ -8056,7 +8056,6 @@ package android.bluetooth.le {
  public final class PeriodicAdvertisingParameters implements android.os.Parcelable {
  public final class PeriodicAdvertisingParameters implements android.os.Parcelable {
    method public int describeContents();
    method public int describeContents();
    method public boolean getEnable();
    method public boolean getIncludeTxPower();
    method public boolean getIncludeTxPower();
    method public int getInterval();
    method public int getInterval();
    method public void writeToParcel(android.os.Parcel, int);
    method public void writeToParcel(android.os.Parcel, int);
@@ -8066,7 +8065,6 @@ package android.bluetooth.le {
  public static final class PeriodicAdvertisingParameters.Builder {
  public static final class PeriodicAdvertisingParameters.Builder {
    ctor public PeriodicAdvertisingParameters.Builder();
    ctor public PeriodicAdvertisingParameters.Builder();
    method public android.bluetooth.le.PeriodicAdvertisingParameters build();
    method public android.bluetooth.le.PeriodicAdvertisingParameters build();
    method public android.bluetooth.le.PeriodicAdvertisingParameters.Builder setEnable(boolean);
    method public android.bluetooth.le.PeriodicAdvertisingParameters.Builder setIncludeTxPower(boolean);
    method public android.bluetooth.le.PeriodicAdvertisingParameters.Builder setIncludeTxPower(boolean);
    method public android.bluetooth.le.PeriodicAdvertisingParameters.Builder setInterval(int);
    method public android.bluetooth.le.PeriodicAdvertisingParameters.Builder setInterval(int);
  }
  }
+0 −2
Original line number Original line Diff line number Diff line
@@ -8527,7 +8527,6 @@ package android.bluetooth.le {
  public final class PeriodicAdvertisingParameters implements android.os.Parcelable {
  public final class PeriodicAdvertisingParameters implements android.os.Parcelable {
    method public int describeContents();
    method public int describeContents();
    method public boolean getEnable();
    method public boolean getIncludeTxPower();
    method public boolean getIncludeTxPower();
    method public int getInterval();
    method public int getInterval();
    method public void writeToParcel(android.os.Parcel, int);
    method public void writeToParcel(android.os.Parcel, int);
@@ -8537,7 +8536,6 @@ package android.bluetooth.le {
  public static final class PeriodicAdvertisingParameters.Builder {
  public static final class PeriodicAdvertisingParameters.Builder {
    ctor public PeriodicAdvertisingParameters.Builder();
    ctor public PeriodicAdvertisingParameters.Builder();
    method public android.bluetooth.le.PeriodicAdvertisingParameters build();
    method public android.bluetooth.le.PeriodicAdvertisingParameters build();
    method public android.bluetooth.le.PeriodicAdvertisingParameters.Builder setEnable(boolean);
    method public android.bluetooth.le.PeriodicAdvertisingParameters.Builder setIncludeTxPower(boolean);
    method public android.bluetooth.le.PeriodicAdvertisingParameters.Builder setIncludeTxPower(boolean);
    method public android.bluetooth.le.PeriodicAdvertisingParameters.Builder setInterval(int);
    method public android.bluetooth.le.PeriodicAdvertisingParameters.Builder setInterval(int);
  }
  }
+0 −2
Original line number Original line Diff line number Diff line
@@ -8086,7 +8086,6 @@ package android.bluetooth.le {
  public final class PeriodicAdvertisingParameters implements android.os.Parcelable {
  public final class PeriodicAdvertisingParameters implements android.os.Parcelable {
    method public int describeContents();
    method public int describeContents();
    method public boolean getEnable();
    method public boolean getIncludeTxPower();
    method public boolean getIncludeTxPower();
    method public int getInterval();
    method public int getInterval();
    method public void writeToParcel(android.os.Parcel, int);
    method public void writeToParcel(android.os.Parcel, int);
@@ -8096,7 +8095,6 @@ package android.bluetooth.le {
  public static final class PeriodicAdvertisingParameters.Builder {
  public static final class PeriodicAdvertisingParameters.Builder {
    ctor public PeriodicAdvertisingParameters.Builder();
    ctor public PeriodicAdvertisingParameters.Builder();
    method public android.bluetooth.le.PeriodicAdvertisingParameters build();
    method public android.bluetooth.le.PeriodicAdvertisingParameters build();
    method public android.bluetooth.le.PeriodicAdvertisingParameters.Builder setEnable(boolean);
    method public android.bluetooth.le.PeriodicAdvertisingParameters.Builder setIncludeTxPower(boolean);
    method public android.bluetooth.le.PeriodicAdvertisingParameters.Builder setIncludeTxPower(boolean);
    method public android.bluetooth.le.PeriodicAdvertisingParameters.Builder setInterval(int);
    method public android.bluetooth.le.PeriodicAdvertisingParameters.Builder setInterval(int);
  }
  }
+7 −7
Original line number Original line Diff line number Diff line
@@ -241,8 +241,8 @@ public final class AdvertisingSetParameters implements Parcelable {
     */
     */
    public static final class Builder {
    public static final class Builder {


        private boolean connectable = true;
        private boolean connectable = false;
        private boolean scannable = true;
        private boolean scannable = false;
        private boolean isLegacy = false;
        private boolean isLegacy = false;
        private boolean isAnonymous = false;
        private boolean isAnonymous = false;
        private boolean includeTxPower = false;
        private boolean includeTxPower = false;
@@ -254,8 +254,8 @@ public final class AdvertisingSetParameters implements Parcelable {
        /**
        /**
         * Set whether the advertisement type should be connectable or
         * Set whether the advertisement type should be connectable or
         * non-connectable.
         * non-connectable.
         * Legacy advertisements can be both connectable and scannable. Other
         * Legacy advertisements can be both connectable and scannable. Non-legacy
         * advertisements can be connectable only if not scannable.
         * advertisements can be only scannable or only connectable.
         * @param connectable Controls whether the advertisment type will be
         * @param connectable Controls whether the advertisment type will be
         * connectable (true) or non-connectable (false).
         * connectable (true) or non-connectable (false).
         */
         */
@@ -265,9 +265,9 @@ public final class AdvertisingSetParameters implements Parcelable {
        }
        }


        /**
        /**
         * Set whether the advertisement type should be scannable
         * Set whether the advertisement type should be scannable.
         * Legacy advertisements can be both connectable and scannable. Other
         * Legacy advertisements can be both connectable and scannable. Non-legacy
         * advertisements can be scannable only if not connectable.
         * advertisements can be only scannable or only connectable.
         * @param scannable Controls whether the advertisment type will be
         * @param scannable Controls whether the advertisment type will be
         * scannable (true) or non-scannable (false).
         * scannable (true) or non-scannable (false).
         */
         */
+1 −1
Original line number Original line Diff line number Diff line
@@ -386,7 +386,7 @@ public final class BluetoothLeAdvertiser {
            }
            }


            boolean supportPeriodic = mBluetoothAdapter.isLePeriodicAdvertisingSupported();
            boolean supportPeriodic = mBluetoothAdapter.isLePeriodicAdvertisingSupported();
            if (periodicParameters != null && periodicParameters.getEnable() && !supportPeriodic) {
            if (periodicParameters != null && !supportPeriodic) {
                throw new IllegalArgumentException(
                throw new IllegalArgumentException(
                    "Controller does not support LE Periodic Advertising");
                    "Controller does not support LE Periodic Advertising");
            }
            }
Loading