// Signature format: 2.0 package android.uwb { public final class AngleMeasurement implements android.os.Parcelable { ctor public AngleMeasurement(@FloatRange(from=-3.141592653589793, to=3.141592653589793) double, @FloatRange(from=0.0, to=3.141592653589793) double, @FloatRange(from=0.0, to=1.0) double); method public int describeContents(); method @FloatRange(from=0.0, to=1.0) public double getConfidenceLevel(); method @FloatRange(from=0.0, to=3.141592653589793) public double getErrorRadians(); method @FloatRange(from=-3.141592653589793, to=3.141592653589793) public double getRadians(); method public void writeToParcel(@NonNull android.os.Parcel, int); field @NonNull public static final android.os.Parcelable.Creator CREATOR; } public final class AngleOfArrivalMeasurement implements android.os.Parcelable { method public int describeContents(); method @Nullable public android.uwb.AngleMeasurement getAltitude(); method @NonNull public android.uwb.AngleMeasurement getAzimuth(); method public void writeToParcel(@NonNull android.os.Parcel, int); field @NonNull public static final android.os.Parcelable.Creator CREATOR; } public static final class AngleOfArrivalMeasurement.Builder { ctor public AngleOfArrivalMeasurement.Builder(@NonNull android.uwb.AngleMeasurement); method @NonNull public android.uwb.AngleOfArrivalMeasurement build(); method @NonNull public android.uwb.AngleOfArrivalMeasurement.Builder setAltitude(@NonNull android.uwb.AngleMeasurement); } public final class DistanceMeasurement implements android.os.Parcelable { method public int describeContents(); method @FloatRange(from=0.0, to=1.0) public double getConfidenceLevel(); method @FloatRange(from=0.0) public double getErrorMeters(); method public double getMeters(); method public void writeToParcel(@NonNull android.os.Parcel, int); field @NonNull public static final android.os.Parcelable.Creator CREATOR; } public static final class DistanceMeasurement.Builder { ctor public DistanceMeasurement.Builder(); method @NonNull public android.uwb.DistanceMeasurement build(); method @NonNull public android.uwb.DistanceMeasurement.Builder setConfidenceLevel(@FloatRange(from=0.0, to=1.0) double); method @NonNull public android.uwb.DistanceMeasurement.Builder setErrorMeters(@FloatRange(from=0.0) double); method @NonNull public android.uwb.DistanceMeasurement.Builder setMeters(double); } public final class RangingMeasurement implements android.os.Parcelable { method public int describeContents(); method @Nullable public android.uwb.AngleOfArrivalMeasurement getAngleOfArrivalMeasurement(); method @Nullable public android.uwb.DistanceMeasurement getDistanceMeasurement(); method public long getElapsedRealtimeNanos(); method @NonNull public android.uwb.UwbAddress getRemoteDeviceAddress(); method public int getStatus(); method public void writeToParcel(@NonNull android.os.Parcel, int); field @NonNull public static final android.os.Parcelable.Creator CREATOR; field public static final int RANGING_STATUS_FAILURE_OUT_OF_RANGE = 1; // 0x1 field public static final int RANGING_STATUS_FAILURE_UNKNOWN_ERROR = -1; // 0xffffffff field public static final int RANGING_STATUS_SUCCESS = 0; // 0x0 } public static final class RangingMeasurement.Builder { ctor public RangingMeasurement.Builder(); method @NonNull public android.uwb.RangingMeasurement build(); method @NonNull public android.uwb.RangingMeasurement.Builder setAngleOfArrivalMeasurement(@NonNull android.uwb.AngleOfArrivalMeasurement); method @NonNull public android.uwb.RangingMeasurement.Builder setDistanceMeasurement(@NonNull android.uwb.DistanceMeasurement); method @NonNull public android.uwb.RangingMeasurement.Builder setElapsedRealtimeNanos(long); method @NonNull public android.uwb.RangingMeasurement.Builder setRemoteDeviceAddress(@NonNull android.uwb.UwbAddress); method @NonNull public android.uwb.RangingMeasurement.Builder setStatus(int); } public final class RangingReport implements android.os.Parcelable { method public int describeContents(); method @NonNull public java.util.List getMeasurements(); method public void writeToParcel(@NonNull android.os.Parcel, int); field @NonNull public static final android.os.Parcelable.Creator CREATOR; } public static final class RangingReport.Builder { ctor public RangingReport.Builder(); method @NonNull public android.uwb.RangingReport.Builder addMeasurement(@NonNull android.uwb.RangingMeasurement); method @NonNull public android.uwb.RangingReport.Builder addMeasurements(@NonNull java.util.List); method @NonNull public android.uwb.RangingReport build(); } public final class RangingSession implements java.lang.AutoCloseable { method @RequiresPermission(android.Manifest.permission.UWB_PRIVILEGED) public void close(); method @RequiresPermission(android.Manifest.permission.UWB_PRIVILEGED) public void reconfigure(@NonNull android.os.PersistableBundle); method @RequiresPermission(android.Manifest.permission.UWB_PRIVILEGED) public void start(@NonNull android.os.PersistableBundle); method @RequiresPermission(android.Manifest.permission.UWB_PRIVILEGED) public void stop(); } public static interface RangingSession.Callback { method public void onClosed(int, @NonNull android.os.PersistableBundle); method public void onOpenFailed(int, @NonNull android.os.PersistableBundle); method public void onOpened(@NonNull android.uwb.RangingSession); method public void onReconfigureFailed(int, @NonNull android.os.PersistableBundle); method public void onReconfigured(@NonNull android.os.PersistableBundle); method public void onReportReceived(@NonNull android.uwb.RangingReport); method public void onStartFailed(int, @NonNull android.os.PersistableBundle); method public void onStarted(@NonNull android.os.PersistableBundle); method public void onStopFailed(int, @NonNull android.os.PersistableBundle); method public void onStopped(int, @NonNull android.os.PersistableBundle); field public static final int REASON_BAD_PARAMETERS = 3; // 0x3 field public static final int REASON_GENERIC_ERROR = 4; // 0x4 field public static final int REASON_LOCAL_REQUEST = 1; // 0x1 field public static final int REASON_MAX_SESSIONS_REACHED = 5; // 0x5 field public static final int REASON_PROTOCOL_SPECIFIC_ERROR = 7; // 0x7 field public static final int REASON_REMOTE_REQUEST = 2; // 0x2 field public static final int REASON_SYSTEM_POLICY = 6; // 0x6 field public static final int REASON_UNKNOWN = 0; // 0x0 } public final class UwbAddress implements android.os.Parcelable { method public int describeContents(); method @NonNull public static android.uwb.UwbAddress fromBytes(@NonNull byte[]); method public int size(); method @NonNull public byte[] toBytes(); method public void writeToParcel(@NonNull android.os.Parcel, int); field @NonNull public static final android.os.Parcelable.Creator CREATOR; field public static final int EXTENDED_ADDRESS_BYTE_LENGTH = 8; // 0x8 field public static final int SHORT_ADDRESS_BYTE_LENGTH = 2; // 0x2 } public final class UwbManager { method @RequiresPermission(android.Manifest.permission.UWB_PRIVILEGED) public long elapsedRealtimeResolutionNanos(); method @NonNull @RequiresPermission(android.Manifest.permission.UWB_PRIVILEGED) public android.os.PersistableBundle getSpecificationInfo(); method @NonNull @RequiresPermission(allOf={android.Manifest.permission.UWB_PRIVILEGED, android.Manifest.permission.UWB_RANGING}) public android.os.CancellationSignal openRangingSession(@NonNull android.os.PersistableBundle, @NonNull java.util.concurrent.Executor, @NonNull android.uwb.RangingSession.Callback); method @RequiresPermission(android.Manifest.permission.UWB_PRIVILEGED) public void registerAdapterStateCallback(@NonNull java.util.concurrent.Executor, @NonNull android.uwb.UwbManager.AdapterStateCallback); method @RequiresPermission(android.Manifest.permission.UWB_PRIVILEGED) public void unregisterAdapterStateCallback(@NonNull android.uwb.UwbManager.AdapterStateCallback); } public static interface UwbManager.AdapterStateCallback { method public void onStateChanged(int, int); field public static final int STATE_CHANGED_REASON_ALL_SESSIONS_CLOSED = 1; // 0x1 field public static final int STATE_CHANGED_REASON_ERROR_UNKNOWN = 4; // 0x4 field public static final int STATE_CHANGED_REASON_SESSION_STARTED = 0; // 0x0 field public static final int STATE_CHANGED_REASON_SYSTEM_BOOT = 3; // 0x3 field public static final int STATE_CHANGED_REASON_SYSTEM_POLICY = 2; // 0x2 field public static final int STATE_DISABLED = 0; // 0x0 field public static final int STATE_ENABLED_ACTIVE = 2; // 0x2 field public static final int STATE_ENABLED_INACTIVE = 1; // 0x1 } }