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

Commit 183b5be4 authored by Jakub Pawlowski's avatar Jakub Pawlowski Committed by android-build-merger
Browse files

Merge "Bluetooth: Add constants to ScanResult"

am: 369a9449

Change-Id: I6fbd113aa163a0941e95b6517f3819d1d68a3342
parents 28f182aa 369a9449
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -7673,8 +7673,10 @@ package android.bluetooth.le {
    field public static final android.os.Parcelable.Creator<android.bluetooth.le.ScanResult> CREATOR;
    field public static final int DATA_COMPLETE = 0; // 0x0
    field public static final int DATA_TRUNCATED = 2; // 0x2
    field public static final int PERIODIC_INTERVAL_NOT_PRESENT = 0; // 0x0
    field public static final int PHY_UNUSED = 0; // 0x0
    field public static final int SID_NOT_PRESENT = 255; // 0xff
    field public static final int TX_POWER_NOT_PRESENT = 127; // 0x7f
  }
  public final class ScanSettings implements android.os.Parcelable {
+2 −0
Original line number Diff line number Diff line
@@ -7991,8 +7991,10 @@ package android.bluetooth.le {
    field public static final android.os.Parcelable.Creator<android.bluetooth.le.ScanResult> CREATOR;
    field public static final int DATA_COMPLETE = 0; // 0x0
    field public static final int DATA_TRUNCATED = 2; // 0x2
    field public static final int PERIODIC_INTERVAL_NOT_PRESENT = 0; // 0x0
    field public static final int PHY_UNUSED = 0; // 0x0
    field public static final int SID_NOT_PRESENT = 255; // 0xff
    field public static final int TX_POWER_NOT_PRESENT = 127; // 0x7f
  }
  public final class ScanSettings implements android.os.Parcelable {
+2 −0
Original line number Diff line number Diff line
@@ -7682,8 +7682,10 @@ package android.bluetooth.le {
    field public static final android.os.Parcelable.Creator<android.bluetooth.le.ScanResult> CREATOR;
    field public static final int DATA_COMPLETE = 0; // 0x0
    field public static final int DATA_TRUNCATED = 2; // 0x2
    field public static final int PERIODIC_INTERVAL_NOT_PRESENT = 0; // 0x0
    field public static final int PHY_UNUSED = 0; // 0x0
    field public static final int SID_NOT_PRESENT = 255; // 0xff
    field public static final int TX_POWER_NOT_PRESENT = 127; // 0x7f
  }
  public final class ScanSettings implements android.os.Parcelable {
+15 −4
Original line number Diff line number Diff line
@@ -51,6 +51,16 @@ public final class ScanResult implements Parcelable {
     */
    public static final int SID_NOT_PRESENT = 0xFF;

    /**
     * TX power is not present in the packet.
     */
    public static final int TX_POWER_NOT_PRESENT = 0x7F;

    /**
     * Periodic advertising interval is not present in the packet.
     */
    public static final int PERIODIC_INTERVAL_NOT_PRESENT = 0x00;

    /**
     * Mask for checking whether event type represents legacy advertisement.
     */
@@ -265,15 +275,16 @@ public final class ScanResult implements Parcelable {

    /**
     * Returns the transmit power in dBm.
     * Valid range is [-127, 126]. A value of 127 indicates that the
     * advertisement did not indicate TX power.
     * Valid range is [-127, 126]. A value of {@link ScanResult#TX_POWER_NOT_PRESENT}
     * indicates that the TX power is not present.
     */
    public int getTxPower() { return mTxPower; }

    /**
     * Returns the periodic advertising interval in units of 1.25ms.
     * Valid range is 6 (7.5ms) to 65536 (81918.75ms). A value of 0 means
     * periodic advertising is not used for this scan result.
     * Valid range is 6 (7.5ms) to 65536 (81918.75ms). A value of
     * {@link ScanResult#PERIODIC_INTERVAL_NOT_PRESENT} means periodic
     * advertising interval is not present.
     */
    public int getPeriodicAdvertisingInterval() {
        return mPeriodicAdvertisingInterval;