From ace5976b6838eae37a160fdef9841248df6257ca Mon Sep 17 00:00:00 2001 From: Jakub Pawlowski Date: Thu, 27 Apr 2017 08:37:04 -0700 Subject: Bluetooth: Add constants to ScanResult Add TX_POWER_NOT_PRESENT and PERIODIC_INTERVAL_NOT_PRESENT Test: none Bug: 37536707 Change-Id: Ia48a30f44a961c6e0babd17ecaed0eb93c98ecad --- framework/java/android/bluetooth/le/ScanResult.java | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) (limited to 'framework/java/android/bluetooth/le/ScanResult.java') diff --git a/framework/java/android/bluetooth/le/ScanResult.java b/framework/java/android/bluetooth/le/ScanResult.java index 5b2fa406cd..e552398e9e 100644 --- a/framework/java/android/bluetooth/le/ScanResult.java +++ b/framework/java/android/bluetooth/le/ScanResult.java @@ -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; -- cgit v1.2.3