Loading api/current.txt +0 −51 Original line number Diff line number Diff line Loading @@ -19171,24 +19171,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; } Loading Loading @@ -19219,31 +19201,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 Loading Loading @@ -19293,14 +19250,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 api/system-current.txt +0 −51 Original line number Diff line number Diff line Loading @@ -20344,24 +20344,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; } Loading Loading @@ -20392,31 +20374,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 Loading Loading @@ -20466,14 +20423,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 api/test-current.txt +4 −0 Original line number Diff line number Diff line Loading @@ -19164,6 +19164,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(); Loading Loading @@ -19204,6 +19205,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(); Loading Loading @@ -19246,6 +19248,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); Loading Loading @@ -19296,6 +19299,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(); location/java/android/location/GnssClock.java +42 −1 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ package android.location; import android.annotation.TestApi; import android.os.Parcel; import android.os.Parcelable; Loading Loading @@ -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; Loading @@ -70,7 +77,9 @@ public final class GnssClock implements Parcelable { /** * Resets all the contents to its original state. * @hide */ @TestApi public void reset() { initialize(); } Loading @@ -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; Loading @@ -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; Loading @@ -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; } Loading @@ -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; Loading @@ -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; Loading Loading @@ -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; Loading @@ -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; Loading @@ -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; Loading @@ -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; Loading @@ -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; Loading @@ -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; Loading @@ -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; Loading @@ -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; Loading @@ -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; Loading @@ -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; Loading location/java/android/location/GnssMeasurement.java +71 −3 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ package android.location; import android.annotation.TestApi; import android.annotation.IntDef; import android.os.Parcel; import android.os.Parcelable; Loading Loading @@ -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 Loading @@ -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) Loading Loading @@ -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; Loading @@ -174,7 +181,9 @@ public final class GnssMeasurement implements Parcelable { /** * Resets all the contents to its original state. * @hide */ @TestApi public void reset() { initialize(); } Loading @@ -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; } Loading @@ -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; } Loading @@ -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; } Loading @@ -244,7 +259,9 @@ public final class GnssMeasurement implements Parcelable { /** * Sets the sync state. * @hide */ @TestApi public void setState(int value) { mState = value; } Loading Loading @@ -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; } Loading @@ -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; } Loading @@ -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; } Loading @@ -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; } Loading @@ -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; } /** Loading @@ -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; } Loading @@ -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; } Loading Loading @@ -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; } Loading @@ -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; } Loading @@ -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; Loading @@ -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; Loading @@ -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; Loading @@ -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; Loading Loading @@ -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; Loading @@ -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; Loading @@ -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; Loading @@ -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; Loading @@ -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; } Loading Loading @@ -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; Loading @@ -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; Loading Loading @@ -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; } Loading Loading @@ -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 Loading Loading @@ -876,6 +943,7 @@ public final class GnssMeasurement implements Parcelable { resetCarrierPhaseUncertainty(); setMultipathIndicator(MULTIPATH_INDICATOR_UNKNOWN); resetSnrInDb(); setPseudorangeRateCorrected(false); } private void setFlag(int flag) { Loading Loading
api/current.txt +0 −51 Original line number Diff line number Diff line Loading @@ -19171,24 +19171,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; } Loading Loading @@ -19219,31 +19201,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 Loading Loading @@ -19293,14 +19250,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
api/system-current.txt +0 −51 Original line number Diff line number Diff line Loading @@ -20344,24 +20344,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; } Loading Loading @@ -20392,31 +20374,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 Loading Loading @@ -20466,14 +20423,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
api/test-current.txt +4 −0 Original line number Diff line number Diff line Loading @@ -19164,6 +19164,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(); Loading Loading @@ -19204,6 +19205,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(); Loading Loading @@ -19246,6 +19248,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); Loading Loading @@ -19296,6 +19299,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();
location/java/android/location/GnssClock.java +42 −1 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ package android.location; import android.annotation.TestApi; import android.os.Parcel; import android.os.Parcelable; Loading Loading @@ -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; Loading @@ -70,7 +77,9 @@ public final class GnssClock implements Parcelable { /** * Resets all the contents to its original state. * @hide */ @TestApi public void reset() { initialize(); } Loading @@ -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; Loading @@ -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; Loading @@ -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; } Loading @@ -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; Loading @@ -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; Loading Loading @@ -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; Loading @@ -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; Loading @@ -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; Loading @@ -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; Loading @@ -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; Loading @@ -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; Loading @@ -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; Loading @@ -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; Loading @@ -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; Loading @@ -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; Loading
location/java/android/location/GnssMeasurement.java +71 −3 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ package android.location; import android.annotation.TestApi; import android.annotation.IntDef; import android.os.Parcel; import android.os.Parcelable; Loading Loading @@ -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 Loading @@ -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) Loading Loading @@ -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; Loading @@ -174,7 +181,9 @@ public final class GnssMeasurement implements Parcelable { /** * Resets all the contents to its original state. * @hide */ @TestApi public void reset() { initialize(); } Loading @@ -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; } Loading @@ -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; } Loading @@ -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; } Loading @@ -244,7 +259,9 @@ public final class GnssMeasurement implements Parcelable { /** * Sets the sync state. * @hide */ @TestApi public void setState(int value) { mState = value; } Loading Loading @@ -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; } Loading @@ -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; } Loading @@ -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; } Loading @@ -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; } Loading @@ -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; } /** Loading @@ -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; } Loading @@ -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; } Loading Loading @@ -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; } Loading @@ -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; } Loading @@ -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; Loading @@ -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; Loading @@ -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; Loading @@ -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; Loading Loading @@ -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; Loading @@ -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; Loading @@ -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; Loading @@ -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; Loading @@ -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; } Loading Loading @@ -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; Loading @@ -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; Loading Loading @@ -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; } Loading Loading @@ -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 Loading Loading @@ -876,6 +943,7 @@ public final class GnssMeasurement implements Parcelable { resetCarrierPhaseUncertainty(); setMultipathIndicator(MULTIPATH_INDICATOR_UNKNOWN); resetSnrInDb(); setPseudorangeRateCorrected(false); } private void setFlag(int flag) { Loading