summaryrefslogtreecommitdiff
path: root/framework/api
diff options
context:
space:
mode:
author Chienyuan Huang <chienyuanhuang@google.com> 2024-01-16 07:06:24 +0000
committer Chienyuan Huang <chienyuanhuang@google.com> 2024-01-22 06:29:00 +0000
commit424735e4e35609ff0a615de0e5cce71d567d4e60 (patch)
treea352378b8864a30c9f16b5323e55f902c497c3ae /framework/api
parent2817688bdd72ab02416f57c4dbd021d27b08ce14 (diff)
Add class to set parameters for Channel Sounding
Bug: 319563845 Bug: 317683528 Test: atest ChannelSoundingParamsTest Test: atest DistanceMeasurementParamsTest Change-Id: I10e508d02a71e158b3306ebea3abf472abc6614c
Diffstat (limited to 'framework/api')
-rw-r--r--framework/api/system-current.txt29
1 files changed, 29 insertions, 0 deletions
diff --git a/framework/api/system-current.txt b/framework/api/system-current.txt
index c62b953507..139e435b55 100644
--- a/framework/api/system-current.txt
+++ b/framework/api/system-current.txt
@@ -1227,6 +1227,33 @@ package android.bluetooth.le {
method @Deprecated @RequiresPermission(android.Manifest.permission.BLUETOOTH_SCAN) public void startTruncatedScan(java.util.List<android.bluetooth.le.TruncatedFilter>, android.bluetooth.le.ScanSettings, android.bluetooth.le.ScanCallback);
}
+ @FlaggedApi("com.android.bluetooth.flags.channel_sounding") public final class ChannelSoundingParams implements android.os.Parcelable {
+ method public int describeContents();
+ method public int getCsSecurityLevel();
+ method public int getLocationType();
+ method public int getSightType();
+ method public void writeToParcel(@NonNull android.os.Parcel, int);
+ field @NonNull public static final android.os.Parcelable.Creator<android.bluetooth.le.ChannelSoundingParams> CREATOR;
+ field public static final int CS_SECURITY_LEVEL_FOUR = 4; // 0x4
+ field public static final int CS_SECURITY_LEVEL_ONE = 1; // 0x1
+ field public static final int CS_SECURITY_LEVEL_THREE = 3; // 0x3
+ field public static final int CS_SECURITY_LEVEL_TWO = 2; // 0x2
+ field public static final int LOCATION_TYPE_INDOOR = 1; // 0x1
+ field public static final int LOCATION_TYPE_OUTDOOR = 2; // 0x2
+ field public static final int LOCATION_TYPE_UNKNOWN = 0; // 0x0
+ field public static final int SIGHT_TYPE_LINE_OF_SIGHT = 1; // 0x1
+ field public static final int SIGHT_TYPE_NON_LINE_OF_SIGHT = 2; // 0x2
+ field public static final int SIGHT_TYPE_UNKNOWN = 0; // 0x0
+ }
+
+ public static final class ChannelSoundingParams.Builder {
+ ctor public ChannelSoundingParams.Builder();
+ method @NonNull public android.bluetooth.le.ChannelSoundingParams build();
+ method @NonNull public android.bluetooth.le.ChannelSoundingParams.Builder setCsSecurityLevel(int);
+ method @NonNull public android.bluetooth.le.ChannelSoundingParams.Builder setLocationType(int);
+ method @NonNull public android.bluetooth.le.ChannelSoundingParams.Builder setSightType(int);
+ }
+
public final class DistanceMeasurementManager {
method @NonNull @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public java.util.List<android.bluetooth.le.DistanceMeasurementMethod> getSupportedMethods();
method @Nullable @RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT, android.Manifest.permission.BLUETOOTH_PRIVILEGED}) public android.os.CancellationSignal startMeasurementSession(@NonNull android.bluetooth.le.DistanceMeasurementParams, @NonNull java.util.concurrent.Executor, @NonNull android.bluetooth.le.DistanceMeasurementSession.Callback);
@@ -1253,6 +1280,7 @@ package android.bluetooth.le {
public final class DistanceMeasurementParams implements android.os.Parcelable {
method public int describeContents();
+ method @FlaggedApi("com.android.bluetooth.flags.channel_sounding") @Nullable public android.bluetooth.le.ChannelSoundingParams getChannelSoundingParams();
method public static int getDefaultDurationSeconds();
method @NonNull public android.bluetooth.BluetoothDevice getDevice();
method @IntRange(from=0) public int getDurationSeconds();
@@ -1269,6 +1297,7 @@ package android.bluetooth.le {
public static final class DistanceMeasurementParams.Builder {
ctor public DistanceMeasurementParams.Builder(@NonNull android.bluetooth.BluetoothDevice);
method @NonNull public android.bluetooth.le.DistanceMeasurementParams build();
+ method @FlaggedApi("com.android.bluetooth.flags.channel_sounding") @NonNull public android.bluetooth.le.DistanceMeasurementParams.Builder setChannelSoundingParams(@NonNull android.bluetooth.le.ChannelSoundingParams);
method @NonNull public android.bluetooth.le.DistanceMeasurementParams.Builder setDurationSeconds(@IntRange(from=0) int);
method @NonNull public android.bluetooth.le.DistanceMeasurementParams.Builder setFrequency(int);
method @NonNull public android.bluetooth.le.DistanceMeasurementParams.Builder setMethodId(int);