diff --git a/location/java/android/location/GnssClock.java b/location/java/android/location/GnssClock.java index d1b1be9393743..25d247deff24d 100644 --- a/location/java/android/location/GnssClock.java +++ b/location/java/android/location/GnssClock.java @@ -97,7 +97,7 @@ public final class GnssClock implements Parcelable { * *
The sign of the value is defined by the following equation: *
- * UtcTimeNanos = TimeNanos + (FullBiasNanos + BiasNanos) - LeapSecond * 1,000,000,000+ * UtcTimeNanos = TimeNanos - (FullBiasNanos + BiasNanos) - LeapSecond * 1,000,000,000 * *
The value is only available if {@link #hasLeapSecond()} is {@code true}. */ @@ -130,9 +130,9 @@ public final class GnssClock implements Parcelable { * *
This value is expected to be monotonically increasing while the hardware clock remains * powered on. For the case of a hardware clock that is not continuously on, see the - * {@link #getHardwareClockDiscontinuityCount} field. The GPS time can be derived by adding - * {@link #getFullBiasNanos()} and {@link #getBiasNanos()} (when they are available) to this - * value. Sub-nanosecond accuracy can be provided by means of {@link #getBiasNanos()}. + * {@link #getHardwareClockDiscontinuityCount} field. The GPS time can be derived by subtracting + * the sum of {@link #getFullBiasNanos()} and {@link #getBiasNanos()} (when they are available) + * from this value. Sub-nanosecond accuracy can be provided by means of {@link #getBiasNanos()}. * *
The error estimate for this value (if applicable) is {@link #getTimeUncertaintyNanos()}. */ @@ -213,7 +213,7 @@ public final class GnssClock implements Parcelable { *
The sign of the value is defined by the following equation: * *
- * local estimate of GPS time = TimeNanos + (FullBiasNanos + BiasNanos)+ * local estimate of GPS time = TimeNanos - (FullBiasNanos + BiasNanos) */ public long getFullBiasNanos() { return mFullBiasNanos; diff --git a/services/core/jni/com_android_server_location_GnssLocationProvider.cpp b/services/core/jni/com_android_server_location_GnssLocationProvider.cpp index ae050429efed5..78b0844e8ed44 100644 --- a/services/core/jni/com_android_server_location_GnssLocationProvider.cpp +++ b/services/core/jni/com_android_server_location_GnssLocationProvider.cpp @@ -1112,7 +1112,7 @@ static jobject translate_gps_clock(JNIEnv* env, GpsClock* clock) { JavaObject object(env, "android/location/GnssClock"); GpsClockFlags flags = clock->flags; - SET_IF(GNSS_CLOCK_HAS_LEAP_SECOND, + SET_IF(GPS_CLOCK_HAS_LEAP_SECOND, LeapSecond, static_cast