GNSS HAL & VTS for Duty Cycling & Low Power APIs.
Defintions for 2 GNSS Android P features:
- The Duty Cycling OFF API to enable high accuracy applications development
- The Low Power Mode GNSS API to save power when indoor
VTS tests for both features.
Bug: 64009176
Test: hidl-gen/compile/build checks, no functional tests yet
Change-Id: I4a41757e4ad6747f22a7e9ae1e0024f083c5fbfb
diff --git a/gnss/1.1/IGnss.hal b/gnss/1.1/IGnss.hal
index f26d47c..d5e0c3e 100644
--- a/gnss/1.1/IGnss.hal
+++ b/gnss/1.1/IGnss.hal
@@ -18,17 +18,56 @@
import @1.0::IGnss;
+import IGnssMeasurement;
import IGnssCallback;
/** Represents the standard GNSS (Global Navigation Satellite System) interface. */
interface IGnss extends @1.0::IGnss {
/**
- * Opens the interface and provides the callback routines
- * to the implementation of this interface.
+ * Opens the interface and provides the callback routines to the implementation of this
+ * interface.
*
* @param callback Callback interface for IGnss.
*
* @return success Returns true on success.
*/
setCallback_1_1(IGnssCallback callback) generates (bool success);
+
+ /**
+ * Sets the GnssPositionMode parameter, its associated recurrence value,
+ * the time between fixes, requested fix accuracy, 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.
+ * @param recurrence GNSS postion recurrence value, either periodic or single.
+ * @param minIntervalMs Represents the time between fixes in milliseconds.
+ * @param preferredAccuracyMeters Represents the requested fix accuracy in meters.
+ * @param preferredTimeMs Represents the requested time to first fix in milliseconds.
+ * @param lowPowerMode When true, HAL must make strong tradeoffs to substantially restrict power
+ * use. Specifically, in the case of a several second long minIntervalMs, the GNSS chipset
+ * must not, on average, run power hungry operations like RF and signal searches for more
+ * than one second per interval, and must make exactly one call to gnssSvStatusCb(), and
+ * either zero or one call to GnssLocationCb() at each interval. When false, HAL must
+ * operate in the nominal mode (similar to V1.0 where this flag wasn't present) and is
+ * expected to make power and performance tradoffs such as duty-cycling when signal
+ * conditions are good and more active searches to reacquire GNSS signals when no signals
+ * are present.
+ *
+ * @return success Returns true if successful.
+ */
+ setPositionMode_1_1(GnssPositionMode mode,
+ GnssPositionRecurrence recurrence,
+ uint32_t minIntervalMs,
+ uint32_t preferredAccuracyMeters,
+ uint32_t preferredTimeMs,
+ bool lowPowerMode)
+ generates (bool success);
+
+ /**
+ * This method returns the IGnssMeasurement interface.
+ *
+ * @return gnssMeasurementIface Handle to the IGnssMeasurement interface.
+ */
+ getExtensionGnssMeasurement_1_1() generates (IGnssMeasurement gnssMeasurementIface);
};
\ No newline at end of file