Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ade2f66f authored by Lifu Tang's avatar Lifu Tang Committed by Android (Google) Code Review
Browse files

Merge "Optimized the memory consumption and renamed PRN" into nyc-dev

parents cea11df0 120480f1
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -19221,7 +19221,6 @@ package android.location {
    method public double getElevationUncertaintyInDeg();
    method public byte getLossOfLock();
    method public byte getMultipathIndicator();
    method public byte getPrn();
    method public double getPseudorangeInMeters();
    method public double getPseudorangeRateCarrierInMetersPerSec();
    method public double getPseudorangeRateCarrierUncertaintyInMetersPerSec();
@@ -19232,6 +19231,7 @@ package android.location {
    method public long getReceivedGpsTowUncertaintyInNs();
    method public double getSnrInDb();
    method public short getState();
    method public short getSvid();
    method public short getTimeFromLastBitInMs();
    method public double getTimeOffsetInNs();
    method public boolean hasAzimuthInDeg();
@@ -19291,7 +19291,6 @@ package android.location {
    method public void setElevationUncertaintyInDeg(double);
    method public void setLossOfLock(byte);
    method public void setMultipathIndicator(byte);
    method public void setPrn(byte);
    method public void setPseudorangeInMeters(double);
    method public void setPseudorangeRateCarrierInMetersPerSec(double);
    method public void setPseudorangeRateCarrierUncertaintyInMetersPerSec(double);
@@ -19302,6 +19301,7 @@ package android.location {
    method public void setReceivedGpsTowUncertaintyInNs(long);
    method public void setSnrInDb(double);
    method public void setState(short);
    method public void setSvid(short);
    method public void setTimeFromLastBitInMs(short);
    method public void setTimeOffsetInNs(double);
    method public void setUsedInFix(boolean);
@@ -19356,17 +19356,17 @@ package android.location {
    method public int describeContents();
    method public byte[] getData();
    method public short getMessageId();
    method public byte getPrn();
    method public short getStatus();
    method public short getSubmessageId();
    method public short getSvid();
    method public byte getType();
    method public void reset();
    method public void set(android.location.GnssNavigationMessage);
    method public void setData(byte[]);
    method public void setMessageId(short);
    method public void setPrn(byte);
    method public void setStatus(short);
    method public void setSubmessageId(short);
    method public void setSvid(short);
    method public void setType(byte);
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.location.GnssNavigationMessage> CREATOR;
@@ -19412,8 +19412,8 @@ package android.location {
    method public int getConstellationType(int);
    method public float getElevation(int);
    method public int getNumSatellites();
    method public int getPrn(int);
    method public float getSnr(int);
    method public int getSvid(int);
    method public boolean hasAlmanac(int);
    method public boolean hasEphemeris(int);
    method public boolean usedInFix(int);
+5 −5
Original line number Diff line number Diff line
@@ -20401,7 +20401,6 @@ package android.location {
    method public double getElevationUncertaintyInDeg();
    method public byte getLossOfLock();
    method public byte getMultipathIndicator();
    method public byte getPrn();
    method public double getPseudorangeInMeters();
    method public double getPseudorangeRateCarrierInMetersPerSec();
    method public double getPseudorangeRateCarrierUncertaintyInMetersPerSec();
@@ -20412,6 +20411,7 @@ package android.location {
    method public long getReceivedGpsTowUncertaintyInNs();
    method public double getSnrInDb();
    method public short getState();
    method public short getSvid();
    method public short getTimeFromLastBitInMs();
    method public double getTimeOffsetInNs();
    method public boolean hasAzimuthInDeg();
@@ -20471,7 +20471,6 @@ package android.location {
    method public void setElevationUncertaintyInDeg(double);
    method public void setLossOfLock(byte);
    method public void setMultipathIndicator(byte);
    method public void setPrn(byte);
    method public void setPseudorangeInMeters(double);
    method public void setPseudorangeRateCarrierInMetersPerSec(double);
    method public void setPseudorangeRateCarrierUncertaintyInMetersPerSec(double);
@@ -20482,6 +20481,7 @@ package android.location {
    method public void setReceivedGpsTowUncertaintyInNs(long);
    method public void setSnrInDb(double);
    method public void setState(short);
    method public void setSvid(short);
    method public void setTimeFromLastBitInMs(short);
    method public void setTimeOffsetInNs(double);
    method public void setUsedInFix(boolean);
@@ -20536,17 +20536,17 @@ package android.location {
    method public int describeContents();
    method public byte[] getData();
    method public short getMessageId();
    method public byte getPrn();
    method public short getStatus();
    method public short getSubmessageId();
    method public short getSvid();
    method public byte getType();
    method public void reset();
    method public void set(android.location.GnssNavigationMessage);
    method public void setData(byte[]);
    method public void setMessageId(short);
    method public void setPrn(byte);
    method public void setStatus(short);
    method public void setSubmessageId(short);
    method public void setSvid(short);
    method public void setType(byte);
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.location.GnssNavigationMessage> CREATOR;
@@ -20592,8 +20592,8 @@ package android.location {
    method public int getConstellationType(int);
    method public float getElevation(int);
    method public int getNumSatellites();
    method public int getPrn(int);
    method public float getSnr(int);
    method public int getSvid(int);
    method public boolean hasAlmanac(int);
    method public boolean hasEphemeris(int);
    method public boolean usedInFix(int);
+5 −5
Original line number Diff line number Diff line
@@ -19229,7 +19229,6 @@ package android.location {
    method public double getElevationUncertaintyInDeg();
    method public byte getLossOfLock();
    method public byte getMultipathIndicator();
    method public byte getPrn();
    method public double getPseudorangeInMeters();
    method public double getPseudorangeRateCarrierInMetersPerSec();
    method public double getPseudorangeRateCarrierUncertaintyInMetersPerSec();
@@ -19240,6 +19239,7 @@ package android.location {
    method public long getReceivedGpsTowUncertaintyInNs();
    method public double getSnrInDb();
    method public short getState();
    method public short getSvid();
    method public short getTimeFromLastBitInMs();
    method public double getTimeOffsetInNs();
    method public boolean hasAzimuthInDeg();
@@ -19299,7 +19299,6 @@ package android.location {
    method public void setElevationUncertaintyInDeg(double);
    method public void setLossOfLock(byte);
    method public void setMultipathIndicator(byte);
    method public void setPrn(byte);
    method public void setPseudorangeInMeters(double);
    method public void setPseudorangeRateCarrierInMetersPerSec(double);
    method public void setPseudorangeRateCarrierUncertaintyInMetersPerSec(double);
@@ -19310,6 +19309,7 @@ package android.location {
    method public void setReceivedGpsTowUncertaintyInNs(long);
    method public void setSnrInDb(double);
    method public void setState(short);
    method public void setSvid(short);
    method public void setTimeFromLastBitInMs(short);
    method public void setTimeOffsetInNs(double);
    method public void setUsedInFix(boolean);
@@ -19364,17 +19364,17 @@ package android.location {
    method public int describeContents();
    method public byte[] getData();
    method public short getMessageId();
    method public byte getPrn();
    method public short getStatus();
    method public short getSubmessageId();
    method public short getSvid();
    method public byte getType();
    method public void reset();
    method public void set(android.location.GnssNavigationMessage);
    method public void setData(byte[]);
    method public void setMessageId(short);
    method public void setPrn(byte);
    method public void setStatus(short);
    method public void setSubmessageId(short);
    method public void setSvid(short);
    method public void setType(byte);
    method public void writeToParcel(android.os.Parcel, int);
    field public static final android.os.Parcelable.Creator<android.location.GnssNavigationMessage> CREATOR;
@@ -19420,8 +19420,8 @@ package android.location {
    method public int getConstellationType(int);
    method public float getElevation(int);
    method public int getNumSatellites();
    method public int getPrn(int);
    method public float getSnr(int);
    method public int getSvid(int);
    method public boolean hasAlmanac(int);
    method public boolean hasEphemeris(int);
    method public boolean usedInFix(int);
+11 −10
Original line number Diff line number Diff line
@@ -28,7 +28,7 @@ import java.lang.annotation.RetentionPolicy;
 */
public final class GnssMeasurement implements Parcelable {
    private int mFlags;
    private byte mPrn;
    private short mSvid;
    private double mTimeOffsetInNs;
    private short mState;
    private long mReceivedGpsTowInNs;
@@ -198,7 +198,7 @@ public final class GnssMeasurement implements Parcelable {
     */
    public void set(GnssMeasurement measurement) {
        mFlags = measurement.mFlags;
        mPrn = measurement.mPrn;
        mSvid = measurement.mSvid;
        mTimeOffsetInNs = measurement.mTimeOffsetInNs;
        mState = measurement.mState;
        mReceivedGpsTowInNs = measurement.mReceivedGpsTowInNs;
@@ -248,15 +248,15 @@ public final class GnssMeasurement implements Parcelable {
     * Gets the Pseudo-random number (PRN).
     * Range: [1, 32]
     */
    public byte getPrn() {
        return mPrn;
    public short getSvid() {
        return mSvid;
    }

    /**
     * Sets the Pseud-random number (PRN).
     */
    public void setPrn(byte value) {
        mPrn = value;
    public void setSvid(short value) {
        mSvid = value;
    }

    /**
@@ -1210,7 +1210,7 @@ public final class GnssMeasurement implements Parcelable {
            GnssMeasurement gnssMeasurement = new GnssMeasurement();

            gnssMeasurement.mFlags = parcel.readInt();
            gnssMeasurement.mPrn = parcel.readByte();
            gnssMeasurement.mSvid = (short) parcel.readInt();
            gnssMeasurement.mTimeOffsetInNs = parcel.readDouble();
            gnssMeasurement.mState = (short) parcel.readInt();
            gnssMeasurement.mReceivedGpsTowInNs = parcel.readLong();
@@ -1253,9 +1253,10 @@ public final class GnssMeasurement implements Parcelable {
        }
    };

    @Override
    public void writeToParcel(Parcel parcel, int flags) {
        parcel.writeInt(mFlags);
        parcel.writeByte(mPrn);
        parcel.writeInt(mSvid);
        parcel.writeDouble(mTimeOffsetInNs);
        parcel.writeInt(mState);
        parcel.writeLong(mReceivedGpsTowInNs);
@@ -1301,7 +1302,7 @@ public final class GnssMeasurement implements Parcelable {
        final String formatWithUncertainty = "   %-29s = %-25s   %-40s = %s\n";
        StringBuilder builder = new StringBuilder("GnssMeasurement:\n");

        builder.append(String.format(format, "Prn", mPrn));
        builder.append(String.format(format, "Svid", mSvid));

        builder.append(String.format(format, "TimeOffsetInNs", mTimeOffsetInNs));

@@ -1422,7 +1423,7 @@ public final class GnssMeasurement implements Parcelable {

    private void initialize() {
        mFlags = HAS_NO_FLAGS;
        setPrn(Byte.MIN_VALUE);
        setSvid((short) 0);
        setTimeOffsetInNs(Long.MIN_VALUE);
        setState(STATE_UNKNOWN);
        setReceivedGpsTowInNs(Long.MIN_VALUE);
+12 −11
Original line number Diff line number Diff line
@@ -26,7 +26,7 @@ import java.lang.annotation.RetentionPolicy;
import java.security.InvalidParameterException;

/**
 * A class containing a GPS satellite Navigation Message.
 * A class containing a GNSS satellite Navigation Message.
 */
public final class GnssNavigationMessage implements Parcelable {

@@ -84,7 +84,7 @@ public final class GnssNavigationMessage implements Parcelable {
    // End enumerations in sync with gps.h

    private byte mType;
    private byte mPrn;
    private short mSvid;
    private short mMessageId;
    private short mSubmessageId;
    private byte[] mData;
@@ -99,7 +99,7 @@ public final class GnssNavigationMessage implements Parcelable {
     */
    public void set(GnssNavigationMessage navigationMessage) {
        mType = navigationMessage.mType;
        mPrn = navigationMessage.mPrn;
        mSvid = navigationMessage.mSvid;
        mMessageId = navigationMessage.mMessageId;
        mSubmessageId = navigationMessage.mSubmessageId;
        mData = navigationMessage.mData;
@@ -153,15 +153,15 @@ public final class GnssNavigationMessage implements Parcelable {
     * Gets the Pseudo-random number.
     * Range: [1, 32].
     */
    public byte getPrn() {
        return mPrn;
    public short getSvid() {
        return mSvid;
    }

    /**
     * Sets the Pseud-random number.
     */
    public void setPrn(byte value) {
        mPrn = value;
    public void setSvid(short value) {
        mSvid = value;
    }

    /**
@@ -256,7 +256,7 @@ public final class GnssNavigationMessage implements Parcelable {
            GnssNavigationMessage navigationMessage = new GnssNavigationMessage();

            navigationMessage.setType(parcel.readByte());
            navigationMessage.setPrn(parcel.readByte());
            navigationMessage.setSvid((short) parcel.readInt());
            navigationMessage.setMessageId((short) parcel.readInt());
            navigationMessage.setSubmessageId((short) parcel.readInt());

@@ -281,9 +281,10 @@ public final class GnssNavigationMessage implements Parcelable {
        }
    };

    @Override
    public void writeToParcel(Parcel parcel, int flags) {
        parcel.writeByte(mType);
        parcel.writeByte(mPrn);
        parcel.writeInt(mSvid);
        parcel.writeInt(mMessageId);
        parcel.writeInt(mSubmessageId);
        parcel.writeInt(mData.length);
@@ -302,7 +303,7 @@ public final class GnssNavigationMessage implements Parcelable {
        StringBuilder builder = new StringBuilder("GnssNavigationMessage:\n");

        builder.append(String.format(format, "Type", getTypeString()));
        builder.append(String.format(format, "Prn", mPrn));
        builder.append(String.format(format, "Svid", mSvid));
        builder.append(String.format(format, "Status", getStatusString()));
        builder.append(String.format(format, "MessageId", mMessageId));
        builder.append(String.format(format, "SubmessageId", mSubmessageId));
@@ -321,7 +322,7 @@ public final class GnssNavigationMessage implements Parcelable {

    private void initialize() {
        mType = MESSAGE_TYPE_UNKNOWN;
        mPrn = 0;
        mSvid = 0;
        mMessageId = -1;
        mSubmessageId = -1;
        mData = EMPTY_ARRAY;
Loading