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

Commit adbf2eef authored by Jakub Pawlowski's avatar Jakub Pawlowski
Browse files

Bluetooth 5 move timeout parameter (1/2)

Timeout is not a parameter, it is a property of enabling the
advertising. Move it into more proper place.

Test: manual
Bug: 30622771
Change-Id: I09ebc6c770bc02938ea16a9738a7e03dc8006fde
parent 9aa841d2
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -7506,7 +7506,7 @@ package android.bluetooth.le {
  }
  public final class AdvertisingSet {
    method public void enableAdvertising(boolean);
    method public void enableAdvertising(boolean, int);
    method public void periodicAdvertisingEnable(boolean);
    method public void setAdvertisingData(android.bluetooth.le.AdvertiseData);
    method public void setAdvertisingParameters(android.bluetooth.le.AdvertisingSetParameters);
@@ -7539,7 +7539,6 @@ package android.bluetooth.le {
    method public int getInterval();
    method public int getPrimaryPhy();
    method public int getSecondaryPhy();
    method public int getTimeout();
    method public int getTxPowerLevel();
    method public boolean includeTxPower();
    method public boolean isAnonymous();
@@ -7573,7 +7572,6 @@ package android.bluetooth.le {
    method public android.bluetooth.le.AdvertisingSetParameters.Builder setLegacyMode(boolean);
    method public android.bluetooth.le.AdvertisingSetParameters.Builder setPrimaryPhy(int);
    method public android.bluetooth.le.AdvertisingSetParameters.Builder setSecondaryPhy(int);
    method public android.bluetooth.le.AdvertisingSetParameters.Builder setTimeout(int);
    method public android.bluetooth.le.AdvertisingSetParameters.Builder setTxPowerLevel(int);
  }
@@ -7582,6 +7580,8 @@ package android.bluetooth.le {
    method public void startAdvertising(android.bluetooth.le.AdvertiseSettings, android.bluetooth.le.AdvertiseData, android.bluetooth.le.AdvertiseData, android.bluetooth.le.AdvertiseCallback);
    method public void startAdvertisingSet(android.bluetooth.le.AdvertisingSetParameters, android.bluetooth.le.AdvertiseData, android.bluetooth.le.AdvertiseData, android.bluetooth.le.PeriodicAdvertisingParameters, android.bluetooth.le.AdvertiseData, android.bluetooth.le.AdvertisingSetCallback);
    method public void startAdvertisingSet(android.bluetooth.le.AdvertisingSetParameters, android.bluetooth.le.AdvertiseData, android.bluetooth.le.AdvertiseData, android.bluetooth.le.PeriodicAdvertisingParameters, android.bluetooth.le.AdvertiseData, android.bluetooth.le.AdvertisingSetCallback, android.os.Handler);
    method public void startAdvertisingSet(android.bluetooth.le.AdvertisingSetParameters, android.bluetooth.le.AdvertiseData, android.bluetooth.le.AdvertiseData, android.bluetooth.le.PeriodicAdvertisingParameters, android.bluetooth.le.AdvertiseData, int, android.bluetooth.le.AdvertisingSetCallback);
    method public void startAdvertisingSet(android.bluetooth.le.AdvertisingSetParameters, android.bluetooth.le.AdvertiseData, android.bluetooth.le.AdvertiseData, android.bluetooth.le.PeriodicAdvertisingParameters, android.bluetooth.le.AdvertiseData, int, android.bluetooth.le.AdvertisingSetCallback, android.os.Handler);
    method public void stopAdvertising(android.bluetooth.le.AdvertiseCallback);
    method public void stopAdvertisingSet(android.bluetooth.le.AdvertisingSetCallback);
  }
+3 −3
Original line number Diff line number Diff line
@@ -7810,7 +7810,7 @@ package android.bluetooth.le {
  }
  public final class AdvertisingSet {
    method public void enableAdvertising(boolean);
    method public void enableAdvertising(boolean, int);
    method public void periodicAdvertisingEnable(boolean);
    method public void setAdvertisingData(android.bluetooth.le.AdvertiseData);
    method public void setAdvertisingParameters(android.bluetooth.le.AdvertisingSetParameters);
@@ -7843,7 +7843,6 @@ package android.bluetooth.le {
    method public int getInterval();
    method public int getPrimaryPhy();
    method public int getSecondaryPhy();
    method public int getTimeout();
    method public int getTxPowerLevel();
    method public boolean includeTxPower();
    method public boolean isAnonymous();
@@ -7877,7 +7876,6 @@ package android.bluetooth.le {
    method public android.bluetooth.le.AdvertisingSetParameters.Builder setLegacyMode(boolean);
    method public android.bluetooth.le.AdvertisingSetParameters.Builder setPrimaryPhy(int);
    method public android.bluetooth.le.AdvertisingSetParameters.Builder setSecondaryPhy(int);
    method public android.bluetooth.le.AdvertisingSetParameters.Builder setTimeout(int);
    method public android.bluetooth.le.AdvertisingSetParameters.Builder setTxPowerLevel(int);
  }
@@ -7886,6 +7884,8 @@ package android.bluetooth.le {
    method public void startAdvertising(android.bluetooth.le.AdvertiseSettings, android.bluetooth.le.AdvertiseData, android.bluetooth.le.AdvertiseData, android.bluetooth.le.AdvertiseCallback);
    method public void startAdvertisingSet(android.bluetooth.le.AdvertisingSetParameters, android.bluetooth.le.AdvertiseData, android.bluetooth.le.AdvertiseData, android.bluetooth.le.PeriodicAdvertisingParameters, android.bluetooth.le.AdvertiseData, android.bluetooth.le.AdvertisingSetCallback);
    method public void startAdvertisingSet(android.bluetooth.le.AdvertisingSetParameters, android.bluetooth.le.AdvertiseData, android.bluetooth.le.AdvertiseData, android.bluetooth.le.PeriodicAdvertisingParameters, android.bluetooth.le.AdvertiseData, android.bluetooth.le.AdvertisingSetCallback, android.os.Handler);
    method public void startAdvertisingSet(android.bluetooth.le.AdvertisingSetParameters, android.bluetooth.le.AdvertiseData, android.bluetooth.le.AdvertiseData, android.bluetooth.le.PeriodicAdvertisingParameters, android.bluetooth.le.AdvertiseData, int, android.bluetooth.le.AdvertisingSetCallback);
    method public void startAdvertisingSet(android.bluetooth.le.AdvertisingSetParameters, android.bluetooth.le.AdvertiseData, android.bluetooth.le.AdvertiseData, android.bluetooth.le.PeriodicAdvertisingParameters, android.bluetooth.le.AdvertiseData, int, android.bluetooth.le.AdvertisingSetCallback, android.os.Handler);
    method public void stopAdvertising(android.bluetooth.le.AdvertiseCallback);
    method public void stopAdvertisingSet(android.bluetooth.le.AdvertisingSetCallback);
  }
+3 −3
Original line number Diff line number Diff line
@@ -7515,7 +7515,7 @@ package android.bluetooth.le {
  }
  public final class AdvertisingSet {
    method public void enableAdvertising(boolean);
    method public void enableAdvertising(boolean, int);
    method public void periodicAdvertisingEnable(boolean);
    method public void setAdvertisingData(android.bluetooth.le.AdvertiseData);
    method public void setAdvertisingParameters(android.bluetooth.le.AdvertisingSetParameters);
@@ -7548,7 +7548,6 @@ package android.bluetooth.le {
    method public int getInterval();
    method public int getPrimaryPhy();
    method public int getSecondaryPhy();
    method public int getTimeout();
    method public int getTxPowerLevel();
    method public boolean includeTxPower();
    method public boolean isAnonymous();
@@ -7582,7 +7581,6 @@ package android.bluetooth.le {
    method public android.bluetooth.le.AdvertisingSetParameters.Builder setLegacyMode(boolean);
    method public android.bluetooth.le.AdvertisingSetParameters.Builder setPrimaryPhy(int);
    method public android.bluetooth.le.AdvertisingSetParameters.Builder setSecondaryPhy(int);
    method public android.bluetooth.le.AdvertisingSetParameters.Builder setTimeout(int);
    method public android.bluetooth.le.AdvertisingSetParameters.Builder setTxPowerLevel(int);
  }
@@ -7591,6 +7589,8 @@ package android.bluetooth.le {
    method public void startAdvertising(android.bluetooth.le.AdvertiseSettings, android.bluetooth.le.AdvertiseData, android.bluetooth.le.AdvertiseData, android.bluetooth.le.AdvertiseCallback);
    method public void startAdvertisingSet(android.bluetooth.le.AdvertisingSetParameters, android.bluetooth.le.AdvertiseData, android.bluetooth.le.AdvertiseData, android.bluetooth.le.PeriodicAdvertisingParameters, android.bluetooth.le.AdvertiseData, android.bluetooth.le.AdvertisingSetCallback);
    method public void startAdvertisingSet(android.bluetooth.le.AdvertisingSetParameters, android.bluetooth.le.AdvertiseData, android.bluetooth.le.AdvertiseData, android.bluetooth.le.PeriodicAdvertisingParameters, android.bluetooth.le.AdvertiseData, android.bluetooth.le.AdvertisingSetCallback, android.os.Handler);
    method public void startAdvertisingSet(android.bluetooth.le.AdvertisingSetParameters, android.bluetooth.le.AdvertiseData, android.bluetooth.le.AdvertiseData, android.bluetooth.le.PeriodicAdvertisingParameters, android.bluetooth.le.AdvertiseData, int, android.bluetooth.le.AdvertisingSetCallback);
    method public void startAdvertisingSet(android.bluetooth.le.AdvertisingSetParameters, android.bluetooth.le.AdvertiseData, android.bluetooth.le.AdvertiseData, android.bluetooth.le.PeriodicAdvertisingParameters, android.bluetooth.le.AdvertiseData, int, android.bluetooth.le.AdvertisingSetCallback, android.os.Handler);
    method public void stopAdvertising(android.bluetooth.le.AdvertiseCallback);
    method public void stopAdvertisingSet(android.bluetooth.le.AdvertisingSetCallback);
  }
+2 −2
Original line number Diff line number Diff line
@@ -52,10 +52,10 @@ interface IBluetoothGatt {

    void startAdvertisingSet(in AdvertisingSetParameters parameters, in AdvertiseData advertiseData,
                                in AdvertiseData scanResponse, in PeriodicAdvertisingParameters periodicParameters,
                                in AdvertiseData periodicData, in IAdvertisingSetCallback callback);
                                in AdvertiseData periodicData, in int timeout, in IAdvertisingSetCallback callback);
    void stopAdvertisingSet(in IAdvertisingSetCallback callback);

    void enableAdverisingSet(in int advertiserId, in boolean enable);
    void enableAdverisingSet(in int advertiserId, in boolean enable, in int timeout);
    void setAdvertisingData(in int advertiserId, in AdvertiseData data);
    void setScanResponseData(in int advertiserId, in AdvertiseData data);
    void setAdvertisingParameters(in int advertiserId, in AdvertisingSetParameters parameters);
+2 −2
Original line number Diff line number Diff line
@@ -63,9 +63,9 @@ public final class AdvertisingSet {
     * Requires {@link android.Manifest.permission#BLUETOOTH_ADMIN}
     *
     */
    public void enableAdvertising(boolean enable) {
    public void enableAdvertising(boolean enable, int timeout) {
        try {
            gatt.enableAdverisingSet(this.advertiserId, enable);
            gatt.enableAdverisingSet(this.advertiserId, enable, timeout);
        } catch (RemoteException e) {
            Log.e(TAG, "remote exception - ", e);
        }
Loading