import android.os.Bundle;
import android.util.Log;
-import com.google.common.annotations.VisibleForTesting;
-
import org.chromium.base.ThreadUtils;
+import org.chromium.base.VisibleForTesting;
import java.util.List;
@Override
public void onLocationChanged(Location location) {
- // Callbacks from the system location sevice are queued to this thread, so it's
+ // Callbacks from the system location service are queued to this thread, so it's
// possible that we receive callbacks after unregistering. At this point, the
// native object will no longer exist.
if (mIsRunning) {
// 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.");