Loading api/current.txt +9 −0 Original line number Diff line number Diff line Loading @@ -6685,7 +6685,14 @@ package android.bluetooth.le { method public int getScanResultType(); method public void writeToParcel(android.os.Parcel, int); field public static final int CALLBACK_TYPE_ALL_MATCHES = 1; // 0x1 field public static final int CALLBACK_TYPE_FIRST_MATCH = 2; // 0x2 field public static final int CALLBACK_TYPE_MATCH_LOST = 4; // 0x4 field public static final android.os.Parcelable.Creator<android.bluetooth.le.ScanSettings> CREATOR; field public static final int MATCH_MODE_AGGRESSIVE = 1; // 0x1 field public static final int MATCH_MODE_STICKY = 2; // 0x2 field public static final int MATCH_NUM_FEW_ADVERTISEMENT = 2; // 0x2 field public static final int MATCH_NUM_MAX_ADVERTISEMENT = 3; // 0x3 field public static final int MATCH_NUM_ONE_ADVERTISEMENT = 1; // 0x1 field public static final int SCAN_MODE_BALANCED = 1; // 0x1 field public static final int SCAN_MODE_LOW_LATENCY = 2; // 0x2 field public static final int SCAN_MODE_LOW_POWER = 0; // 0x0 Loading @@ -6695,6 +6702,8 @@ package android.bluetooth.le { public static final class ScanSettings.Builder { ctor public ScanSettings.Builder(); method public android.bluetooth.le.ScanSettings build(); method public android.bluetooth.le.ScanSettings.Builder setMatchMode(int); method public android.bluetooth.le.ScanSettings.Builder setNumOfMatches(int); method public android.bluetooth.le.ScanSettings.Builder setReportDelay(long); method public android.bluetooth.le.ScanSettings.Builder setScanMode(int); } api/system-current.txt +7 −0 Original line number Diff line number Diff line Loading @@ -6915,6 +6915,11 @@ package android.bluetooth.le { field public static final int CALLBACK_TYPE_FIRST_MATCH = 2; // 0x2 field public static final int CALLBACK_TYPE_MATCH_LOST = 4; // 0x4 field public static final android.os.Parcelable.Creator<android.bluetooth.le.ScanSettings> CREATOR; field public static final int MATCH_MODE_AGGRESSIVE = 1; // 0x1 field public static final int MATCH_MODE_STICKY = 2; // 0x2 field public static final int MATCH_NUM_FEW_ADVERTISEMENT = 2; // 0x2 field public static final int MATCH_NUM_MAX_ADVERTISEMENT = 3; // 0x3 field public static final int MATCH_NUM_ONE_ADVERTISEMENT = 1; // 0x1 field public static final int SCAN_MODE_BALANCED = 1; // 0x1 field public static final int SCAN_MODE_LOW_LATENCY = 2; // 0x2 field public static final int SCAN_MODE_LOW_POWER = 0; // 0x0 Loading @@ -6927,6 +6932,8 @@ package android.bluetooth.le { ctor public ScanSettings.Builder(); method public android.bluetooth.le.ScanSettings build(); method public android.bluetooth.le.ScanSettings.Builder setCallbackType(int); method public android.bluetooth.le.ScanSettings.Builder setMatchMode(int); method public android.bluetooth.le.ScanSettings.Builder setNumOfMatches(int); method public android.bluetooth.le.ScanSettings.Builder setReportDelay(long); method public android.bluetooth.le.ScanSettings.Builder setScanMode(int); method public android.bluetooth.le.ScanSettings.Builder setScanResultType(int); core/java/android/bluetooth/le/ScanCallback.java +4 −2 Original line number Diff line number Diff line Loading @@ -53,8 +53,10 @@ public abstract class ScanCallback { /** * Callback when a BLE advertisement has been found. * * @param callbackType Determines how this callback was triggered. Could be of * {@link ScanSettings#CALLBACK_TYPE_ALL_MATCHES} * @param callbackType Determines how this callback was triggered. Could be one of * {@link ScanSettings#CALLBACK_TYPE_ALL_MATCHES}, * {@link ScanSettings#CALLBACK_TYPE_FIRST_MATCH} or * {@link ScanSettings#CALLBACK_TYPE_MATCH_LOST} * @param result A Bluetooth LE scan result. */ public void onScanResult(int callbackType, ScanResult result) { Loading core/java/android/bluetooth/le/ScanSettings.java +0 −11 Original line number Diff line number Diff line Loading @@ -59,17 +59,13 @@ public final class ScanSettings implements Parcelable { /** * A result callback is only triggered for the first advertisement packet received that matches * the filter criteria. * @hide */ @SystemApi public static final int CALLBACK_TYPE_FIRST_MATCH = 2; /** * Receive a callback when advertisements are no longer received from a device that has been * previously reported by a first match callback. * @hide */ @SystemApi public static final int CALLBACK_TYPE_MATCH_LOST = 4; Loading @@ -78,21 +74,18 @@ public final class ScanSettings implements Parcelable { */ /** * Match one advertisement per filter * @hide */ public static final int MATCH_NUM_ONE_ADVERTISEMENT = 1; /** * Match few advertisement per filter, depends on current capability and availibility of * the resources in hw * @hide */ public static final int MATCH_NUM_FEW_ADVERTISEMENT = 2; /** * Match as many advertisement per filter as hw could allow, depends on current * capability and availibility of the resources in hw * @hide */ public static final int MATCH_NUM_MAX_ADVERTISEMENT = 3; Loading @@ -100,14 +93,12 @@ public final class ScanSettings implements Parcelable { /** * In Aggressive mode, hw will determine a match sooner even with feeble signal strength * and few number of sightings/match in a duration. * @hide */ public static final int MATCH_MODE_AGGRESSIVE = 1; /** * For sticky mode, higher threshold of signal strength and sightings is required * before reporting by hw * @hide */ public static final int MATCH_MODE_STICKY = 2; Loading Loading @@ -324,7 +315,6 @@ public final class ScanSettings implements Parcelable { * {@link ScanSettings#MATCH_NUM_FEW_ADVERTISEMENT} or * {@link ScanSettings#MATCH_NUM_MAX_ADVERTISEMENT} * @throws IllegalArgumentException If the {@code matchMode} is invalid. * @hide */ public Builder setNumOfMatches(int numOfMatches) { if (numOfMatches < MATCH_NUM_ONE_ADVERTISEMENT Loading @@ -342,7 +332,6 @@ public final class ScanSettings implements Parcelable { * {@link ScanSettings#MATCH_MODE_AGGRESSIVE} or * {@link ScanSettings#MATCH_MODE_STICKY} * @throws IllegalArgumentException If the {@code matchMode} is invalid. * @hide */ public Builder setMatchMode(int matchMode) { if (matchMode < MATCH_MODE_AGGRESSIVE Loading Loading
api/current.txt +9 −0 Original line number Diff line number Diff line Loading @@ -6685,7 +6685,14 @@ package android.bluetooth.le { method public int getScanResultType(); method public void writeToParcel(android.os.Parcel, int); field public static final int CALLBACK_TYPE_ALL_MATCHES = 1; // 0x1 field public static final int CALLBACK_TYPE_FIRST_MATCH = 2; // 0x2 field public static final int CALLBACK_TYPE_MATCH_LOST = 4; // 0x4 field public static final android.os.Parcelable.Creator<android.bluetooth.le.ScanSettings> CREATOR; field public static final int MATCH_MODE_AGGRESSIVE = 1; // 0x1 field public static final int MATCH_MODE_STICKY = 2; // 0x2 field public static final int MATCH_NUM_FEW_ADVERTISEMENT = 2; // 0x2 field public static final int MATCH_NUM_MAX_ADVERTISEMENT = 3; // 0x3 field public static final int MATCH_NUM_ONE_ADVERTISEMENT = 1; // 0x1 field public static final int SCAN_MODE_BALANCED = 1; // 0x1 field public static final int SCAN_MODE_LOW_LATENCY = 2; // 0x2 field public static final int SCAN_MODE_LOW_POWER = 0; // 0x0 Loading @@ -6695,6 +6702,8 @@ package android.bluetooth.le { public static final class ScanSettings.Builder { ctor public ScanSettings.Builder(); method public android.bluetooth.le.ScanSettings build(); method public android.bluetooth.le.ScanSettings.Builder setMatchMode(int); method public android.bluetooth.le.ScanSettings.Builder setNumOfMatches(int); method public android.bluetooth.le.ScanSettings.Builder setReportDelay(long); method public android.bluetooth.le.ScanSettings.Builder setScanMode(int); }
api/system-current.txt +7 −0 Original line number Diff line number Diff line Loading @@ -6915,6 +6915,11 @@ package android.bluetooth.le { field public static final int CALLBACK_TYPE_FIRST_MATCH = 2; // 0x2 field public static final int CALLBACK_TYPE_MATCH_LOST = 4; // 0x4 field public static final android.os.Parcelable.Creator<android.bluetooth.le.ScanSettings> CREATOR; field public static final int MATCH_MODE_AGGRESSIVE = 1; // 0x1 field public static final int MATCH_MODE_STICKY = 2; // 0x2 field public static final int MATCH_NUM_FEW_ADVERTISEMENT = 2; // 0x2 field public static final int MATCH_NUM_MAX_ADVERTISEMENT = 3; // 0x3 field public static final int MATCH_NUM_ONE_ADVERTISEMENT = 1; // 0x1 field public static final int SCAN_MODE_BALANCED = 1; // 0x1 field public static final int SCAN_MODE_LOW_LATENCY = 2; // 0x2 field public static final int SCAN_MODE_LOW_POWER = 0; // 0x0 Loading @@ -6927,6 +6932,8 @@ package android.bluetooth.le { ctor public ScanSettings.Builder(); method public android.bluetooth.le.ScanSettings build(); method public android.bluetooth.le.ScanSettings.Builder setCallbackType(int); method public android.bluetooth.le.ScanSettings.Builder setMatchMode(int); method public android.bluetooth.le.ScanSettings.Builder setNumOfMatches(int); method public android.bluetooth.le.ScanSettings.Builder setReportDelay(long); method public android.bluetooth.le.ScanSettings.Builder setScanMode(int); method public android.bluetooth.le.ScanSettings.Builder setScanResultType(int);
core/java/android/bluetooth/le/ScanCallback.java +4 −2 Original line number Diff line number Diff line Loading @@ -53,8 +53,10 @@ public abstract class ScanCallback { /** * Callback when a BLE advertisement has been found. * * @param callbackType Determines how this callback was triggered. Could be of * {@link ScanSettings#CALLBACK_TYPE_ALL_MATCHES} * @param callbackType Determines how this callback was triggered. Could be one of * {@link ScanSettings#CALLBACK_TYPE_ALL_MATCHES}, * {@link ScanSettings#CALLBACK_TYPE_FIRST_MATCH} or * {@link ScanSettings#CALLBACK_TYPE_MATCH_LOST} * @param result A Bluetooth LE scan result. */ public void onScanResult(int callbackType, ScanResult result) { Loading
core/java/android/bluetooth/le/ScanSettings.java +0 −11 Original line number Diff line number Diff line Loading @@ -59,17 +59,13 @@ public final class ScanSettings implements Parcelable { /** * A result callback is only triggered for the first advertisement packet received that matches * the filter criteria. * @hide */ @SystemApi public static final int CALLBACK_TYPE_FIRST_MATCH = 2; /** * Receive a callback when advertisements are no longer received from a device that has been * previously reported by a first match callback. * @hide */ @SystemApi public static final int CALLBACK_TYPE_MATCH_LOST = 4; Loading @@ -78,21 +74,18 @@ public final class ScanSettings implements Parcelable { */ /** * Match one advertisement per filter * @hide */ public static final int MATCH_NUM_ONE_ADVERTISEMENT = 1; /** * Match few advertisement per filter, depends on current capability and availibility of * the resources in hw * @hide */ public static final int MATCH_NUM_FEW_ADVERTISEMENT = 2; /** * Match as many advertisement per filter as hw could allow, depends on current * capability and availibility of the resources in hw * @hide */ public static final int MATCH_NUM_MAX_ADVERTISEMENT = 3; Loading @@ -100,14 +93,12 @@ public final class ScanSettings implements Parcelable { /** * In Aggressive mode, hw will determine a match sooner even with feeble signal strength * and few number of sightings/match in a duration. * @hide */ public static final int MATCH_MODE_AGGRESSIVE = 1; /** * For sticky mode, higher threshold of signal strength and sightings is required * before reporting by hw * @hide */ public static final int MATCH_MODE_STICKY = 2; Loading Loading @@ -324,7 +315,6 @@ public final class ScanSettings implements Parcelable { * {@link ScanSettings#MATCH_NUM_FEW_ADVERTISEMENT} or * {@link ScanSettings#MATCH_NUM_MAX_ADVERTISEMENT} * @throws IllegalArgumentException If the {@code matchMode} is invalid. * @hide */ public Builder setNumOfMatches(int numOfMatches) { if (numOfMatches < MATCH_NUM_ONE_ADVERTISEMENT Loading @@ -342,7 +332,6 @@ public final class ScanSettings implements Parcelable { * {@link ScanSettings#MATCH_MODE_AGGRESSIVE} or * {@link ScanSettings#MATCH_MODE_STICKY} * @throws IllegalArgumentException If the {@code matchMode} is invalid. * @hide */ public Builder setMatchMode(int matchMode) { if (matchMode < MATCH_MODE_AGGRESSIVE Loading