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

Commit 003af80c authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Add comments to messageId, subMessageId and data"

parents 72702b97 699e4549
Loading
Loading
Loading
Loading
+3 −3
Original line number Original line Diff line number Diff line
@@ -23668,10 +23668,10 @@ package android.location {
  public final class GnssNavigationMessage implements android.os.Parcelable {
  public final class GnssNavigationMessage implements android.os.Parcelable {
    method public int describeContents();
    method public int describeContents();
    method @NonNull public byte[] getData();
    method @NonNull public byte[] getData();
    method public int getMessageId();
    method @IntRange(from=0xffffffff, to=120) public int getMessageId();
    method public int getStatus();
    method public int getStatus();
    method public int getSubmessageId();
    method @IntRange(from=1) public int getSubmessageId();
    method public int getSvid();
    method @IntRange(from=1, to=200) public int getSvid();
    method public int getType();
    method public int getType();
    method public void writeToParcel(android.os.Parcel, int);
    method public void writeToParcel(android.os.Parcel, int);
    field @NonNull public static final android.os.Parcelable.Creator<android.location.GnssNavigationMessage> CREATOR;
    field @NonNull public static final android.os.Parcelable.Creator<android.location.GnssNavigationMessage> CREATOR;
+3 −3
Original line number Original line Diff line number Diff line
@@ -1366,10 +1366,10 @@ package android.location {
    method public void reset();
    method public void reset();
    method public void set(android.location.GnssNavigationMessage);
    method public void set(android.location.GnssNavigationMessage);
    method public void setData(byte[]);
    method public void setData(byte[]);
    method public void setMessageId(int);
    method public void setMessageId(@IntRange(from=0xffffffff, to=120) int);
    method public void setStatus(int);
    method public void setStatus(int);
    method public void setSubmessageId(int);
    method public void setSubmessageId(@IntRange(from=1) int);
    method public void setSvid(int);
    method public void setSvid(@IntRange(from=1, to=200) int);
    method public void setType(int);
    method public void setType(int);
  }
  }


+39 −4
Original line number Original line Diff line number Diff line
@@ -17,6 +17,7 @@
package android.location;
package android.location;


import android.annotation.IntDef;
import android.annotation.IntDef;
import android.annotation.IntRange;
import android.annotation.NonNull;
import android.annotation.NonNull;
import android.annotation.TestApi;
import android.annotation.TestApi;
import android.os.Parcel;
import android.os.Parcel;
@@ -76,6 +77,14 @@ public final class GnssNavigationMessage implements Parcelable {
    /** IRNSS L5 C/A message contained in the structure. */
    /** IRNSS L5 C/A message contained in the structure. */
    public static final int TYPE_IRN_L5CA = 0x0701;
    public static final int TYPE_IRN_L5CA = 0x0701;


    /**
     * The status of the GNSS Navigation Message
     * @hide
     */
    @Retention(RetentionPolicy.SOURCE)
    @IntDef({STATUS_UNKNOWN, STATUS_PARITY_PASSED, STATUS_PARITY_REBUILT})
    public @interface GnssNavigationMessageStatus {}

    /**
    /**
     * The Navigation Message Status is 'unknown'.
     * The Navigation Message Status is 'unknown'.
     */
     */
@@ -240,6 +249,7 @@ public final class GnssNavigationMessage implements Parcelable {
     *
     *
     * <p>Range varies by constellation.  See definition at {@code GnssStatus#getSvid(int)}
     * <p>Range varies by constellation.  See definition at {@code GnssStatus#getSvid(int)}
     */
     */
    @IntRange(from = 1, to = 200)
    public int getSvid() {
    public int getSvid() {
        return mSvid;
        return mSvid;
    }
    }
@@ -249,7 +259,7 @@ public final class GnssNavigationMessage implements Parcelable {
     * @hide
     * @hide
     */
     */
    @TestApi
    @TestApi
    public void setSvid(int value) {
    public void setSvid(@IntRange(from = 1, to = 200) int value) {
        mSvid = value;
        mSvid = value;
    }
    }


@@ -272,8 +282,17 @@ public final class GnssNavigationMessage implements Parcelable {
     * range of 1-12</li>
     * range of 1-12</li>
     * <li> For Galileo I/NAV nominal frame structure, this refers to the subframe number in the
     * <li> For Galileo I/NAV nominal frame structure, this refers to the subframe number in the
     * range of 1-24</li>
     * range of 1-24</li>
     * <li> For SBAS and Beidou CNAV2, this is unused and can be set to -1.</li>
     * <li> For QZSS L1 C/A subframe 4 and 5, this value corresponds to the 'frame id' of the
     * navigation message, in the range of 1-25 (Subframe 1, 2, 3 does not contain a 'frame id' and
     * this value can be set to -1.)</li>
     * <li> For Beidou CNAV1 this refers to the page type number in the range of 1-63.</li>
     * <li> For IRNSS L5 C/A subframe 3 and 4, this value corresponds to the Message Id of the
     * navigation message, in the range of 1-63. (Subframe 1 and 2 does not contain a message type
     * id and this value can be set to -1.)</li>
     * </ul>
     * </ul>
     */
     */
    @IntRange(from = -1, to = 120)
    public int getMessageId() {
    public int getMessageId() {
        return mMessageId;
        return mMessageId;
    }
    }
@@ -283,7 +302,7 @@ public final class GnssNavigationMessage implements Parcelable {
     * @hide
     * @hide
     */
     */
    @TestApi
    @TestApi
    public void setMessageId(int value) {
    public void setMessageId(@IntRange(from = -1, to = 120) int value) {
        mMessageId = value;
        mMessageId = value;
    }
    }


@@ -299,8 +318,16 @@ public final class GnssNavigationMessage implements Parcelable {
     * <li>For Galileo in particular, the type information embedded within the data bits may be even
     * <li>For Galileo in particular, the type information embedded within the data bits may be even
     * more useful in interpretation, than the nominal page and word types provided in this
     * more useful in interpretation, than the nominal page and word types provided in this
     * field.</li>
     * field.</li>
     * <li> For SBAS, the submessage id corresponds to the message type, in the range 1-63.</li>
     * <li> For Beidou CNAV1, the submessage id corresponds to the subframe number of the
     * navigation message, in the range of 1-3.</li>
     * <li> For Beidou CNAV2, the submessage id corresponds to the message type, in the range
     * 1-63.</li>
     * <li> For IRNSS L5 C/A, the submessage id corresponds to the subframe number of the
     * navigation message, in the range of 1-4.</li>
     * </ul>
     * </ul>
     */
     */
    @IntRange(from = 1)
    public int getSubmessageId() {
    public int getSubmessageId() {
        return mSubmessageId;
        return mSubmessageId;
    }
    }
@@ -310,7 +337,7 @@ public final class GnssNavigationMessage implements Parcelable {
     * @hide
     * @hide
     */
     */
    @TestApi
    @TestApi
    public void setSubmessageId(int value) {
    public void setSubmessageId(@IntRange(from = 1) int value) {
        mSubmessageId = value;
        mSubmessageId = value;
    }
    }


@@ -333,6 +360,13 @@ public final class GnssNavigationMessage implements Parcelable {
     * <li>For Galileo I/NAV, each page contains 2 page parts, even and odd, with a total of 2x114 =
     * <li>For Galileo I/NAV, each page contains 2 page parts, even and odd, with a total of 2x114 =
     * 228 bits, (sync &amp; tail excluded) that should be fit into 29 bytes, with MSB first (skip
     * 228 bits, (sync &amp; tail excluded) that should be fit into 29 bytes, with MSB first (skip
     * B229-B232).</li>
     * B229-B232).</li>
     * <li>For SBAS, each block consists of 250 data bits, that should be fit into 32 bytes.  MSB
     * first (skip B251-B256).</li>
     * <li>For Beidou CNAV1, subframe #1 consists of 14 data bits, that should be fit into 2
     * bytes. MSB first (skip B15-B16).  subframe #2 consists of 600 bits that should be fit into
     * 75 bytes. subframe #3 consists of 264 data bits that should be fit into 33 bytes.</li>
     * <li>For Beidou CNAV2, each subframe consists of 288 data bits, that should be fit into 36
     * bytes.</li>
     * </ul>
     * </ul>
     */
     */
    @NonNull
    @NonNull
@@ -356,6 +390,7 @@ public final class GnssNavigationMessage implements Parcelable {
    /**
    /**
     * Gets the Status of the navigation message contained in the object.
     * Gets the Status of the navigation message contained in the object.
     */
     */
    @GnssNavigationMessageStatus
    public int getStatus() {
    public int getStatus() {
        return mStatus;
        return mStatus;
    }
    }
@@ -365,7 +400,7 @@ public final class GnssNavigationMessage implements Parcelable {
     * @hide
     * @hide
     */
     */
    @TestApi
    @TestApi
    public void setStatus(int value) {
    public void setStatus(@GnssNavigationMessageStatus int value) {
        mStatus = value;
        mStatus = value;
    }
    }