Clean empty

This commit is contained in:
Victor Shcherb 2018-07-09 20:58:30 +02:00
parent a88aa6336e
commit 72fe281232

View file

@ -780,14 +780,17 @@ public class OsmandRegions {
public List<String> getRegions(double lat, double lon, List<String> keyNames) throws IOException {
public List<String> getRegionsToDownload(double lat, double lon, List<String> keyNames) throws IOException {
keyNames.clear();
int x31 = MapUtils.get31TileNumberX(lon);
int y31 = MapUtils.get31TileNumberY(lat);
List<BinaryMapDataObject> cs = query(x31, y31);
for (BinaryMapDataObject b : cs) {
if (contain(b, x31, y31)) {
keyNames.add(getDownloadName(b));
String downloadName = getDownloadName(b);
if(!Algorithms.isEmpty(downloadName)) {
keyNames.add(downloadName);
}
}
}
return keyNames;