@@ -71,7 +71,7 @@ public class Location implements Parcelable {
7171
7272 private String mProvider ;
7373 private long mTime = 0 ;
74- private long mElapsedRealtimeNano = 0 ;
74+ private long mElapsedRealtimeNanos = 0 ;
7575 private double mLatitude = 0.0 ;
7676 private double mLongitude = 0.0 ;
7777 private boolean mHasAltitude = false ;
@@ -120,7 +120,7 @@ public Location(Location l) {
120120 public void set (Location l ) {
121121 mProvider = l .mProvider ;
122122 mTime = l .mTime ;
123- mElapsedRealtimeNano = l .mElapsedRealtimeNano ;
123+ mElapsedRealtimeNanos = l .mElapsedRealtimeNanos ;
124124 mLatitude = l .mLatitude ;
125125 mLongitude = l .mLongitude ;
126126 mHasAltitude = l .mHasAltitude ;
@@ -140,7 +140,7 @@ public void set(Location l) {
140140 public void reset () {
141141 mProvider = null ;
142142 mTime = 0 ;
143- mElapsedRealtimeNano = 0 ;
143+ mElapsedRealtimeNanos = 0 ;
144144 mLatitude = 0 ;
145145 mLongitude = 0 ;
146146 mHasAltitude = false ;
@@ -485,7 +485,7 @@ public void setProvider(String provider) {
485485 *
486486 * <p>Note that the UTC time on a device is not monotonic: it
487487 * can jump forwards or backwards unpredictably. So always use
488- * {@link #getElapsedRealtimeNano } when calculating time deltas.
488+ * {@link #getElapsedRealtimeNanos } when calculating time deltas.
489489 *
490490 * <p>On the other hand, {@link #getTime} is useful for presenting
491491 * a human readable time to the user, or for carefully comparing
@@ -515,7 +515,7 @@ public void setTime(long time) {
515515 * Return the time of this fix, in elapsed real-time since system boot.
516516 *
517517 * <p>This value can be reliably compared to
518- * {@link android.os.SystemClock#elapsedRealtimeNano },
518+ * {@link android.os.SystemClock#elapsedRealtimeNanos },
519519 * to calculate the age of a fix and to compare Location fixes. This
520520 * is reliable because elapsed real-time is guaranteed monotonic for
521521 * each system boot and continues to increment even when the system
@@ -526,17 +526,17 @@ public void setTime(long time) {
526526 *
527527 * @return elapsed real-time of fix, in nanoseconds since system boot.
528528 */
529- public long getElapsedRealtimeNano () {
530- return mElapsedRealtimeNano ;
529+ public long getElapsedRealtimeNanos () {
530+ return mElapsedRealtimeNanos ;
531531 }
532532
533533 /**
534534 * Set the time of this fix, in elapsed real-time since system boot.
535535 *
536536 * @param time elapsed real-time of fix, in nanoseconds since system boot.
537537 */
538- public void setElapsedRealtimeNano (long time ) {
539- mElapsedRealtimeNano = time ;
538+ public void setElapsedRealtimeNanos (long time ) {
539+ mElapsedRealtimeNanos = time ;
540540 }
541541
542542 /**
@@ -772,7 +772,7 @@ public boolean isComplete() {
772772 if (mProvider == null ) return false ;
773773 if (!mHasAccuracy ) return false ;
774774 if (mTime == 0 ) return false ;
775- if (mElapsedRealtimeNano == 0 ) return false ;
775+ if (mElapsedRealtimeNanos == 0 ) return false ;
776776 return true ;
777777 }
778778
@@ -792,7 +792,7 @@ public void makeComplete() {
792792 mAccuracy = 100.0f ;
793793 }
794794 if (mTime == 0 ) mTime = System .currentTimeMillis ();
795- if (mElapsedRealtimeNano == 0 ) mElapsedRealtimeNano = SystemClock .elapsedRealtimeNano ();
795+ if (mElapsedRealtimeNanos == 0 ) mElapsedRealtimeNanos = SystemClock .elapsedRealtimeNanos ();
796796 }
797797
798798 /**
@@ -832,11 +832,11 @@ public String toString() {
832832 if (mTime == 0 ) {
833833 s .append (" t=?!?" );
834834 }
835- if (mElapsedRealtimeNano == 0 ) {
835+ if (mElapsedRealtimeNanos == 0 ) {
836836 s .append (" et=?!?" );
837837 } else {
838838 s .append (" et=" );
839- TimeUtils .formatDuration (mElapsedRealtimeNano / 1000000L , s );
839+ TimeUtils .formatDuration (mElapsedRealtimeNanos / 1000000L , s );
840840 }
841841 if (mHasAltitude ) s .append (" alt=" ).append (mAltitude );
842842 if (mHasSpeed ) s .append (" vel=" ).append (mSpeed );
@@ -860,7 +860,7 @@ public Location createFromParcel(Parcel in) {
860860 String provider = in .readString ();
861861 Location l = new Location (provider );
862862 l .mTime = in .readLong ();
863- l .mElapsedRealtimeNano = in .readLong ();
863+ l .mElapsedRealtimeNanos = in .readLong ();
864864 l .mLatitude = in .readDouble ();
865865 l .mLongitude = in .readDouble ();
866866 l .mHasAltitude = in .readInt () != 0 ;
@@ -890,7 +890,7 @@ public int describeContents() {
890890 public void writeToParcel (Parcel parcel , int flags ) {
891891 parcel .writeString (mProvider );
892892 parcel .writeLong (mTime );
893- parcel .writeLong (mElapsedRealtimeNano );
893+ parcel .writeLong (mElapsedRealtimeNanos );
894894 parcel .writeDouble (mLatitude );
895895 parcel .writeDouble (mLongitude );
896896 parcel .writeInt (mHasAltitude ? 1 : 0 );
0 commit comments