summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--api/current.txt2
-rw-r--r--core/java/android/os/SystemClock.java4
-rw-r--r--location/java/android/location/Location.java4
-rw-r--r--packages/FusedLocation/src/com/android/location/fused/FusionEngine.java4
-rw-r--r--services/java/com/android/server/TwilightService.java2
-rwxr-xr-xservices/java/com/android/server/location/GpsLocationProvider.java2
6 files changed, 9 insertions, 9 deletions
diff --git a/api/current.txt b/api/current.txt
index ac27f03..4da8098 100644
--- a/api/current.txt
+++ b/api/current.txt
@@ -16560,7 +16560,7 @@ package android.os {
public final class SystemClock {
method public static long currentThreadTimeMillis();
method public static long elapsedRealtime();
- method public static long elapsedRealtimeNano();
+ method public static long elapsedRealtimeNanos();
method public static boolean setCurrentTimeMillis(long);
method public static void sleep(long);
method public static long uptimeMillis();
diff --git a/core/java/android/os/SystemClock.java b/core/java/android/os/SystemClock.java
index a54c25b..c9adf45 100644
--- a/core/java/android/os/SystemClock.java
+++ b/core/java/android/os/SystemClock.java
@@ -50,7 +50,7 @@ package android.os;
* interval does not span device sleep. Most methods that accept a
* timestamp value currently expect the {@link #uptimeMillis} clock.
*
- * <li> <p> {@link #elapsedRealtime} and {@link #elapsedRealtimeNano}
+ * <li> <p> {@link #elapsedRealtime} and {@link #elapsedRealtimeNanos}
* return the time since the system was booted, and include deep sleep.
* This clock is guaranteed to be monotonic, and continues to tick even
* when the CPU is in power saving modes, so is the recommend basis
@@ -157,7 +157,7 @@ public final class SystemClock {
*
* @return elapsed nanoseconds since boot.
*/
- public static native long elapsedRealtimeNano();
+ public static native long elapsedRealtimeNanos();
/**
* Returns milliseconds running in the current thread.
diff --git a/location/java/android/location/Location.java b/location/java/android/location/Location.java
index 2d94ddc..83f8564 100644
--- a/location/java/android/location/Location.java
+++ b/location/java/android/location/Location.java
@@ -505,7 +505,7 @@ public class Location implements Parcelable {
* Return the time of this fix, in elapsed real-time since system boot.
*
* <p>This value can be reliably compared to
- * {@link android.os.SystemClock#elapsedRealtimeNano},
+ * {@link android.os.SystemClock#elapsedRealtimeNanos},
* to calculate the age of a fix and to compare Location fixes. This
* is reliable because elapsed real-time is guaranteed monotonic for
* each system boot and continues to increment even when the system
@@ -782,7 +782,7 @@ public class Location implements Parcelable {
mAccuracy = 100.0f;
}
if (mTime == 0) mTime = System.currentTimeMillis();
- if (mElapsedRealtimeNano == 0) mElapsedRealtimeNano = SystemClock.elapsedRealtimeNano();
+ if (mElapsedRealtimeNano == 0) mElapsedRealtimeNano = SystemClock.elapsedRealtimeNanos();
}
/**
diff --git a/packages/FusedLocation/src/com/android/location/fused/FusionEngine.java b/packages/FusedLocation/src/com/android/location/fused/FusionEngine.java
index 1c22c7a..d2dfe3b 100644
--- a/packages/FusedLocation/src/com/android/location/fused/FusionEngine.java
+++ b/packages/FusedLocation/src/com/android/location/fused/FusionEngine.java
@@ -215,7 +215,7 @@ public class FusionEngine implements LocationListener {
}
private static double weighAge(Location loc) {
- long ageSeconds = SystemClock.elapsedRealtimeNano() - loc.getElapsedRealtimeNano();
+ long ageSeconds = SystemClock.elapsedRealtimeNanos() - loc.getElapsedRealtimeNano();
ageSeconds /= 1000000000L;
if (ageSeconds < 0) ageSeconds = 0;
return Math.exp(-ageSeconds * AGE_DECAY_CONSTANT_S);
@@ -266,7 +266,7 @@ public class FusionEngine implements LocationListener {
// fused time - now
fused.setTime(System.currentTimeMillis());
- fused.setElapsedRealtimeNano(SystemClock.elapsedRealtimeNano());
+ fused.setElapsedRealtimeNano(SystemClock.elapsedRealtimeNanos());
// fuse altitude
if (mGpsLocation.hasAltitude() && !mNetworkLocation.hasAltitude() &&
diff --git a/services/java/com/android/server/TwilightService.java b/services/java/com/android/server/TwilightService.java
index a7bce54..f313f48 100644
--- a/services/java/com/android/server/TwilightService.java
+++ b/services/java/com/android/server/TwilightService.java
@@ -447,7 +447,7 @@ public final class TwilightService {
location.setLatitude(0);
location.setAccuracy(417000.0f);
location.setTime(System.currentTimeMillis());
- location.setElapsedRealtimeNano(SystemClock.elapsedRealtimeNano());
+ location.setElapsedRealtimeNano(SystemClock.elapsedRealtimeNanos());
if (DEBUG) {
Slog.d(TAG, "Estimated location from timezone: " + location);
diff --git a/services/java/com/android/server/location/GpsLocationProvider.java b/services/java/com/android/server/location/GpsLocationProvider.java
index bb11fe7..1702f88 100755
--- a/services/java/com/android/server/location/GpsLocationProvider.java
+++ b/services/java/com/android/server/location/GpsLocationProvider.java
@@ -1029,7 +1029,7 @@ public class GpsLocationProvider implements LocationProviderInterface {
mLocation.setTime(timestamp);
// It would be nice to push the elapsed real-time timestamp
// further down the stack, but this is still useful
- mLocation.setElapsedRealtimeNano(SystemClock.elapsedRealtimeNano());
+ mLocation.setElapsedRealtimeNano(SystemClock.elapsedRealtimeNanos());
}
if ((flags & LOCATION_HAS_ALTITUDE) == LOCATION_HAS_ALTITUDE) {
mLocation.setAltitude(altitude);