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

Commit 1549cb1e authored by Rahul Arya's avatar Rahul Arya
Browse files

[Offload] Expose getAdvertiserId API as SystemApi

Needed for potential future advertisement offload work.

Test: none
Bug: 267192991
Change-Id: I365963060c98dc428b37187663bb50865e92819e
parent 5ab3d2a1
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -899,6 +899,10 @@ package android.bluetooth.le {
    method @NonNull public android.bluetooth.le.AdvertiseSettings.Builder setOwnAddressType(int);
  }

  public final class AdvertisingSet {
    method public int getAdvertiserId();
  }

  public final class AdvertisingSetParameters implements android.os.Parcelable {
    method public int getOwnAddressType();
    field public static final int ADDRESS_TYPE_DEFAULT = -1; // 0xffffffff
+6 −1
Original line number Diff line number Diff line
@@ -20,6 +20,7 @@ import static android.bluetooth.le.BluetoothLeUtils.getSyncTimeout;

import android.annotation.RequiresNoPermission;
import android.annotation.RequiresPermission;
import android.annotation.SystemApi;
import android.bluetooth.BluetoothAdapter;
import android.bluetooth.IBluetoothGatt;
import android.bluetooth.IBluetoothManager;
@@ -242,11 +243,15 @@ public final class AdvertisingSet {
    }

    /**
     * Returns advertiserId associated with this advertising set.
     * Returns the advertiser ID associated with this advertising set.
     *
     * <p>This corresponds to the advertising set ID used at the HCI layer, in either LE Extended
     * Advertising or Android-specific Multi-Advertising.
     *
     * @hide
     */
    @RequiresNoPermission
    @SystemApi
    public int getAdvertiserId() {
        return mAdvertiserId;
    }