summaryrefslogtreecommitdiffstats
path: root/location
diff options
context:
space:
mode:
authorPhilip Milne <pmilne@google.com>2012-09-26 11:29:25 -0700
committerPhilip Milne <pmilne@google.com>2012-09-26 11:29:25 -0700
commit4118012da9a22694b3353040a485f8cdc27e2f17 (patch)
tree310eddfb0c3ee5d1205dfbc2c72dd91fb9ffc40f /location
parent2832136bb6fcace61ef078051e94aa0a841aac15 (diff)
downloadframeworks_base-4118012da9a22694b3353040a485f8cdc27e2f17.zip
frameworks_base-4118012da9a22694b3353040a485f8cdc27e2f17.tar.gz
frameworks_base-4118012da9a22694b3353040a485f8cdc27e2f17.tar.bz2
Fix for bug: #7173350. elapsedRealtimeNano() -> elapsedRealtimeNanos()
Change-Id: Ie38952bbaace080e81e41e61350cda172951d548
Diffstat (limited to 'location')
-rw-r--r--location/java/android/location/Location.java30
-rw-r--r--location/java/android/location/LocationManager.java2
2 files changed, 16 insertions, 16 deletions
diff --git a/location/java/android/location/Location.java b/location/java/android/location/Location.java
index 672e378..f057ebc 100644
--- a/location/java/android/location/Location.java
+++ b/location/java/android/location/Location.java
@@ -71,7 +71,7 @@ public class Location implements Parcelable {
private String mProvider;
private long mTime = 0;
- private long mElapsedRealtimeNano = 0;
+ private long mElapsedRealtimeNanos = 0;
private double mLatitude = 0.0;
private double mLongitude = 0.0;
private boolean mHasAltitude = false;
@@ -120,7 +120,7 @@ public class Location implements Parcelable {
public void set(Location l) {
mProvider = l.mProvider;
mTime = l.mTime;
- mElapsedRealtimeNano = l.mElapsedRealtimeNano;
+ mElapsedRealtimeNanos = l.mElapsedRealtimeNanos;
mLatitude = l.mLatitude;
mLongitude = l.mLongitude;
mHasAltitude = l.mHasAltitude;
@@ -140,7 +140,7 @@ public class Location implements Parcelable {
public void reset() {
mProvider = null;
mTime = 0;
- mElapsedRealtimeNano = 0;
+ mElapsedRealtimeNanos = 0;
mLatitude = 0;
mLongitude = 0;
mHasAltitude = false;
@@ -485,7 +485,7 @@ public class Location implements Parcelable {
*
* <p>Note that the UTC time on a device is not monotonic: it
* can jump forwards or backwards unpredictably. So always use
- * {@link #getElapsedRealtimeNano} when calculating time deltas.
+ * {@link #getElapsedRealtimeNanos} when calculating time deltas.
*
* <p>On the other hand, {@link #getTime} is useful for presenting
* a human readable time to the user, or for carefully comparing
@@ -515,7 +515,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
@@ -526,8 +526,8 @@ public class Location implements Parcelable {
*
* @return elapsed real-time of fix, in nanoseconds since system boot.
*/
- public long getElapsedRealtimeNano() {
- return mElapsedRealtimeNano;
+ public long getElapsedRealtimeNanos() {
+ return mElapsedRealtimeNanos;
}
/**
@@ -535,8 +535,8 @@ public class Location implements Parcelable {
*
* @param time elapsed real-time of fix, in nanoseconds since system boot.
*/
- public void setElapsedRealtimeNano(long time) {
- mElapsedRealtimeNano = time;
+ public void setElapsedRealtimeNanos(long time) {
+ mElapsedRealtimeNanos = time;
}
/**
@@ -772,7 +772,7 @@ public class Location implements Parcelable {
if (mProvider == null) return false;
if (!mHasAccuracy) return false;
if (mTime == 0) return false;
- if (mElapsedRealtimeNano == 0) return false;
+ if (mElapsedRealtimeNanos == 0) return false;
return true;
}
@@ -792,7 +792,7 @@ public class Location implements Parcelable {
mAccuracy = 100.0f;
}
if (mTime == 0) mTime = System.currentTimeMillis();
- if (mElapsedRealtimeNano == 0) mElapsedRealtimeNano = SystemClock.elapsedRealtimeNano();
+ if (mElapsedRealtimeNanos == 0) mElapsedRealtimeNanos = SystemClock.elapsedRealtimeNanos();
}
/**
@@ -832,11 +832,11 @@ public class Location implements Parcelable {
if (mTime == 0) {
s.append(" t=?!?");
}
- if (mElapsedRealtimeNano == 0) {
+ if (mElapsedRealtimeNanos == 0) {
s.append(" et=?!?");
} else {
s.append(" et=");
- TimeUtils.formatDuration(mElapsedRealtimeNano / 1000000L, s);
+ TimeUtils.formatDuration(mElapsedRealtimeNanos / 1000000L, s);
}
if (mHasAltitude) s.append(" alt=").append(mAltitude);
if (mHasSpeed) s.append(" vel=").append(mSpeed);
@@ -860,7 +860,7 @@ public class Location implements Parcelable {
String provider = in.readString();
Location l = new Location(provider);
l.mTime = in.readLong();
- l.mElapsedRealtimeNano = in.readLong();
+ l.mElapsedRealtimeNanos = in.readLong();
l.mLatitude = in.readDouble();
l.mLongitude = in.readDouble();
l.mHasAltitude = in.readInt() != 0;
@@ -890,7 +890,7 @@ public class Location implements Parcelable {
public void writeToParcel(Parcel parcel, int flags) {
parcel.writeString(mProvider);
parcel.writeLong(mTime);
- parcel.writeLong(mElapsedRealtimeNano);
+ parcel.writeLong(mElapsedRealtimeNanos);
parcel.writeDouble(mLatitude);
parcel.writeDouble(mLongitude);
parcel.writeInt(mHasAltitude ? 1 : 0);
diff --git a/location/java/android/location/LocationManager.java b/location/java/android/location/LocationManager.java
index 5b3c9e2..4ad8fd0 100644
--- a/location/java/android/location/LocationManager.java
+++ b/location/java/android/location/LocationManager.java
@@ -1186,7 +1186,7 @@ public class LocationManager {
* Get the last known location.
*
* <p>This location could be very old so use
- * {@link Location#getElapsedRealtimeNano} to calculate its age. It can
+ * {@link Location#getElapsedRealtimeNanos} to calculate its age. It can
* also return null if no previous location is available.
*
* <p>Always returns immediately.