android.location.GnssMeasurementsEvent Maven / Gradle / Ivy
Show all versions of androidstub Show documentation
package android.location;
import android.annotation.IntDef;
import android.annotation.NonNull;
import android.os.Parcel;
import android.os.Parcelable;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.util.Collection;
/**
* A class implementing a container for data associated with a measurement event.
* Events are delivered to registered instances of {@link Callback}.
*/
public final class GnssMeasurementsEvent implements Parcelable {
public static abstract class Callback {
/**
* The status of the GNSS measurements event.
*
* @hide
*/
@Retention(RetentionPolicy.SOURCE)
@IntDef({STATUS_NOT_SUPPORTED, STATUS_READY, STATUS_LOCATION_DISABLED, STATUS_NOT_ALLOWED})
public @interface GnssMeasurementsStatus {
}
/**
* The system does not support tracking of GNSS Measurements.
*
* This status will not change in the future.
*/
public static final int STATUS_NOT_SUPPORTED = 0;
/**
* GNSS Measurements are successfully being tracked, it will receive updates once they are
* available.
*/
public static final int STATUS_READY = 1;
/**
* GPS provider or Location is disabled, updates will not be received until they are
* enabled.
*/
public static final int STATUS_LOCATION_DISABLED = 2;
/**
* The client is not allowed to register for GNSS Measurements in general or in the
* requested mode.
*
*
Such a status is returned when a client tries to request a functionality from the GNSS
* chipset while another client has an ongoing request that does not allow such
* functionality to be performed.
*
*
If such a status is received, one would try again at a later time point where no
* other client is having a conflicting request.
*/
public static final int STATUS_NOT_ALLOWED = 3;
/**
* Reports the latest collected GNSS Measurements.
*/
public void onGnssMeasurementsReceived(GnssMeasurementsEvent eventArgs) {
}
/**
* Reports the latest status of the GNSS Measurements sub-system.
*/
public void onStatusChanged(@GnssMeasurementsStatus int status) {
}
}
/**
* Gets the GNSS receiver clock information associated with the measurements for the current
* event.
*/
@NonNull
public GnssClock getClock() {
throw new RuntimeException("Stub!");
}
/**
* Gets a read-only collection of measurements associated with the current event.
*/
@NonNull
public Collection getMeasurements() {
throw new RuntimeException("Stub!");
}
public static final @android.annotation.NonNull
Creator CREATOR =
new Creator() {
@Override
public GnssMeasurementsEvent createFromParcel(Parcel in) {
throw new RuntimeException("Stub!");
}
@Override
public GnssMeasurementsEvent[] newArray(int size) {
throw new RuntimeException("Stub!");
}
};
@Override
public int describeContents() {
return 0;
}
@Override
public void writeToParcel(Parcel parcel, int flags) {
throw new RuntimeException("Stub!");
}
@Override
public String toString() {
throw new RuntimeException("Stub!");
}
}