diff options
3 files changed, 7 insertions, 6 deletions
diff --git a/content/browser/geolocation/location_api_adapter_android.cc b/content/browser/geolocation/location_api_adapter_android.cc index f1c8948..9c2356c 100644 --- a/content/browser/geolocation/location_api_adapter_android.cc +++ b/content/browser/geolocation/location_api_adapter_android.cc @@ -19,7 +19,7 @@ using base::android::GetMethodID; static void NewLocationAvailable(JNIEnv* env, jclass, jdouble latitude, jdouble longitude, - jlong time_stamp, + jdouble time_stamp, jboolean has_altitude, jdouble altitude, jboolean has_accuracy, jdouble accuracy, jboolean has_heading, jdouble heading, @@ -98,7 +98,7 @@ void AndroidLocationApiAdapter::NotifyProviderNewGeoposition( // static void AndroidLocationApiAdapter::OnNewLocationAvailable( - double latitude, double longitude, long time_stamp, + double latitude, double longitude, double time_stamp, bool has_altitude, double altitude, bool has_accuracy, double accuracy, bool has_heading, double heading, @@ -106,7 +106,7 @@ void AndroidLocationApiAdapter::OnNewLocationAvailable( content::Geoposition position; position.latitude = latitude; position.longitude = longitude; - position.timestamp = base::Time::FromDoubleT(time_stamp / 1000.0); + position.timestamp = base::Time::FromDoubleT(time_stamp); if (has_altitude) position.altitude = altitude; if (has_accuracy) diff --git a/content/browser/geolocation/location_api_adapter_android.h b/content/browser/geolocation/location_api_adapter_android.h index c2b4f85..06d7195 100644 --- a/content/browser/geolocation/location_api_adapter_android.h +++ b/content/browser/geolocation/location_api_adapter_android.h @@ -49,7 +49,7 @@ class AndroidLocationApiAdapter { // Called by JNI on main thread looper. static void OnNewLocationAvailable(double latitude, double longitude, - long time_stamp, + double time_stamp, bool has_altitude, double altitude, bool has_accuracy, double accuracy, bool has_heading, double heading, diff --git a/content/public/android/java/org/chromium/content/browser/LocationProvider.java b/content/public/android/java/org/chromium/content/browser/LocationProvider.java index 6a89eef..75be3dd 100644 --- a/content/public/android/java/org/chromium/content/browser/LocationProvider.java +++ b/content/public/android/java/org/chromium/content/browser/LocationProvider.java @@ -102,7 +102,8 @@ class LocationProvider { // native object will no longer exist. if (mIsRunning) { nativeNewLocationAvailable(location.getLatitude(), location.getLongitude(), - location.getTime(), location.hasAltitude(), location.getAltitude(), + location.getTime() / 1000.0, + location.hasAltitude(), location.getAltitude(), location.hasAccuracy(), location.getAccuracy(), location.hasBearing(), location.getBearing(), location.hasSpeed(), location.getSpeed()); @@ -223,7 +224,7 @@ class LocationProvider { // Native functions public static native void nativeNewLocationAvailable( - double latitude, double longitude, long timeStamp, + double latitude, double longitude, double timeStamp, boolean hasAltitude, double altitude, boolean hasAccuracy, double accuracy, boolean hasHeading, double heading, |