Fix race condition in #2521
This commit is contained in:
parent
8c3696b76b
commit
c55b928446
1 changed files with 3 additions and 1 deletions
|
@ -1,6 +1,7 @@
|
||||||
package net.osmand.plus.poi;
|
package net.osmand.plus.poi;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.Collections;
|
||||||
import java.util.LinkedHashMap;
|
import java.util.LinkedHashMap;
|
||||||
import java.util.LinkedHashSet;
|
import java.util.LinkedHashSet;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
@ -34,8 +35,9 @@ public class SearchByNameFilter extends PoiUIFilter {
|
||||||
double bottomLatitude, double leftLongitude, double rightLongitude, final ResultMatcher<Amenity> matcher) {
|
double bottomLatitude, double leftLongitude, double rightLongitude, final ResultMatcher<Amenity> matcher) {
|
||||||
currentSearchResult = new ArrayList<Amenity>();
|
currentSearchResult = new ArrayList<Amenity>();
|
||||||
final int limit = distanceInd == 0 ? 500 : -1;
|
final int limit = distanceInd == 0 ? 500 : -1;
|
||||||
|
List<Amenity> result = Collections.emptyList();
|
||||||
if (!Algorithms.isBlank(getFilterByName())) {
|
if (!Algorithms.isBlank(getFilterByName())) {
|
||||||
List<Amenity> result = app.getResourceManager().searchAmenitiesByName(getFilterByName(), topLatitude,
|
result = app.getResourceManager().searchAmenitiesByName(getFilterByName(), topLatitude,
|
||||||
leftLongitude, bottomLatitude, rightLongitude, lat, lon, new ResultMatcher<Amenity>() {
|
leftLongitude, bottomLatitude, rightLongitude, lat, lon, new ResultMatcher<Amenity>() {
|
||||||
boolean elimit = false;
|
boolean elimit = false;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue