diff options
author | Yu-Han Yang <yuhany@google.com> | 2020-01-15 15:50:00 -0800 |
---|---|---|
committer | Yu-Han Yang <yuhany@google.com> | 2020-01-22 11:43:08 -0800 |
commit | f81885b06a3e83f02759eece5ee3321c7fd0d719 (patch) | |
tree | 26f39fee0172ef2ab65cedfd69ab203b1068eb28 | |
parent | 805f3c1db5b9793684e310a559c4efa8c7de9eff (diff) |
Support SBAS, QZSS and NAVIC navigation messages
Bug: 147768625
Test: atest GnssNavigationMessageTest
Change-Id: Icc788bd6762d3d8d75d7f92d3b233c05f329a104
-rw-r--r-- | api/current.txt | 5 | ||||
-rw-r--r-- | location/java/android/location/GnssNavigationMessage.java | 25 |
2 files changed, 28 insertions, 2 deletions
diff --git a/api/current.txt b/api/current.txt index e662783f87d8..e0bf1ab8efad 100644 --- a/api/current.txt +++ b/api/current.txt @@ -23404,6 +23404,8 @@ package android.location { field public static final int STATUS_PARITY_PASSED = 1; // 0x1 field public static final int STATUS_PARITY_REBUILT = 2; // 0x2 field public static final int STATUS_UNKNOWN = 0; // 0x0 + field public static final int TYPE_BDS_CNAV1 = 1283; // 0x503 + field public static final int TYPE_BDS_CNAV2 = 1284; // 0x504 field public static final int TYPE_BDS_D1 = 1281; // 0x501 field public static final int TYPE_BDS_D2 = 1282; // 0x502 field public static final int TYPE_GAL_F = 1538; // 0x602 @@ -23413,6 +23415,9 @@ package android.location { field public static final int TYPE_GPS_L1CA = 257; // 0x101 field public static final int TYPE_GPS_L2CNAV = 258; // 0x102 field public static final int TYPE_GPS_L5CNAV = 259; // 0x103 + field public static final int TYPE_IRN_L5CA = 1793; // 0x701 + field public static final int TYPE_QZS_L1CA = 1025; // 0x401 + field public static final int TYPE_SBS = 513; // 0x201 field public static final int TYPE_UNKNOWN = 0; // 0x0 } diff --git a/location/java/android/location/GnssNavigationMessage.java b/location/java/android/location/GnssNavigationMessage.java index a83db3fcf384..ca0bfb1added 100644 --- a/location/java/android/location/GnssNavigationMessage.java +++ b/location/java/android/location/GnssNavigationMessage.java @@ -16,9 +16,9 @@ package android.location; -import android.annotation.TestApi; import android.annotation.IntDef; import android.annotation.NonNull; +import android.annotation.TestApi; import android.os.Parcel; import android.os.Parcelable; @@ -39,7 +39,8 @@ public final class GnssNavigationMessage implements Parcelable { */ @Retention(RetentionPolicy.SOURCE) @IntDef({TYPE_UNKNOWN, TYPE_GPS_L1CA, TYPE_GPS_L2CNAV, TYPE_GPS_L5CNAV, TYPE_GPS_CNAV2, - TYPE_GLO_L1CA, TYPE_BDS_D1, TYPE_BDS_D2, TYPE_GAL_I, TYPE_GAL_F}) + TYPE_SBS, TYPE_GLO_L1CA, TYPE_QZS_L1CA, TYPE_BDS_D1, TYPE_BDS_D2, TYPE_BDS_CNAV1, + TYPE_BDS_CNAV2, TYPE_GAL_I, TYPE_GAL_F, TYPE_IRN_L5CA}) public @interface GnssNavigationMessageType {} // The following enumerations must be in sync with the values declared in gps.h @@ -54,16 +55,26 @@ public final class GnssNavigationMessage implements Parcelable { public static final int TYPE_GPS_L5CNAV = 0x0103; /** GPS CNAV-2 message contained in the structure. */ public static final int TYPE_GPS_CNAV2 = 0x0104; + /** SBAS message contained in the structure. */ + public static final int TYPE_SBS = 0x0201; /** Glonass L1 CA message contained in the structure. */ public static final int TYPE_GLO_L1CA = 0x0301; + /** QZSS L1 C/A message contained in the structure. */ + public static final int TYPE_QZS_L1CA = 0x0401; /** Beidou D1 message contained in the structure. */ public static final int TYPE_BDS_D1 = 0x0501; /** Beidou D2 message contained in the structure. */ public static final int TYPE_BDS_D2 = 0x0502; + /** Beidou CNAV1 message contained in the structure. */ + public static final int TYPE_BDS_CNAV1 = 0x0503; + /** Beidou CNAV2 message contained in the structure. */ + public static final int TYPE_BDS_CNAV2 = 0x0504; /** Galileo I/NAV message contained in the structure. */ public static final int TYPE_GAL_I = 0x0601; /** Galileo F/NAV message contained in the structure. */ public static final int TYPE_GAL_F = 0x0602; + /** IRNSS L5 C/A message contained in the structure. */ + public static final int TYPE_IRN_L5CA = 0x0701; /** * The Navigation Message Status is 'unknown'. @@ -199,16 +210,26 @@ public final class GnssNavigationMessage implements Parcelable { return "GPS L5-CNAV"; case TYPE_GPS_CNAV2: return "GPS CNAV2"; + case TYPE_SBS: + return "SBS"; case TYPE_GLO_L1CA: return "Glonass L1 C/A"; + case TYPE_QZS_L1CA: + return "QZSS L1 C/A"; case TYPE_BDS_D1: return "Beidou D1"; case TYPE_BDS_D2: return "Beidou D2"; + case TYPE_BDS_CNAV1: + return "Beidou CNAV1"; + case TYPE_BDS_CNAV2: + return "Beidou CNAV2"; case TYPE_GAL_I: return "Galileo I"; case TYPE_GAL_F: return "Galileo F"; + case TYPE_IRN_L5CA: + return "IRNSS L5 C/A"; default: return "<Invalid:" + mType + ">"; } |