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

Commit 75934f7a authored by Yu-Han Yang's avatar Yu-Han Yang
Browse files

Fix ANAPIC review comments (hardware/interfaces)

* Use "GnssAgc[] gnssAgcs = {};" for backwards compatibility
* Add comments on AgnssTypes
* Rename SetIDType -> SetIdType
* Update the comment on NetworkAttributes -> networkHandle
* Remove the “DELETE_” prefix in the GnssAidingData
* Make a parcelable for setPositionMode parameters

Bug: 215566115
Test: atest VtsHalGnssTargetTest
Change-Id: Ifc2de451a43cd1f32267e74dc288a3821b75f0cb
parent 90736694
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -37,7 +37,7 @@ parcelable GnssData {
  android.hardware.gnss.GnssMeasurement[] measurements;
  android.hardware.gnss.GnssClock clock;
  android.hardware.gnss.ElapsedRealtime elapsedRealtime;
  @nullable android.hardware.gnss.GnssData.GnssAgc[] gnssAgcs;
  android.hardware.gnss.GnssData.GnssAgc[] gnssAgcs = {};
  @VintfStability
  parcelable GnssAgc {
    double agcLevelDb;
+2 −2
Original line number Diff line number Diff line
@@ -36,7 +36,7 @@ package android.hardware.gnss;
interface IAGnssRil {
  void setCallback(in android.hardware.gnss.IAGnssRilCallback callback);
  void setRefLocation(in android.hardware.gnss.IAGnssRil.AGnssRefLocation agnssReflocation);
  void setSetId(in android.hardware.gnss.IAGnssRil.SetIDType type, in @utf8InCpp String setid);
  void setSetId(in android.hardware.gnss.IAGnssRil.SetIdType type, in @utf8InCpp String setid);
  void updateNetworkState(in android.hardware.gnss.IAGnssRil.NetworkAttributes attributes);
  const int NETWORK_CAPABILITY_NOT_METERED = 1;
  const int NETWORK_CAPABILITY_NOT_ROAMING = 2;
@@ -48,7 +48,7 @@ interface IAGnssRil {
    NR_CELLID = 8,
  }
  @Backing(type="int") @VintfStability
  enum SetIDType {
  enum SetIdType {
    NONE = 0,
    IMSI = 1,
    MSISDM = 2,
+23 −14
Original line number Diff line number Diff line
@@ -53,7 +53,7 @@ interface IGnss {
  void injectLocation(in android.hardware.gnss.GnssLocation location);
  void injectBestLocation(in android.hardware.gnss.GnssLocation location);
  void deleteAidingData(in android.hardware.gnss.IGnss.GnssAidingData aidingDataFlags);
  void setPositionMode(in android.hardware.gnss.IGnss.GnssPositionMode mode, in android.hardware.gnss.IGnss.GnssPositionRecurrence recurrence, in int minIntervalMs, in int preferredAccuracyMeters, in int preferredTimeMs, in boolean lowPowerMode);
  void setPositionMode(in android.hardware.gnss.IGnss.PositionModeOptions options);
  android.hardware.gnss.IGnssAntennaInfo getExtensionGnssAntennaInfo();
  @nullable android.hardware.gnss.measurement_corrections.IMeasurementCorrectionsInterface getExtensionMeasurementCorrections();
  const int ERROR_INVALID_ARGUMENT = 1;
@@ -72,18 +72,27 @@ interface IGnss {
  }
  @Backing(type="int") @VintfStability
  enum GnssAidingData {
    DELETE_EPHEMERIS = 1,
    DELETE_ALMANAC = 2,
    DELETE_POSITION = 4,
    DELETE_TIME = 8,
    DELETE_IONO = 16,
    DELETE_UTC = 32,
    DELETE_HEALTH = 64,
    DELETE_SVDIR = 128,
    DELETE_SVSTEER = 256,
    DELETE_SADATA = 512,
    DELETE_RTI = 1024,
    DELETE_CELLDB_INFO = 32768,
    DELETE_ALL = 65535,
    EPHEMERIS = 1,
    ALMANAC = 2,
    POSITION = 4,
    TIME = 8,
    IONO = 16,
    UTC = 32,
    HEALTH = 64,
    SVDIR = 128,
    SVSTEER = 256,
    SADATA = 512,
    RTI = 1024,
    CELLDB_INFO = 32768,
    ALL = 65535,
  }
  @VintfStability
  parcelable PositionModeOptions {
    android.hardware.gnss.IGnss.GnssPositionMode mode;
    android.hardware.gnss.IGnss.GnssPositionRecurrence recurrence;
    int minIntervalMs;
    int preferredAccuracyMeters;
    int preferredTimeMs;
    boolean lowPowerMode;
  }
}
+5 −1
Original line number Diff line number Diff line
@@ -76,6 +76,10 @@ parcelable GnssData {
         * is the primary common use central frequency, e.g. L1 = 1575.45 MHz
         * for GPS.
         *
         * If all the GLO frequencies have a common AGC, the FC0 (frequency
         * channel number 0) of the individual GLO bands is used to represent
         * all the GLO frequencies.
         *
         * For an L1, L5 receiver tracking a satellite on L1 and L5 at the same
         * time, two raw measurement structs must be reported for this same
         * satellite, in one of the measurement structs, all the values related
@@ -92,5 +96,5 @@ parcelable GnssData {
     * GnssMeasurement or GnssClock fields are not reported yet. E.g., when a GNSS signal is too
     * weak to be acquired, the AGC value must still be reported.
     */
    @nullable GnssAgc[] gnssAgcs;
    GnssAgc[] gnssAgcs = {};
}
+4 −0
Original line number Diff line number Diff line
@@ -23,9 +23,13 @@ interface IAGnssCallback {
    @VintfStability
    @Backing(type="int")
    enum AGnssType {
        // Secure User Plane Location
        SUPL = 1,
        // CDMA2000
        C2K = 2,
        // SUPL, Emergency call over IP Multimedia Subsystem
        SUPL_EIMS = 3,
        // SUPL, IP Multimedia Subsystem
        SUPL_IMS = 4,
    }

Loading