mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-27 12:53:55 +01:00
Set min update time to a smaller value
This commit is contained in:
parent
2f647a53e5
commit
d2d7d607fb
1 changed files with 3 additions and 3 deletions
|
|
@ -23,7 +23,7 @@ import timber.log.Timber;
|
||||||
public class LocationServiceManager implements LocationListener {
|
public class LocationServiceManager implements LocationListener {
|
||||||
public static final int LOCATION_REQUEST = 1;
|
public static final int LOCATION_REQUEST = 1;
|
||||||
|
|
||||||
private static final long MIN_LOCATION_UPDATE_REQUEST_TIME_IN_MILLIS = 2 * 60 * 1000;
|
private static final long MIN_LOCATION_UPDATE_REQUEST_TIME_IN_MILLIS = 2 * 60 * 100;
|
||||||
private static final long MIN_LOCATION_UPDATE_REQUEST_DISTANCE_IN_METERS = 10;
|
private static final long MIN_LOCATION_UPDATE_REQUEST_DISTANCE_IN_METERS = 10;
|
||||||
|
|
||||||
private Context context;
|
private Context context;
|
||||||
|
|
@ -180,14 +180,14 @@ public class LocationServiceManager implements LocationListener {
|
||||||
Log.d("deneme","location changed");
|
Log.d("deneme","location changed");
|
||||||
if (isBetterLocation(location, lastLocation)
|
if (isBetterLocation(location, lastLocation)
|
||||||
.equals(LocationChangeType.LOCATION_SIGNIFICANTLY_CHANGED)) {
|
.equals(LocationChangeType.LOCATION_SIGNIFICANTLY_CHANGED)) {
|
||||||
Log.d("deneme","location changed better location");
|
Log.d("deneme","location SIGNIFICANTLY changed better location");
|
||||||
lastLocation = location;
|
lastLocation = location;
|
||||||
for (LocationUpdateListener listener : locationListeners) {
|
for (LocationUpdateListener listener : locationListeners) {
|
||||||
listener.onLocationChangedSignificantly(LatLng.from(lastLocation));
|
listener.onLocationChangedSignificantly(LatLng.from(lastLocation));
|
||||||
}
|
}
|
||||||
} else if (isBetterLocation(location, lastLocation)
|
} else if (isBetterLocation(location, lastLocation)
|
||||||
.equals(LocationChangeType.LOCATION_SLIGHTLY_CHANGED)) {
|
.equals(LocationChangeType.LOCATION_SLIGHTLY_CHANGED)) {
|
||||||
Log.d("deneme","location changed better location");
|
Log.d("deneme","location SLIGHTLY changed better location");
|
||||||
lastLocation = location;
|
lastLocation = location;
|
||||||
for (LocationUpdateListener listener : locationListeners) {
|
for (LocationUpdateListener listener : locationListeners) {
|
||||||
listener.onLocationChangedSlightly(LatLng.from(lastLocation));
|
listener.onLocationChangedSlightly(LatLng.from(lastLocation));
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue