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

Commit 97ecaa0a authored by Hridya Valsaraju's avatar Hridya Valsaraju
Browse files

Gnss Hal Minor Cleanup

Enum sizes and names cleaned up, fixed errors in comments,
cleaned up some variable names.

Also removed AGnssRefLocation since it appears to be unused.

Bug:31974439
Test: mm

Change-Id: I88f43caac5ce9c7137e28b29ba55ea330786745f
parent ffdab750
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -22,7 +22,7 @@ import IAGnssCallback;
 * Extended interface for AGNSS support.
 */
interface IAGnss {
    enum ApnIpType : uint16_t {
    enum ApnIpType : uint8_t {
        INVALID  = 0,
        IPV4     = 1,
        IPV6     = 2,
@@ -72,6 +72,6 @@ interface IAGnss {
     *
     * @return success True if the operation is successful.
     */
    dataConnOpenWithApnIpType(string apn, ApnIpType apnIpType)
    dataConnOpen(string apn, ApnIpType apnIpType)
        generates (bool success);
};
+2 −2
Original line number Diff line number Diff line
@@ -19,12 +19,12 @@ package android.hardware.gnss@1.0;
/** Callback structure for the AGNSS interface. */
interface IAGnssCallback {
    /** AGNSS type **/
    enum AGnssType : uint16_t {
    enum AGnssType : uint8_t {
        TYPE_SUPL         = 1,
        TYPE_C2K          = 2
    };

    enum AGnssStatusValue : uint16_t {
    enum AGnssStatusValue : uint8_t {
        /** GNSS requests data connection for AGNSS. */
        REQUEST_AGNSS_DATA_CONN  = 1,
        /** GNSS releases the AGNSS data connection. */
+5 −15
Original line number Diff line number Diff line
@@ -25,13 +25,13 @@ import IAGnssRilCallback;
 * location, unique subscriber ID, phone number string and network availability changes.
 */
interface IAGnssRil {
    enum SetIDType : uint16_t {
    enum SetIDType : uint8_t {
        NONE    = 0,
        IMSI    = 1,
        MSISDM  = 2
    };

    enum NetworkType : int32_t {
    enum NetworkType : uint8_t {
        MOBILE  = 0,
        WIFI    = 1,
        MMS     = 2,
@@ -41,10 +41,9 @@ interface IAGnssRil {
        WIMAX   = 6,
    };

    enum AGnssRefLocationType : int32_t {
    enum AGnssRefLocationType : uint8_t {
        GSM_CELLID   = 1,
        UMTS_CELLID  = 2,
        MAC          = 3,
        LTE_CELLID   = 4,
    };

@@ -75,20 +74,11 @@ interface IAGnssRil {
        uint16_t pcid;
    };

    struct AGnssRefLocationMac {
        uint8_t[6] mac;
    };

    /* Represents ref locations */
    struct AGnssRefLocation {
        AGnssRefLocationType type;

        union RefLoc {
        AGnssRefLocationCellID cellID;
            AGnssRefLocationMac mac;
        };

        RefLoc refLocVal;
    };

    /*
@@ -102,7 +92,7 @@ interface IAGnssRil {
    /*
     * Sets the reference location.
     *
     * @param agnssReflocation AGNSS reference location CellID/MAC.
     * @param agnssReflocation AGNSS reference location CellID.
     */
    setRefLocation(AGnssRefLocation agnssReflocation);

+1 −9
Original line number Diff line number Diff line
@@ -27,12 +27,6 @@ interface IAGnssRilCallback {
        MSISDN  = 1 << 1L,
    };

    /* Kinds of reference location that can be requested. */
    enum RefLoc : uint32_t {
        CELLID = 1 << 0L,
        MAC    = 1 << 1L
    };

    /*
     * The Hal uses this API to request a SET ID.
     *
@@ -43,9 +37,7 @@ interface IAGnssRilCallback {
    /*
     * The Hal uses this API to request a reference location.
     *
     * @param refLocflag Specifies the kind of reference location that is required
     * by the HAL.
     */
    requestRefLocCb(RefLoc refLocflag);
    requestRefLocCb();

};
+21 −18
Original line number Diff line number Diff line
@@ -29,7 +29,7 @@ import IGnssXtra;
/* Represents the standard GNSS interface. */
interface IGnss {
    /* Requested operational mode for GNSS operation. */
    enum GnssPositionMode : uint32_t {
    enum GnssPositionMode : uint8_t {
        /** Mode for running GNSS standalone (no assistance). */
        STANDALONE  = 0,
        /** AGNSS MS-Based mode. */
@@ -110,7 +110,7 @@ interface IGnss {
     * time. Represented in milliseconds.
     *
     * @return success Returns true if the operation is successful.
     *
     */
    injectTime(GnssUtcTime timeMs, int64_t timeReferenceMs, int32_t uncertaintyMs)
        generates (bool success);

@@ -137,6 +137,9 @@ interface IGnss {
    deleteAidingData(GnssAidingData aidingDataFlags);

    /*
     * Sets the GnssPositionMode parameter,its associated recurrence value,
     * the time between fixes,requested fix accuracy and time to first fix.
     *
     * @param mode  Parameter must be one of MS_BASED or STANDALONE.
     * It is allowed by the platform (and it is recommended) to fallback to
     * MS_BASED if MS_ASSISTED is passed in, and MS_BASED is supported.
@@ -155,56 +158,56 @@ interface IGnss {
    /*
     * This method returns the IAGnssRil Interface.
     *
     * @return infc Handle to the IAGnssRil interface.
     * @return aGnssRilIface Handle to the IAGnssRil interface.
     */
    getExtensionAGnssRil() generates (IAGnssRil infc);
    getExtensionAGnssRil() generates (IAGnssRil aGnssRilIface);

    /*
     * This method returns the IGnssGeofencing Interface.
     *
     * @return infc Handle to the IGnssGeofencing interface.
     * @return gnssGeofencingIface Handle to the IGnssGeofencing interface.
     */
    getExtensionGnssGeofencing() generates(IGnssGeofencing infc);
    getExtensionGnssGeofencing() generates(IGnssGeofencing gnssGeofencingIface);

    /*
     * This method returns the IAGnss Interface.
     *
     * @return infc Handle to the IAGnss interface.
     * @return aGnssIface Handle to the IAGnss interface.
     */
    getExtensionAGnss() generates (IAGnss infc);
    getExtensionAGnss() generates (IAGnss aGnssIface);

    /*
     * This method returns the IGnssNi interface.
     *
     * @return infc Handle to the IGnssNi interface.
     * @return gnssNiIface Handle to the IGnssNi interface.
     */
    getExtensionGnssNi() generates (IGnssNi infc);
    getExtensionGnssNi() generates (IGnssNi gnssNiIface);

    /*
     * This method returns the IGnssMeasurement interface.
     *
     * @return infc Handle to the IGnssMeasurement interface.
     * @return gnssMeasurementIface Handle to the IGnssMeasurement interface.
     */
    getExtensionGnssMeasurement() generates (IGnssMeasurement infc);
    getExtensionGnssMeasurement() generates (IGnssMeasurement gnssMeasurementIface);

    /*
     * This method returns the IGnssNavigationMessage interface.
     *
     * @return infc Handle to the IGnssNavigationMessage interface.
     * @return gnssNavigationIface gnssNavigationIface to the IGnssNavigationMessage interface.
     */
    getExtensionGnssNavigationMessage() generates (IGnssNavigationMessage infc);
    getExtensionGnssNavigationMessage() generates (IGnssNavigationMessage gnssNavigationIface);

    /*
     * This method returns the IGnssXtra interface.
     *
     * @return infc Handle to the IGnssXtra interface.
     * @return xtraIface Handle to the IGnssXtra interface.
     */
    getExtensionXtra() generates (IGnssXtra infc);
    getExtensionXtra() generates (IGnssXtra xtraIface);

    /*
     * This method returns the IGnssDebug interface.
     *
     * @return infc Handle to the IGnssDebug interface.
     * @return debugIface Handle to the IGnssDebug interface.
     */
    getExtensionGnssDebug() generates (IGnssDebug infc);
    getExtensionGnssDebug() generates (IGnssDebug debugIface);
};
Loading