Address ANAPIC review comments
- GnssMeasurementFlags extends v1.0
- add gnssSetCapabilitiesCb_2_1
Fixes: 149501257
Test: VTS tests pass on cuttlefish
Change-Id: I21dd284297d5f458945e7b5fa5e6ed0dab6a5dde
diff --git a/current.txt b/current.txt
index 2fa5dca..1fcaa30 100644
--- a/current.txt
+++ b/current.txt
@@ -651,10 +651,10 @@
626db710bf917ecf551a0b0b1f25be10bf52758f43e0fc808b148b6aae2ef73e android.hardware.gnss@2.1::IGnss
ba5ac712b2a656dc07c83ab4a7a2c2f3bee1bbcb752e8b8ffa9b672f3b5b0728 android.hardware.gnss@2.1::IGnssAntennaInfo
0bc3ed97cbc3f6abc89c68f4e9f4d124f9f723431997dc88c2186cf4d2ad47ee android.hardware.gnss@2.1::IGnssAntennaInfoCallback
-50c5d009af76d65b3023a9d94ee519545e72cb7c59bc7166d768d6f00923774d android.hardware.gnss@2.1::IGnssCallback
+3541d83adfeac16ee3e45d183a58dffe06012ccb5aa5bcd2e4f6eeae269f69cd android.hardware.gnss@2.1::IGnssCallback
737d750017738f0753d13ba01a3310e0161f294b8ae80b3fd63eaa227e9d9c66 android.hardware.gnss@2.1::IGnssConfiguration
7913a11206a577b12ade86a7cf3f95c2639cb514d086673f279bf99238c9917e android.hardware.gnss@2.1::IGnssMeasurement
-9999f2484f35ebfacdd433dfeae459f2a582334315959653ec8efde7699ec556 android.hardware.gnss@2.1::IGnssMeasurementCallback
+0a16e5913e94d995cfcf959a1c6f10b0b8e9dfdb5f45ac6e7244711ddd740272 android.hardware.gnss@2.1::IGnssMeasurementCallback
6670e7780803a8c696c6391fda5589a334b1b37dc7be9393792ed35035413633 android.hardware.gnss.measurement_corrections@1.1::IMeasurementCorrections
a3f439b782a6a92aaf3c0250f3526e94e8bf8844c3d578f0815e21b12c431346 android.hardware.gnss.measurement_corrections@1.1::types
ce8dbe76eb9ee94b46ef98f725be992e760a5751073d4f4912484026541371f3 android.hardware.health@2.1::IHealth
diff --git a/gnss/2.1/IGnssCallback.hal b/gnss/2.1/IGnssCallback.hal
index f7b7477..94be915 100644
--- a/gnss/2.1/IGnssCallback.hal
+++ b/gnss/2.1/IGnssCallback.hal
@@ -36,6 +36,13 @@
};
/**
+ * Callback to inform framework of the GNSS HAL implementation's capabilities.
+ *
+ * @param capabilities Capability parameter is a bit field of the Capabilities enum.
+ */
+ gnssSetCapabilitiesCb_2_1(bitfield<Capabilities> capabilities);
+
+ /**
* Extends a GnssSvInfo, adding a basebandCN0DbHz.
*/
struct GnssSvInfo {
diff --git a/gnss/2.1/IGnssMeasurementCallback.hal b/gnss/2.1/IGnssMeasurementCallback.hal
index 1aee272..0e6abbd 100644
--- a/gnss/2.1/IGnssMeasurementCallback.hal
+++ b/gnss/2.1/IGnssMeasurementCallback.hal
@@ -28,31 +28,7 @@
/**
* Flags to indicate what fields in GnssMeasurement are valid.
*/
- enum GnssMeasurementFlags : uint32_t {
- /**
- * A valid 'snr' is stored in the data structure.
- */
- HAS_SNR = 1 << 0,
- /**
- * A valid 'carrier frequency' is stored in the data structure.
- */
- HAS_CARRIER_FREQUENCY = 1 << 9,
- /**
- * A valid 'carrier cycles' is stored in the data structure.
- */
- HAS_CARRIER_CYCLES = 1 << 10,
- /**
- * A valid 'carrier phase' is stored in the data structure.
- */
- HAS_CARRIER_PHASE = 1 << 11,
- /**
- * A valid 'carrier phase uncertainty' is stored in the data structure.
- */
- HAS_CARRIER_PHASE_UNCERTAINTY = 1 << 12,
- /**
- * A valid automatic gain control is stored in the data structure.
- */
- HAS_AUTOMATIC_GAIN_CONTROL = 1 << 13,
+ enum GnssMeasurementFlags : @1.0::IGnssMeasurementCallback.GnssMeasurementFlags {
/**
* A valid receiver inter-signal bias is stored in the data structure.
*/
@@ -104,8 +80,8 @@
* The receiver inter-signal bias (ISB) in nanoseconds.
*
* This value is the estimated receiver-side inter-system (different from the constellation
- * in GnssClock.referenceSignalForIsb) bias and inter-frequency (different from the carrier
- * frequency in GnssClock.referenceSignalForIsb) bias. The reported receiver ISB
+ * in GnssClock.referenceSignalTypeForIsb) bias and inter-frequency (different from the
+ * carrier frequency in GnssClock.referenceSignalTypeForIsb) bias. The reported receiver ISB
* must include signal delays caused by
*
* - Receiver inter-constellation bias
@@ -114,7 +90,7 @@
*
* The value does not include the inter-frequency Ionospheric bias.
*
- * The receiver ISB of GnssClock.referenceSignalForIsb is defined to be 0.0 nanoseconds.
+ * The receiver ISB of GnssClock.referenceSignalTypeForIsb is defined to be 0.0 nanoseconds.
*/
double receiverInterSignalBiasNs;
@@ -127,8 +103,8 @@
* The satellite inter-signal bias in nanoseconds.
*
* This value is the satellite-and-control-segment-side inter-system (different from the
- * constellation in GnssClock.referenceSignalForIsb) bias and inter-frequency (different
- * from the carrier frequency in GnssClock.referenceSignalForIsb) bias, including:
+ * constellation in GnssClock.referenceSignalTypeForIsb) bias and inter-frequency (different
+ * from the carrier frequency in GnssClock.referenceSignalTypeForIsb) bias, including:
*
* - Master clock bias (e.g., GPS-GAL Time Offset (GGTO), GPT-UTC Time Offset (TauGps),
* BDS-GLO Time Offset (BGTO))
@@ -136,7 +112,7 @@
* - Satellite inter-signal bias, which includes satellite inter-frequency bias (GLO only),
* and satellite inter-code bias (e.g., Differential Code Bias (DCB)).
*
- * The receiver ISB of GnssClock.referenceSignalForIsb is defined to be 0.0 nanoseconds.
+ * The receiver ISB of GnssClock.referenceSignalTypeForIsb is defined to be 0.0 nanoseconds.
*/
double satelliteInterSignalBiasNs;
diff --git a/gnss/2.1/default/Gnss.cpp b/gnss/2.1/default/Gnss.cpp
index c1af103..2b327a9 100644
--- a/gnss/2.1/default/Gnss.cpp
+++ b/gnss/2.1/default/Gnss.cpp
@@ -339,7 +339,7 @@
const auto capabilities = Capabilities::MEASUREMENTS | Capabilities::MEASUREMENT_CORRECTIONS |
Capabilities::LOW_POWER_MODE | Capabilities::SATELLITE_BLACKLIST |
Capabilities::ANTENNA_INFO;
- auto ret = sGnssCallback_2_1->gnssSetCapabilitiesCb_2_0(capabilities);
+ auto ret = sGnssCallback_2_1->gnssSetCapabilitiesCb_2_1(capabilities);
if (!ret.isOk()) {
ALOGE("%s: Unable to invoke callback", __func__);
}
diff --git a/gnss/2.1/vts/functional/gnss_hal_test.cpp b/gnss/2.1/vts/functional/gnss_hal_test.cpp
index 83c4c3c..da7a62b 100644
--- a/gnss/2.1/vts/functional/gnss_hal_test.cpp
+++ b/gnss/2.1/vts/functional/gnss_hal_test.cpp
@@ -215,6 +215,12 @@
return Void();
}
+Return<void> GnssHalTest::GnssCallback::gnssSetCapabilitiesCb_2_1(uint32_t capabilities) {
+ ALOGI("Capabilities (v2.1) received %d", capabilities);
+ capabilities_cbq_.store(capabilities);
+ return Void();
+}
+
Return<void> GnssHalTest::GnssCallback::gnssNameCb(const android::hardware::hidl_string& name) {
ALOGI("Name received: %s", name.c_str());
name_cbq_.store(name);
diff --git a/gnss/2.1/vts/functional/gnss_hal_test.h b/gnss/2.1/vts/functional/gnss_hal_test.h
index 3472edb..9e6e162 100644
--- a/gnss/2.1/vts/functional/gnss_hal_test.h
+++ b/gnss/2.1/vts/functional/gnss_hal_test.h
@@ -109,6 +109,7 @@
// New in v2.1
Return<void> gnssSvStatusCb_2_1(
const hidl_vec<IGnssCallback_2_1::GnssSvInfo>& svInfoList) override;
+ Return<void> gnssSetCapabilitiesCb_2_1(uint32_t capabilities) override;
private:
Return<void> gnssLocationCbImpl(const GnssLocation_2_0& location);