Add new GNSS capabilities for year of hardware deprecation (HAL)
The following capabilities need to be added to the GNSS HAL interface
to enforce support through the CTS/VTS tests.
-Add low power mode capability.
-Add satellite blacklisting capability.
-Add measurement corrections capability and move capabilities in
IGnssCallback.hal that are specific to measurement correctons
to its own sub-HAL measurement_corrections@1.0.
Bug: 128028791
Bug: 127434062
Bug: 128309220
Test: Tested on cuttlefish using default implementation and VTS tests
Change-Id: I60dbd2ce3cce3cb871aa5f6b690ef881f8dc5705
diff --git a/gnss/2.0/IGnssCallback.hal b/gnss/2.0/IGnssCallback.hal
index 7924b64..4c31cf5 100644
--- a/gnss/2.0/IGnssCallback.hal
+++ b/gnss/2.0/IGnssCallback.hal
@@ -21,7 +21,7 @@
import GnssLocation;
/**
- * The interface is required for the HAL to communicate certain information
+ * This interface is required for the HAL to communicate certain information
* like status and location info back to the platform, the platform implements
* the interfaces and passes a handle to the HAL.
*/
@@ -29,17 +29,36 @@
/** Flags for the gnssSetCapabilities callback. */
@export(name="", value_prefix="GPS_CAPABILITY_")
- enum Capabilities : @1.0::IGnssCallback.Capabilities {
- /** GNSS supports line-of-sight satellite identification measurement Corrections */
- MEASUREMENT_CORRECTIONS_LOS_SATS = 1 << 8,
- /** GNSS supports per satellite excess-path-length measurement Corrections */
- MEASUREMENT_CORRECTIONS_EXCESS_PATH_LENGTH = 1 << 9,
- /** GNSS supports reflecting planes measurement Corrections */
- MEASUREMENT_CORRECTIONS_REFLECTING_PLANE = 1 << 10
+ enum Capabilities : uint32_t {
+ /**
+ * GNSS HAL schedules fixes for RECURRENCE_PERIODIC mode.
+ * If this is not set, then the framework will use 1000ms for
+ * minInterval and must call start() and stop() to schedule the GNSS.
+ */
+ SCHEDULING = 1 << 0,
+ /** GNSS supports MS-Based AGNSS mode */
+ MSB = 1 << 1,
+ /** GNSS supports MS-Assisted AGNSS mode */
+ MSA = 1 << 2,
+ /** GNSS supports single-shot fixes */
+ SINGLE_SHOT = 1 << 3,
+ /** GNSS supports on demand time injection */
+ ON_DEMAND_TIME = 1 << 4,
+ /**
+ * Values for the flags removed from IGnssCallback.hal@1.0 Capabilities
+ * enum are marked as reserved and not reused here to avoid confusion.
+ */
+ RESERVED_1 = 1 << 5,
+ RESERVED_2 = 1 << 6,
+ RESERVED_3 = 1 << 7,
+ /** GNSS supports low power mode */
+ LOW_POWER_MODE = 1 << 8,
+ /** GNSS supports blacklisting satellites */
+ SATELLITE_BLACKLIST = 1 << 9
};
/**
- * Callback to inform framework of the GNSS engine's capabilities.
+ * Callback to inform framework of the GNSS HAL implementation's capabilities.
*
* @param capabilities Capability parameter is a bit field of the Capabilities enum.
*/
@@ -75,4 +94,4 @@
* during-call to E911, or up to 5 minutes after end-of-call or text to E911).
*/
gnssRequestLocationCb_2_0(bool independentFromGnss, bool isUserEmergency);
-};
\ No newline at end of file
+};