Index: content/public/android/java/src/org/chromium/content/browser/LocationProviderFactory.java |
diff --git a/content/public/android/java/src/org/chromium/content/browser/LocationProviderFactory.java b/content/public/android/java/src/org/chromium/content/browser/LocationProviderFactory.java |
index 6cec68cb4ad0128588286a7e1170c6bbe42df9bc..6954acbc22ad7be8ef0dee378cf529639a8dcbaa 100644 |
--- a/content/public/android/java/src/org/chromium/content/browser/LocationProviderFactory.java |
+++ b/content/public/android/java/src/org/chromium/content/browser/LocationProviderFactory.java |
@@ -150,13 +150,9 @@ public class LocationProviderFactory { |
// bounce notifications to the Geolocation thread as they arrive in the mainLooper. |
try { |
Criteria criteria = new Criteria(); |
+ if (isGpsEnabled) criteria.setAccuracy(Criteria.ACCURACY_FINE); |
mLocationManager.requestLocationUpdates(0, 0, criteria, this, |
ThreadUtils.getUiThreadLooper()); |
- if (isGpsEnabled) { |
- criteria.setAccuracy(Criteria.ACCURACY_FINE); |
- mLocationManager.requestLocationUpdates(0, 0, criteria, this, |
- ThreadUtils.getUiThreadLooper()); |
- } |
} catch (SecurityException e) { |
Log.e(TAG, "Caught security exception registering for location updates from " + |
"system. This should only happen in DumpRenderTree."); |