Merge "Modified the API to make coverage test possible" into nyc-dev
This commit is contained in:
@@ -19243,24 +19243,6 @@ package android.location {
|
||||
method public boolean hasFullBiasNanos();
|
||||
method public boolean hasLeapSecond();
|
||||
method public boolean hasTimeUncertaintyNanos();
|
||||
method public void reset();
|
||||
method public void resetBiasNanos();
|
||||
method public void resetBiasUncertaintyNanos();
|
||||
method public void resetDriftNanosPerSecond();
|
||||
method public void resetDriftUncertaintyNanosPerSecond();
|
||||
method public void resetFullBiasNanos();
|
||||
method public void resetLeapSecond();
|
||||
method public void resetTimeUncertaintyNanos();
|
||||
method public void set(android.location.GnssClock);
|
||||
method public void setBiasNanos(double);
|
||||
method public void setBiasUncertaintyNanos(double);
|
||||
method public void setDriftNanosPerSecond(double);
|
||||
method public void setDriftUncertaintyNanosPerSecond(double);
|
||||
method public void setFullBiasNanos(long);
|
||||
method public void setHardwareClockDiscontinuityCount(int);
|
||||
method public void setLeapSecond(int);
|
||||
method public void setTimeNanos(long);
|
||||
method public void setTimeUncertaintyNanos(double);
|
||||
method public void writeToParcel(android.os.Parcel, int);
|
||||
field public static final android.os.Parcelable.Creator<android.location.GnssClock> CREATOR;
|
||||
}
|
||||
@@ -19291,31 +19273,6 @@ package android.location {
|
||||
method public boolean hasCarrierPhaseUncertainty();
|
||||
method public boolean hasSnrInDb();
|
||||
method public boolean isPseudorangeRateCorrected();
|
||||
method public void reset();
|
||||
method public void resetCarrierCycles();
|
||||
method public void resetCarrierFrequencyHz();
|
||||
method public void resetCarrierPhase();
|
||||
method public void resetCarrierPhaseUncertainty();
|
||||
method public void resetSnrInDb();
|
||||
method public void set(android.location.GnssMeasurement);
|
||||
method public void setAccumulatedDeltaRangeMeters(double);
|
||||
method public void setAccumulatedDeltaRangeState(int);
|
||||
method public void setAccumulatedDeltaRangeUncertaintyMeters(double);
|
||||
method public void setCarrierCycles(long);
|
||||
method public void setCarrierFrequencyHz(float);
|
||||
method public void setCarrierPhase(double);
|
||||
method public void setCarrierPhaseUncertainty(double);
|
||||
method public void setCn0DbHz(double);
|
||||
method public void setConstellationType(int);
|
||||
method public void setMultipathIndicator(int);
|
||||
method public void setPseudorangeRateMetersPerSecond(double);
|
||||
method public void setPseudorangeRateUncertaintyMetersPerSecond(double);
|
||||
method public void setReceivedSvTimeNanos(long);
|
||||
method public void setReceivedSvTimeUncertaintyNanos(long);
|
||||
method public void setSnrInDb(double);
|
||||
method public void setState(int);
|
||||
method public void setSvid(int);
|
||||
method public void setTimeOffsetNanos(double);
|
||||
method public void writeToParcel(android.os.Parcel, int);
|
||||
field public static final int ADR_STATE_CYCLE_SLIP = 4; // 0x4
|
||||
field public static final int ADR_STATE_RESET = 2; // 0x2
|
||||
@@ -19365,14 +19322,6 @@ package android.location {
|
||||
method public int getSubmessageId();
|
||||
method public int getSvid();
|
||||
method public int getType();
|
||||
method public void reset();
|
||||
method public void set(android.location.GnssNavigationMessage);
|
||||
method public void setData(byte[]);
|
||||
method public void setMessageId(int);
|
||||
method public void setStatus(int);
|
||||
method public void setSubmessageId(int);
|
||||
method public void setSvid(int);
|
||||
method public void setType(int);
|
||||
method public void writeToParcel(android.os.Parcel, int);
|
||||
field public static final android.os.Parcelable.Creator<android.location.GnssNavigationMessage> CREATOR;
|
||||
field public static final int STATUS_PARITY_PASSED = 1; // 0x1
|
||||
|
||||
@@ -20416,24 +20416,6 @@ package android.location {
|
||||
method public boolean hasFullBiasNanos();
|
||||
method public boolean hasLeapSecond();
|
||||
method public boolean hasTimeUncertaintyNanos();
|
||||
method public void reset();
|
||||
method public void resetBiasNanos();
|
||||
method public void resetBiasUncertaintyNanos();
|
||||
method public void resetDriftNanosPerSecond();
|
||||
method public void resetDriftUncertaintyNanosPerSecond();
|
||||
method public void resetFullBiasNanos();
|
||||
method public void resetLeapSecond();
|
||||
method public void resetTimeUncertaintyNanos();
|
||||
method public void set(android.location.GnssClock);
|
||||
method public void setBiasNanos(double);
|
||||
method public void setBiasUncertaintyNanos(double);
|
||||
method public void setDriftNanosPerSecond(double);
|
||||
method public void setDriftUncertaintyNanosPerSecond(double);
|
||||
method public void setFullBiasNanos(long);
|
||||
method public void setHardwareClockDiscontinuityCount(int);
|
||||
method public void setLeapSecond(int);
|
||||
method public void setTimeNanos(long);
|
||||
method public void setTimeUncertaintyNanos(double);
|
||||
method public void writeToParcel(android.os.Parcel, int);
|
||||
field public static final android.os.Parcelable.Creator<android.location.GnssClock> CREATOR;
|
||||
}
|
||||
@@ -20464,31 +20446,6 @@ package android.location {
|
||||
method public boolean hasCarrierPhaseUncertainty();
|
||||
method public boolean hasSnrInDb();
|
||||
method public boolean isPseudorangeRateCorrected();
|
||||
method public void reset();
|
||||
method public void resetCarrierCycles();
|
||||
method public void resetCarrierFrequencyHz();
|
||||
method public void resetCarrierPhase();
|
||||
method public void resetCarrierPhaseUncertainty();
|
||||
method public void resetSnrInDb();
|
||||
method public void set(android.location.GnssMeasurement);
|
||||
method public void setAccumulatedDeltaRangeMeters(double);
|
||||
method public void setAccumulatedDeltaRangeState(int);
|
||||
method public void setAccumulatedDeltaRangeUncertaintyMeters(double);
|
||||
method public void setCarrierCycles(long);
|
||||
method public void setCarrierFrequencyHz(float);
|
||||
method public void setCarrierPhase(double);
|
||||
method public void setCarrierPhaseUncertainty(double);
|
||||
method public void setCn0DbHz(double);
|
||||
method public void setConstellationType(int);
|
||||
method public void setMultipathIndicator(int);
|
||||
method public void setPseudorangeRateMetersPerSecond(double);
|
||||
method public void setPseudorangeRateUncertaintyMetersPerSecond(double);
|
||||
method public void setReceivedSvTimeNanos(long);
|
||||
method public void setReceivedSvTimeUncertaintyNanos(long);
|
||||
method public void setSnrInDb(double);
|
||||
method public void setState(int);
|
||||
method public void setSvid(int);
|
||||
method public void setTimeOffsetNanos(double);
|
||||
method public void writeToParcel(android.os.Parcel, int);
|
||||
field public static final int ADR_STATE_CYCLE_SLIP = 4; // 0x4
|
||||
field public static final int ADR_STATE_RESET = 2; // 0x2
|
||||
@@ -20538,14 +20495,6 @@ package android.location {
|
||||
method public int getSubmessageId();
|
||||
method public int getSvid();
|
||||
method public int getType();
|
||||
method public void reset();
|
||||
method public void set(android.location.GnssNavigationMessage);
|
||||
method public void setData(byte[]);
|
||||
method public void setMessageId(int);
|
||||
method public void setStatus(int);
|
||||
method public void setSubmessageId(int);
|
||||
method public void setSvid(int);
|
||||
method public void setType(int);
|
||||
method public void writeToParcel(android.os.Parcel, int);
|
||||
field public static final android.os.Parcelable.Creator<android.location.GnssNavigationMessage> CREATOR;
|
||||
field public static final int STATUS_PARITY_PASSED = 1; // 0x1
|
||||
|
||||
@@ -19236,6 +19236,7 @@ package android.location {
|
||||
}
|
||||
|
||||
public final class GnssClock implements android.os.Parcelable {
|
||||
ctor public GnssClock();
|
||||
method public int describeContents();
|
||||
method public double getBiasNanos();
|
||||
method public double getBiasUncertaintyNanos();
|
||||
@@ -19276,6 +19277,7 @@ package android.location {
|
||||
}
|
||||
|
||||
public final class GnssMeasurement implements android.os.Parcelable {
|
||||
ctor public GnssMeasurement();
|
||||
method public int describeContents();
|
||||
method public double getAccumulatedDeltaRangeMeters();
|
||||
method public int getAccumulatedDeltaRangeState();
|
||||
@@ -19318,6 +19320,7 @@ package android.location {
|
||||
method public void setCn0DbHz(double);
|
||||
method public void setConstellationType(int);
|
||||
method public void setMultipathIndicator(int);
|
||||
method public void setPseudorangeRateCorrected(boolean);
|
||||
method public void setPseudorangeRateMetersPerSecond(double);
|
||||
method public void setPseudorangeRateUncertaintyMetersPerSecond(double);
|
||||
method public void setReceivedSvTimeNanos(long);
|
||||
@@ -19368,6 +19371,7 @@ package android.location {
|
||||
}
|
||||
|
||||
public final class GnssNavigationMessage implements android.os.Parcelable {
|
||||
ctor public GnssNavigationMessage();
|
||||
method public int describeContents();
|
||||
method public byte[] getData();
|
||||
method public int getMessageId();
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
|
||||
package android.location;
|
||||
|
||||
import android.annotation.TestApi;
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
|
||||
@@ -48,13 +49,19 @@ public final class GnssClock implements Parcelable {
|
||||
private double mDriftUncertaintyNanosPerSecond;
|
||||
private int mHardwareClockDiscontinuityCount;
|
||||
|
||||
GnssClock() {
|
||||
/**
|
||||
* @hide
|
||||
*/
|
||||
@TestApi
|
||||
public GnssClock() {
|
||||
initialize();
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets all contents to the values stored in the provided object.
|
||||
* @hide
|
||||
*/
|
||||
@TestApi
|
||||
public void set(GnssClock clock) {
|
||||
mFlags = clock.mFlags;
|
||||
mLeapSecond = clock.mLeapSecond;
|
||||
@@ -70,7 +77,9 @@ public final class GnssClock implements Parcelable {
|
||||
|
||||
/**
|
||||
* Resets all the contents to its original state.
|
||||
* @hide
|
||||
*/
|
||||
@TestApi
|
||||
public void reset() {
|
||||
initialize();
|
||||
}
|
||||
@@ -95,7 +104,9 @@ public final class GnssClock implements Parcelable {
|
||||
|
||||
/**
|
||||
* Sets the leap second associated with the clock's time.
|
||||
* @hide
|
||||
*/
|
||||
@TestApi
|
||||
public void setLeapSecond(int leapSecond) {
|
||||
setFlag(HAS_LEAP_SECOND);
|
||||
mLeapSecond = leapSecond;
|
||||
@@ -103,7 +114,9 @@ public final class GnssClock implements Parcelable {
|
||||
|
||||
/**
|
||||
* Resets the leap second associated with the clock's time.
|
||||
* @hide
|
||||
*/
|
||||
@TestApi
|
||||
public void resetLeapSecond() {
|
||||
resetFlag(HAS_LEAP_SECOND);
|
||||
mLeapSecond = Integer.MIN_VALUE;
|
||||
@@ -129,7 +142,9 @@ public final class GnssClock implements Parcelable {
|
||||
|
||||
/**
|
||||
* Sets the GNSS receiver internal clock in nanoseconds.
|
||||
* @hide
|
||||
*/
|
||||
@TestApi
|
||||
public void setTimeNanos(long timeNanos) {
|
||||
mTimeNanos = timeNanos;
|
||||
}
|
||||
@@ -153,7 +168,9 @@ public final class GnssClock implements Parcelable {
|
||||
|
||||
/**
|
||||
* Sets the clock's Time Uncertainty (1-Sigma) in nanoseconds.
|
||||
* @hide
|
||||
*/
|
||||
@TestApi
|
||||
public void setTimeUncertaintyNanos(double timeUncertaintyNanos) {
|
||||
setFlag(HAS_TIME_UNCERTAINTY);
|
||||
mTimeUncertaintyNanos = timeUncertaintyNanos;
|
||||
@@ -161,7 +178,9 @@ public final class GnssClock implements Parcelable {
|
||||
|
||||
/**
|
||||
* Resets the clock's Time Uncertainty (1-Sigma) in nanoseconds.
|
||||
* @hide
|
||||
*/
|
||||
@TestApi
|
||||
public void resetTimeUncertaintyNanos() {
|
||||
resetFlag(HAS_TIME_UNCERTAINTY);
|
||||
mTimeUncertaintyNanos = Double.NaN;
|
||||
@@ -193,7 +212,9 @@ public final class GnssClock implements Parcelable {
|
||||
|
||||
/**
|
||||
* Sets the full bias in nanoseconds.
|
||||
* @hide
|
||||
*/
|
||||
@TestApi
|
||||
public void setFullBiasNanos(long value) {
|
||||
setFlag(HAS_FULL_BIAS);
|
||||
mFullBiasNanos = value;
|
||||
@@ -201,7 +222,9 @@ public final class GnssClock implements Parcelable {
|
||||
|
||||
/**
|
||||
* Resets the full bias in nanoseconds.
|
||||
* @hide
|
||||
*/
|
||||
@TestApi
|
||||
public void resetFullBiasNanos() {
|
||||
resetFlag(HAS_FULL_BIAS);
|
||||
mFullBiasNanos = Long.MIN_VALUE;
|
||||
@@ -226,7 +249,9 @@ public final class GnssClock implements Parcelable {
|
||||
|
||||
/**
|
||||
* Sets the sub-nanosecond bias.
|
||||
* @hide
|
||||
*/
|
||||
@TestApi
|
||||
public void setBiasNanos(double biasNanos) {
|
||||
setFlag(HAS_BIAS);
|
||||
mBiasNanos = biasNanos;
|
||||
@@ -234,7 +259,9 @@ public final class GnssClock implements Parcelable {
|
||||
|
||||
/**
|
||||
* Resets the clock's Bias in nanoseconds.
|
||||
* @hide
|
||||
*/
|
||||
@TestApi
|
||||
public void resetBiasNanos() {
|
||||
resetFlag(HAS_BIAS);
|
||||
mBiasNanos = Double.NaN;
|
||||
@@ -258,7 +285,9 @@ public final class GnssClock implements Parcelable {
|
||||
|
||||
/**
|
||||
* Sets the clock's Bias Uncertainty (1-Sigma) in nanoseconds.
|
||||
* @hide
|
||||
*/
|
||||
@TestApi
|
||||
public void setBiasUncertaintyNanos(double biasUncertaintyNanos) {
|
||||
setFlag(HAS_BIAS_UNCERTAINTY);
|
||||
mBiasUncertaintyNanos = biasUncertaintyNanos;
|
||||
@@ -266,7 +295,9 @@ public final class GnssClock implements Parcelable {
|
||||
|
||||
/**
|
||||
* Resets the clock's Bias Uncertainty (1-Sigma) in nanoseconds.
|
||||
* @hide
|
||||
*/
|
||||
@TestApi
|
||||
public void resetBiasUncertaintyNanos() {
|
||||
resetFlag(HAS_BIAS_UNCERTAINTY);
|
||||
mBiasUncertaintyNanos = Double.NaN;
|
||||
@@ -292,7 +323,9 @@ public final class GnssClock implements Parcelable {
|
||||
|
||||
/**
|
||||
* Sets the clock's Drift in nanoseconds per second.
|
||||
* @hide
|
||||
*/
|
||||
@TestApi
|
||||
public void setDriftNanosPerSecond(double driftNanosPerSecond) {
|
||||
setFlag(HAS_DRIFT);
|
||||
mDriftNanosPerSecond = driftNanosPerSecond;
|
||||
@@ -300,7 +333,9 @@ public final class GnssClock implements Parcelable {
|
||||
|
||||
/**
|
||||
* Resets the clock's Drift in nanoseconds per second.
|
||||
* @hide
|
||||
*/
|
||||
@TestApi
|
||||
public void resetDriftNanosPerSecond() {
|
||||
resetFlag(HAS_DRIFT);
|
||||
mDriftNanosPerSecond = Double.NaN;
|
||||
@@ -324,7 +359,9 @@ public final class GnssClock implements Parcelable {
|
||||
|
||||
/**
|
||||
* Sets the clock's Drift Uncertainty (1-Sigma) in nanoseconds per second.
|
||||
* @hide
|
||||
*/
|
||||
@TestApi
|
||||
public void setDriftUncertaintyNanosPerSecond(double driftUncertaintyNanosPerSecond) {
|
||||
setFlag(HAS_DRIFT_UNCERTAINTY);
|
||||
mDriftUncertaintyNanosPerSecond = driftUncertaintyNanosPerSecond;
|
||||
@@ -339,14 +376,18 @@ public final class GnssClock implements Parcelable {
|
||||
|
||||
/**
|
||||
* Sets count of last hardware clock discontinuity.
|
||||
* @hide
|
||||
*/
|
||||
@TestApi
|
||||
public void setHardwareClockDiscontinuityCount(int value) {
|
||||
mHardwareClockDiscontinuityCount = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Resets the clock's Drift Uncertainty (1-Sigma) in nanoseconds per second.
|
||||
* @hide
|
||||
*/
|
||||
@TestApi
|
||||
public void resetDriftUncertaintyNanosPerSecond() {
|
||||
resetFlag(HAS_DRIFT_UNCERTAINTY);
|
||||
mDriftUncertaintyNanosPerSecond = Double.NaN;
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
|
||||
package android.location;
|
||||
|
||||
import android.annotation.TestApi;
|
||||
import android.annotation.IntDef;
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
@@ -46,6 +47,7 @@ public final class GnssMeasurement implements Parcelable {
|
||||
private double mCarrierPhaseUncertainty;
|
||||
private int mMultipathIndicator;
|
||||
private double mSnrInDb;
|
||||
private boolean mPseudorangeRateCorrected;
|
||||
|
||||
// The following enumerations must be in sync with the values declared in gps.h
|
||||
|
||||
@@ -55,7 +57,6 @@ public final class GnssMeasurement implements Parcelable {
|
||||
private static final int HAS_CARRIER_CYCLES = (1<<10);
|
||||
private static final int HAS_CARRIER_PHASE = (1<<11);
|
||||
private static final int HAS_CARRIER_PHASE_UNCERTAINTY = (1<<12);
|
||||
private static final int HAS_UNCORRECTED_PSEUDORANGE_RATE = (1<<18);
|
||||
|
||||
/** The status of multipath. */
|
||||
@Retention(RetentionPolicy.SOURCE)
|
||||
@@ -141,13 +142,19 @@ public final class GnssMeasurement implements Parcelable {
|
||||
|
||||
// End enumerations in sync with gps.h
|
||||
|
||||
GnssMeasurement() {
|
||||
/**
|
||||
* @hide
|
||||
*/
|
||||
@TestApi
|
||||
public GnssMeasurement() {
|
||||
initialize();
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets all contents to the values stored in the provided object.
|
||||
* @hide
|
||||
*/
|
||||
@TestApi
|
||||
public void set(GnssMeasurement measurement) {
|
||||
mFlags = measurement.mFlags;
|
||||
mSvid = measurement.mSvid;
|
||||
@@ -174,7 +181,9 @@ public final class GnssMeasurement implements Parcelable {
|
||||
|
||||
/**
|
||||
* Resets all the contents to its original state.
|
||||
* @hide
|
||||
*/
|
||||
@TestApi
|
||||
public void reset() {
|
||||
initialize();
|
||||
}
|
||||
@@ -189,7 +198,9 @@ public final class GnssMeasurement implements Parcelable {
|
||||
|
||||
/**
|
||||
* Sets the Pseud-random number (PRN).
|
||||
* @hide
|
||||
*/
|
||||
@TestApi
|
||||
public void setSvid(int value) {
|
||||
mSvid = value;
|
||||
}
|
||||
@@ -204,7 +215,9 @@ public final class GnssMeasurement implements Parcelable {
|
||||
|
||||
/**
|
||||
* Sets the constellation type.
|
||||
* @hide
|
||||
*/
|
||||
@TestApi
|
||||
public void setConstellationType(@GnssStatus.ConstellationType int value) {
|
||||
mConstellationType = value;
|
||||
}
|
||||
@@ -227,7 +240,9 @@ public final class GnssMeasurement implements Parcelable {
|
||||
|
||||
/**
|
||||
* Sets the time offset at which the measurement was taken in nanoseconds.
|
||||
* @hide
|
||||
*/
|
||||
@TestApi
|
||||
public void setTimeOffsetNanos(double value) {
|
||||
mTimeOffsetNanos = value;
|
||||
}
|
||||
@@ -244,7 +259,9 @@ public final class GnssMeasurement implements Parcelable {
|
||||
|
||||
/**
|
||||
* Sets the sync state.
|
||||
* @hide
|
||||
*/
|
||||
@TestApi
|
||||
public void setState(int value) {
|
||||
mState = value;
|
||||
}
|
||||
@@ -353,7 +370,9 @@ public final class GnssMeasurement implements Parcelable {
|
||||
|
||||
/**
|
||||
* Sets the received GNSS time in nanoseconds.
|
||||
* @hide
|
||||
*/
|
||||
@TestApi
|
||||
public void setReceivedSvTimeNanos(long value) {
|
||||
mReceivedSvTimeNanos = value;
|
||||
}
|
||||
@@ -367,7 +386,9 @@ public final class GnssMeasurement implements Parcelable {
|
||||
|
||||
/**
|
||||
* Sets the received GNSS time uncertainty (1-Sigma) in nanoseconds.
|
||||
* @hide
|
||||
*/
|
||||
@TestApi
|
||||
public void setReceivedSvTimeUncertaintyNanos(long value) {
|
||||
mReceivedSvTimeUncertaintyNanos = value;
|
||||
}
|
||||
@@ -384,7 +405,9 @@ public final class GnssMeasurement implements Parcelable {
|
||||
|
||||
/**
|
||||
* Sets the carrier-to-noise density in dB-Hz.
|
||||
* @hide
|
||||
*/
|
||||
@TestApi
|
||||
public void setCn0DbHz(double value) {
|
||||
mCn0DbHz = value;
|
||||
}
|
||||
@@ -409,7 +432,9 @@ public final class GnssMeasurement implements Parcelable {
|
||||
|
||||
/**
|
||||
* Sets the pseudorange rate at the timestamp in m/s.
|
||||
* @hide
|
||||
*/
|
||||
@TestApi
|
||||
public void setPseudorangeRateMetersPerSecond(double value) {
|
||||
mPseudorangeRateMetersPerSecond = value;
|
||||
}
|
||||
@@ -421,7 +446,16 @@ public final class GnssMeasurement implements Parcelable {
|
||||
* value, {@code false} if it contains an uncorrected value.
|
||||
*/
|
||||
public boolean isPseudorangeRateCorrected() {
|
||||
return !isFlagSet(HAS_UNCORRECTED_PSEUDORANGE_RATE);
|
||||
return mPseudorangeRateCorrected;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets whether the pseudorange corrected.
|
||||
* @hide
|
||||
*/
|
||||
@TestApi
|
||||
public void setPseudorangeRateCorrected(boolean value) {
|
||||
mPseudorangeRateCorrected = value;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -434,7 +468,9 @@ public final class GnssMeasurement implements Parcelable {
|
||||
|
||||
/**
|
||||
* Sets the pseudorange's rate uncertainty (1-Sigma) in m/s.
|
||||
* @hide
|
||||
*/
|
||||
@TestApi
|
||||
public void setPseudorangeRateUncertaintyMetersPerSecond(double value) {
|
||||
mPseudorangeRateUncertaintyMetersPerSecond = value;
|
||||
}
|
||||
@@ -450,7 +486,9 @@ public final class GnssMeasurement implements Parcelable {
|
||||
|
||||
/**
|
||||
* Sets the 'Accumulated Delta Range' state.
|
||||
* @hide
|
||||
*/
|
||||
@TestApi
|
||||
public void setAccumulatedDeltaRangeState(int value) {
|
||||
mAccumulatedDeltaRangeState = value;
|
||||
}
|
||||
@@ -500,7 +538,9 @@ public final class GnssMeasurement implements Parcelable {
|
||||
|
||||
/**
|
||||
* Sets the accumulated delta range in meters.
|
||||
* @hide
|
||||
*/
|
||||
@TestApi
|
||||
public void setAccumulatedDeltaRangeMeters(double value) {
|
||||
mAccumulatedDeltaRangeMeters = value;
|
||||
}
|
||||
@@ -519,7 +559,10 @@ public final class GnssMeasurement implements Parcelable {
|
||||
* Sets the accumulated delta range's uncertainty (1-sigma) in meters.
|
||||
*
|
||||
* The status of the value is represented by {@link #getAccumulatedDeltaRangeState()}.
|
||||
*
|
||||
* @hide
|
||||
*/
|
||||
@TestApi
|
||||
public void setAccumulatedDeltaRangeUncertaintyMeters(double value) {
|
||||
mAccumulatedDeltaRangeUncertaintyMeters = value;
|
||||
}
|
||||
@@ -543,7 +586,9 @@ public final class GnssMeasurement implements Parcelable {
|
||||
|
||||
/**
|
||||
* Sets the Carrier frequency (L1 or L2) in Hz.
|
||||
* @hide
|
||||
*/
|
||||
@TestApi
|
||||
public void setCarrierFrequencyHz(float carrierFrequencyHz) {
|
||||
setFlag(HAS_CARRIER_FREQUENCY);
|
||||
mCarrierFrequencyHz = carrierFrequencyHz;
|
||||
@@ -551,7 +596,9 @@ public final class GnssMeasurement implements Parcelable {
|
||||
|
||||
/**
|
||||
* Resets the Carrier frequency (L1 or L2) in Hz.
|
||||
* @hide
|
||||
*/
|
||||
@TestApi
|
||||
public void resetCarrierFrequencyHz() {
|
||||
resetFlag(HAS_CARRIER_FREQUENCY);
|
||||
mCarrierFrequencyHz = Float.NaN;
|
||||
@@ -576,7 +623,9 @@ public final class GnssMeasurement implements Parcelable {
|
||||
|
||||
/**
|
||||
* Sets the number of full carrier cycles between the satellite and the receiver.
|
||||
* @hide
|
||||
*/
|
||||
@TestApi
|
||||
public void setCarrierCycles(long value) {
|
||||
setFlag(HAS_CARRIER_CYCLES);
|
||||
mCarrierCycles = value;
|
||||
@@ -584,7 +633,9 @@ public final class GnssMeasurement implements Parcelable {
|
||||
|
||||
/**
|
||||
* Resets the number of full carrier cycles between the satellite and the receiver.
|
||||
* @hide
|
||||
*/
|
||||
@TestApi
|
||||
public void resetCarrierCycles() {
|
||||
resetFlag(HAS_CARRIER_CYCLES);
|
||||
mCarrierCycles = Long.MIN_VALUE;
|
||||
@@ -613,7 +664,9 @@ public final class GnssMeasurement implements Parcelable {
|
||||
|
||||
/**
|
||||
* Sets the RF phase detected by the receiver.
|
||||
* @hide
|
||||
*/
|
||||
@TestApi
|
||||
public void setCarrierPhase(double value) {
|
||||
setFlag(HAS_CARRIER_PHASE);
|
||||
mCarrierPhase = value;
|
||||
@@ -621,7 +674,9 @@ public final class GnssMeasurement implements Parcelable {
|
||||
|
||||
/**
|
||||
* Resets the RF phase detected by the receiver.
|
||||
* @hide
|
||||
*/
|
||||
@TestApi
|
||||
public void resetCarrierPhase() {
|
||||
resetFlag(HAS_CARRIER_PHASE);
|
||||
mCarrierPhase = Double.NaN;
|
||||
@@ -646,7 +701,9 @@ public final class GnssMeasurement implements Parcelable {
|
||||
|
||||
/**
|
||||
* Sets the Carrier-phase's uncertainty (1-Sigma) in cycles.
|
||||
* @hide
|
||||
*/
|
||||
@TestApi
|
||||
public void setCarrierPhaseUncertainty(double value) {
|
||||
setFlag(HAS_CARRIER_PHASE_UNCERTAINTY);
|
||||
mCarrierPhaseUncertainty = value;
|
||||
@@ -654,7 +711,9 @@ public final class GnssMeasurement implements Parcelable {
|
||||
|
||||
/**
|
||||
* Resets the Carrier-phase's uncertainty (1-Sigma) in cycles.
|
||||
* @hide
|
||||
*/
|
||||
@TestApi
|
||||
public void resetCarrierPhaseUncertainty() {
|
||||
resetFlag(HAS_CARRIER_PHASE_UNCERTAINTY);
|
||||
mCarrierPhaseUncertainty = Double.NaN;
|
||||
@@ -670,7 +729,9 @@ public final class GnssMeasurement implements Parcelable {
|
||||
|
||||
/**
|
||||
* Sets the 'multi-path' indicator.
|
||||
* @hide
|
||||
*/
|
||||
@TestApi
|
||||
public void setMultipathIndicator(@MultipathIndicator int value) {
|
||||
mMultipathIndicator = value;
|
||||
}
|
||||
@@ -710,7 +771,9 @@ public final class GnssMeasurement implements Parcelable {
|
||||
|
||||
/**
|
||||
* Sets the Signal-to-noise ratio (SNR) in dB.
|
||||
* @hide
|
||||
*/
|
||||
@TestApi
|
||||
public void setSnrInDb(double snrInDb) {
|
||||
setFlag(HAS_SNR);
|
||||
mSnrInDb = snrInDb;
|
||||
@@ -718,7 +781,9 @@ public final class GnssMeasurement implements Parcelable {
|
||||
|
||||
/**
|
||||
* Resets the Signal-to-noise ratio (SNR) in dB.
|
||||
* @hide
|
||||
*/
|
||||
@TestApi
|
||||
public void resetSnrInDb() {
|
||||
resetFlag(HAS_SNR);
|
||||
mSnrInDb = Double.NaN;
|
||||
@@ -748,6 +813,7 @@ public final class GnssMeasurement implements Parcelable {
|
||||
gnssMeasurement.mCarrierPhaseUncertainty = parcel.readDouble();
|
||||
gnssMeasurement.mMultipathIndicator = parcel.readInt();
|
||||
gnssMeasurement.mSnrInDb = parcel.readDouble();
|
||||
gnssMeasurement.mPseudorangeRateCorrected = (parcel.readByte() != 0);
|
||||
|
||||
return gnssMeasurement;
|
||||
}
|
||||
@@ -779,6 +845,7 @@ public final class GnssMeasurement implements Parcelable {
|
||||
parcel.writeDouble(mCarrierPhaseUncertainty);
|
||||
parcel.writeInt(mMultipathIndicator);
|
||||
parcel.writeDouble(mSnrInDb);
|
||||
parcel.writeByte((byte) (mPseudorangeRateCorrected ? 1 : 0));
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -876,6 +943,7 @@ public final class GnssMeasurement implements Parcelable {
|
||||
resetCarrierPhaseUncertainty();
|
||||
setMultipathIndicator(MULTIPATH_INDICATOR_UNKNOWN);
|
||||
resetSnrInDb();
|
||||
setPseudorangeRateCorrected(false);
|
||||
}
|
||||
|
||||
private void setFlag(int flag) {
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
|
||||
package android.location;
|
||||
|
||||
import android.annotation.TestApi;
|
||||
import android.annotation.IntDef;
|
||||
import android.annotation.NonNull;
|
||||
import android.os.Parcel;
|
||||
@@ -86,13 +87,19 @@ public final class GnssNavigationMessage implements Parcelable {
|
||||
private byte[] mData;
|
||||
private int mStatus;
|
||||
|
||||
GnssNavigationMessage() {
|
||||
/**
|
||||
* @hide
|
||||
*/
|
||||
@TestApi
|
||||
public GnssNavigationMessage() {
|
||||
initialize();
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets all contents to the values stored in the provided object.
|
||||
* @hide
|
||||
*/
|
||||
@TestApi
|
||||
public void set(GnssNavigationMessage navigationMessage) {
|
||||
mType = navigationMessage.mType;
|
||||
mSvid = navigationMessage.mSvid;
|
||||
@@ -104,7 +111,9 @@ public final class GnssNavigationMessage implements Parcelable {
|
||||
|
||||
/**
|
||||
* Resets all the contents to its original state.
|
||||
* @hide
|
||||
*/
|
||||
@TestApi
|
||||
public void reset() {
|
||||
initialize();
|
||||
}
|
||||
@@ -119,7 +128,9 @@ public final class GnssNavigationMessage implements Parcelable {
|
||||
|
||||
/**
|
||||
* Sets the type of the navigation message.
|
||||
* @hide
|
||||
*/
|
||||
@TestApi
|
||||
public void setType(@GnssNavigationMessageType int value) {
|
||||
mType = value;
|
||||
}
|
||||
@@ -165,7 +176,9 @@ public final class GnssNavigationMessage implements Parcelable {
|
||||
|
||||
/**
|
||||
* Sets the Pseud-random number.
|
||||
* @hide
|
||||
*/
|
||||
@TestApi
|
||||
public void setSvid(int value) {
|
||||
mSvid = value;
|
||||
}
|
||||
@@ -182,7 +195,9 @@ public final class GnssNavigationMessage implements Parcelable {
|
||||
|
||||
/**
|
||||
* Sets the Message Identifier.
|
||||
* @hide
|
||||
*/
|
||||
@TestApi
|
||||
public void setMessageId(int value) {
|
||||
mMessageId = value;
|
||||
}
|
||||
@@ -199,7 +214,9 @@ public final class GnssNavigationMessage implements Parcelable {
|
||||
|
||||
/**
|
||||
* Sets the Sub-message identifier.
|
||||
* @hide
|
||||
*/
|
||||
@TestApi
|
||||
public void setSubmessageId(int value) {
|
||||
mSubmessageId = value;
|
||||
}
|
||||
@@ -215,7 +232,9 @@ public final class GnssNavigationMessage implements Parcelable {
|
||||
|
||||
/**
|
||||
* Sets the data associated with the Navigation Message.
|
||||
* @hide
|
||||
*/
|
||||
@TestApi
|
||||
public void setData(byte[] value) {
|
||||
if (value == null) {
|
||||
throw new InvalidParameterException("Data must be a non-null array");
|
||||
@@ -233,7 +252,9 @@ public final class GnssNavigationMessage implements Parcelable {
|
||||
|
||||
/**
|
||||
* Sets the status of the navigation message.
|
||||
* @hide
|
||||
*/
|
||||
@TestApi
|
||||
public void setStatus(int value) {
|
||||
mStatus = value;
|
||||
}
|
||||
|
||||
@@ -1209,6 +1209,10 @@ static jobject translate_gps_measurement(JNIEnv* env,
|
||||
static_cast<int32_t>(measurement->multipath_indicator));
|
||||
SET_IF(GNSS_MEASUREMENT_HAS_SNR, SnrInDb, measurement->snr_db);
|
||||
|
||||
SET_IF(!GPS_MEASUREMENT_HAS_UNCORRECTED_PSEUDORANGE_RATE,
|
||||
PseudorangeRateCorrected,
|
||||
true);
|
||||
|
||||
return object.get();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user