From dd73153c68e481164868160075bb9658b436c62b Mon Sep 17 00:00:00 2001 From: Eva Chen Date: Tue, 12 Jan 2021 14:37:33 -0800 Subject: Add getGnssTimeMillis to LocationManagerInternal. Bug: 157265008 Test: Manual + Presubmit Change-Id: Ib3477e8da2ac4683d36785ff5a3416020cd17977 --- location/java/android/location/LocationManagerInternal.java | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'location/java') diff --git a/location/java/android/location/LocationManagerInternal.java b/location/java/android/location/LocationManagerInternal.java index 1027f9c0a7be..a6a0e7aa24ff 100644 --- a/location/java/android/location/LocationManagerInternal.java +++ b/location/java/android/location/LocationManagerInternal.java @@ -80,4 +80,12 @@ public abstract class LocationManagerInternal { */ // TODO: there is no reason for this to exist as part of any API. move all the logic into gnss public abstract void sendNiResponse(int notifId, int userResponse); + + /** + * Returns the GNSS provided time. + * + * @return LocationTime object that includes the current time, according to the GNSS location + * provider, and the elapsed nanos since boot the current time was computed at. + */ + public abstract @Nullable LocationTime getGnssTimeMillis(); } -- cgit v1.2.3-59-g8ed1b