Merge "[RTT] Expose new public API for number of measurements" into pi-dev
am: 8d2404d1cd
Change-Id: I3418b5cae24457dd77b8573926b264c8e209c161
This commit is contained in:
@@ -28643,6 +28643,8 @@ package android.net.wifi.rtt {
|
|||||||
method public int getDistanceMm();
|
method public int getDistanceMm();
|
||||||
method public int getDistanceStdDevMm();
|
method public int getDistanceStdDevMm();
|
||||||
method public android.net.MacAddress getMacAddress();
|
method public android.net.MacAddress getMacAddress();
|
||||||
|
method public int getNumAttemptedMeasurements();
|
||||||
|
method public int getNumSuccessfulMeasurements();
|
||||||
method public android.net.wifi.aware.PeerHandle getPeerHandle();
|
method public android.net.wifi.aware.PeerHandle getPeerHandle();
|
||||||
method public long getRangingTimestampMillis();
|
method public long getRangingTimestampMillis();
|
||||||
method public int getRssi();
|
method public int getRssi();
|
||||||
|
|||||||
@@ -170,7 +170,9 @@ public final class RangingResult implements Parcelable {
|
|||||||
/**
|
/**
|
||||||
* @return The standard deviation of the measured distance (in mm) to the device specified by
|
* @return The standard deviation of the measured distance (in mm) to the device specified by
|
||||||
* {@link #getMacAddress()} or {@link #getPeerHandle()}. The standard deviation is calculated
|
* {@link #getMacAddress()} or {@link #getPeerHandle()}. The standard deviation is calculated
|
||||||
* over the measurements executed in a single RTT burst.
|
* over the measurements executed in a single RTT burst. The number of measurements is returned
|
||||||
|
* by {@link #getNumSuccessfulMeasurements()} - 0 successful measurements indicate that the
|
||||||
|
* standard deviation is not valid (a valid standard deviation requires at least 2 data points).
|
||||||
* <p>
|
* <p>
|
||||||
* Only valid if {@link #getStatus()} returns {@link #STATUS_SUCCESS}, otherwise will throw an
|
* Only valid if {@link #getStatus()} returns {@link #STATUS_SUCCESS}, otherwise will throw an
|
||||||
* exception.
|
* exception.
|
||||||
@@ -199,11 +201,12 @@ public final class RangingResult implements Parcelable {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @return The number of attempted measurements used in the RTT exchange resulting in this set
|
* @return The number of attempted measurements used in the RTT exchange resulting in this set
|
||||||
* of results.
|
* of results. The number of successful measurements is returned by
|
||||||
|
* {@link #getNumSuccessfulMeasurements()} which at most, if there are no errors, will be 1 less
|
||||||
|
* that the number of attempted measurements.
|
||||||
* <p>
|
* <p>
|
||||||
* Only valid if {@link #getStatus()} returns {@link #STATUS_SUCCESS}, otherwise will throw an
|
* Only valid if {@link #getStatus()} returns {@link #STATUS_SUCCESS}, otherwise will throw an
|
||||||
* exception.
|
* exception.
|
||||||
* @hide
|
|
||||||
*/
|
*/
|
||||||
public int getNumAttemptedMeasurements() {
|
public int getNumAttemptedMeasurements() {
|
||||||
if (mStatus != STATUS_SUCCESS) {
|
if (mStatus != STATUS_SUCCESS) {
|
||||||
@@ -220,9 +223,12 @@ public final class RangingResult implements Parcelable {
|
|||||||
* returned by {@link #getDistanceStdDevMm()}, is not valid (a 0 is returned for the standard
|
* returned by {@link #getDistanceStdDevMm()}, is not valid (a 0 is returned for the standard
|
||||||
* deviation).
|
* deviation).
|
||||||
* <p>
|
* <p>
|
||||||
|
* The total number of measurement attempts is returned by
|
||||||
|
* {@link #getNumAttemptedMeasurements()}. The number of successful measurements will be at
|
||||||
|
* most 1 less then the number of attempted measurements.
|
||||||
|
* <p>
|
||||||
* Only valid if {@link #getStatus()} returns {@link #STATUS_SUCCESS}, otherwise will throw an
|
* Only valid if {@link #getStatus()} returns {@link #STATUS_SUCCESS}, otherwise will throw an
|
||||||
* exception.
|
* exception.
|
||||||
* @hide
|
|
||||||
*/
|
*/
|
||||||
public int getNumSuccessfulMeasurements() {
|
public int getNumSuccessfulMeasurements() {
|
||||||
if (mStatus != STATUS_SUCCESS) {
|
if (mStatus != STATUS_SUCCESS) {
|
||||||
|
|||||||
Reference in New Issue
Block a user