summaryrefslogtreecommitdiff
path: root/location
diff options
context:
space:
mode:
author Treehugger Robot <android-test-infra-autosubmit@system.gserviceaccount.com> 2025-02-24 19:37:21 -0800
committer Android (Google) Code Review <android-gerrit@google.com> 2025-02-24 19:37:21 -0800
commit5e7e258b263ea3293bbc5bf3e35fa16524a43bc2 (patch)
treefa5ed58edf20b53459930e341e4f88dfb59b4450 /location
parent2776ba79f6b6a66d6c56a960e449984f785d4c52 (diff)
parentf5283d2c2ce545a7df6c3ce8f307805c47973340 (diff)
Merge "Clarify AGC fields" into main
Diffstat (limited to 'location')
-rw-r--r--location/java/android/location/GnssMeasurement.java4
-rw-r--r--location/java/android/location/GnssMeasurementsEvent.java8
2 files changed, 12 insertions, 0 deletions
diff --git a/location/java/android/location/GnssMeasurement.java b/location/java/android/location/GnssMeasurement.java
index 200d4ef86146..6ae73a2e6fe5 100644
--- a/location/java/android/location/GnssMeasurement.java
+++ b/location/java/android/location/GnssMeasurement.java
@@ -1484,6 +1484,10 @@ public final class GnssMeasurement implements Parcelable {
* in an open sky test - the important aspect of this output is that changes in this value are
* indicative of changes on input signal power in the frequency band for this measurement.
*
+ * <p> This field is part of the GnssMeasurement object so it is only reported when the GNSS
+ * measurement is reported. E.g., when a GNSS signal is too weak to be acquired, the AGC value
+ * is not reported.
+ *
* <p> The value is only available if {@link #hasAutomaticGainControlLevelDb()} is {@code true}
*
* @deprecated Use {@link GnssMeasurementsEvent#getGnssAutomaticGainControls()} instead.
diff --git a/location/java/android/location/GnssMeasurementsEvent.java b/location/java/android/location/GnssMeasurementsEvent.java
index 4fc2ee8b7fb0..8cdfd013130a 100644
--- a/location/java/android/location/GnssMeasurementsEvent.java
+++ b/location/java/android/location/GnssMeasurementsEvent.java
@@ -158,6 +158,14 @@ public final class GnssMeasurementsEvent implements Parcelable {
/**
* Gets the collection of {@link GnssAutomaticGainControl} associated with the
* current event.
+ *
+ * <p>This field must be reported when the GNSS measurement engine is running, even when the
+ * 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.
+ *
+ * <p>For devices that do not support this field, an empty collection is returned. In that case,
+ * please use {@link GnssMeasurement#hasAutomaticGainControlLevelDb()}
+ * and {@link GnssMeasuremen#getAutomaticGainControlLevelDb()}.
*/
@NonNull
public Collection<GnssAutomaticGainControl> getGnssAutomaticGainControls() {