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

Unified Diff: content/public/android/java/src/org/chromium/content/browser/LocationProviderFactory.java

Issue 546633004: Refactoring the code for location manager. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Changes according to review Created 6 years, 3 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.");
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698