Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(962)

Unified Diff: device/geolocation/android/java/src/org/chromium/device/geolocation/LocationProviderAdapter.java

Issue 2832983003: Revert of GeoLocation: add support for GmsCore location provider (Closed)
Patch Set: Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: device/geolocation/android/java/src/org/chromium/device/geolocation/LocationProviderAdapter.java
diff --git a/device/geolocation/android/java/src/org/chromium/device/geolocation/LocationProviderAdapter.java b/device/geolocation/android/java/src/org/chromium/device/geolocation/LocationProviderAdapter.java
index c735159562ade09baf87a0df9f37ab094cf5498e..bd2ffb93036452a115b9269b28d05553322fd6e7 100644
--- a/device/geolocation/android/java/src/org/chromium/device/geolocation/LocationProviderAdapter.java
+++ b/device/geolocation/android/java/src/org/chromium/device/geolocation/LocationProviderAdapter.java
@@ -5,9 +5,7 @@
package org.chromium.device.geolocation;
import android.content.Context;
-import android.location.Location;
-import org.chromium.base.Log;
import org.chromium.base.ThreadUtils;
import org.chromium.base.VisibleForTesting;
import org.chromium.base.annotations.CalledByNative;
@@ -26,8 +24,6 @@
@MainDex
@VisibleForTesting
public class LocationProviderAdapter {
- private static final String TAG = "cr_LocationProvider";
-
// Delegate handling the real work in the main thread.
private LocationProviderFactory.LocationProvider mImpl;
@@ -79,15 +75,14 @@
return mImpl.isRunning();
}
- public static void onNewLocationAvailable(Location location) {
- nativeNewLocationAvailable(location.getLatitude(), location.getLongitude(),
- location.getTime() / 1000.0, location.hasAltitude(), location.getAltitude(),
- location.hasAccuracy(), location.getAccuracy(), location.hasBearing(),
- location.getBearing(), location.hasSpeed(), location.getSpeed());
+ public static void newLocationAvailable(double latitude, double longitude, double timestamp,
+ boolean hasAltitude, double altitude, boolean hasAccuracy, double accuracy,
+ boolean hasHeading, double heading, boolean hasSpeed, double speed) {
+ nativeNewLocationAvailable(latitude, longitude, timestamp, hasAltitude, altitude,
+ hasAccuracy, accuracy, hasHeading, heading, hasSpeed, speed);
}
public static void newErrorAvailable(String message) {
- Log.e(TAG, "newErrorAvailable %s", message);
nativeNewErrorAvailable(message);
}

Powered by Google App Engine
This is Rietveld 408576698