Skip to content

Commit

Permalink
Merge branch 'osmandapp:master' into hardy_Afa
Browse files Browse the repository at this point in the history
  • Loading branch information
sonora authored Nov 26, 2024
2 parents 43baf69 + bb66961 commit 2e4aca0
Show file tree
Hide file tree
Showing 25 changed files with 670 additions and 624 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -973,7 +973,7 @@ private boolean checkCategories(SearchRequest<Amenity> req, PoiRegion region) th
}
}
subtype = poiTypes.replaceDeprecatedSubtype(type, subtype);
if (req.poiTypeFilter.accept(type, subtype)) {
if (req.poiTypeFilter != null && req.poiTypeFilter.accept(type, subtype)) {
codedIS.skipRawBytes(codedIS.getBytesUntilLimit());
return true;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1230,7 +1230,7 @@ public boolean search(final SearchPhrase phrase, final SearchResultMatcher resul
} else if (obj instanceof SearchPoiTypeFilter) {
poiTypeFilter = (SearchPoiTypeFilter) obj;
} else if (obj instanceof SearchPoiAdditionalFilter) {
poiTypeFilter = ACCEPT_ALL_POI_TYPE_FILTER;
poiTypeFilter = null;
poiAdditionalFilter = (SearchPoiAdditionalFilter) obj;
} else {
throw new UnsupportedOperationException();
Expand Down Expand Up @@ -1273,9 +1273,9 @@ public boolean search(final SearchPhrase phrase, final SearchResultMatcher resul
}
}
this.nameFilter = nameFilter;
if (poiTypeFilter != null) {
if (poiTypeFilter != null || poiAdditionalFilter != null) {
int radius = BBOX_RADIUS;
if (phrase.getRadiusLevel() == 1 && poiTypeFilter instanceof CustomSearchPoiFilter) {
if (poiTypeFilter != null && phrase.getRadiusLevel() == 1 && poiTypeFilter instanceof CustomSearchPoiFilter) {
String name = ((CustomSearchPoiFilter) poiTypeFilter).getFilterId();
if ("std_null".equals(name)) {
radius = BBOX_RADIUS_NEAREST;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -755,27 +755,27 @@ class GpxFile : GpxExtensions {
val dest = GpxFile(this.author)
dest.metadata = Metadata(this.metadata)
val tracks = dest.tracks
for (track in this.tracks) {
for (track in this.tracks.toList()) {
tracks.add(cloneTrack(track))
}
val routes = dest.routes
for (route in this.routes) {
for (route in this.routes.toList()) {
routes.add(cloneRoute(route))
}
val points = mutableListOf<WptPt>()
for (point in this.points) {
for (point in this.points.toList()) {
points.add(WptPt(point))
}
dest.setPointsList(points)

dest.pointsGroups = LinkedHashMap()
val pointsGroups = dest.pointsGroups
for ((key, value) in this.pointsGroups.entries) {
for ((key, value) in this.pointsGroups.toMap().entries) {
pointsGroups[key] = clonePointsGroup(value)
}
dest.pointsGroups = pointsGroups

dest.addRouteKeyTags(this.getRouteKeyTags())
dest.addRouteKeyTags(this.getRouteKeyTags().toMap())

dest.path = this.path
dest.showCurrentTrack = this.showCurrentTrack
Expand All @@ -793,7 +793,7 @@ class GpxFile : GpxExtensions {
dest.desc = source.desc
dest.generalTrack = source.generalTrack
val trkSegments = mutableListOf<TrkSegment>()
for (segment in source.segments) {
for (segment in source.segments.toList()) {
trkSegments.add(cloneTrkSegment(segment))
}
dest.segments = trkSegments
Expand All @@ -806,7 +806,7 @@ class GpxFile : GpxExtensions {
dest.name = source.name
dest.desc = source.desc
val points = mutableListOf<WptPt>()
for (point in source.points) {
for (point in source.points.toList()) {
points.add(WptPt(point))
}
dest.points = points
Expand All @@ -818,7 +818,7 @@ class GpxFile : GpxExtensions {
val dest = PointsGroup(source.name, source.iconName, source.backgroundType, source.color)
dest.hidden = source.hidden
val points = mutableListOf<WptPt>()
for (point in source.points) {
for (point in source.points.toList()) {
points.add(WptPt(point))
}
dest.points = points
Expand All @@ -830,17 +830,17 @@ class GpxFile : GpxExtensions {
dest.name = source.name
dest.generalSegment = source.generalSegment
val kPoints = mutableListOf<WptPt>()
for (point in source.points) {
for (point in source.points.toList()) {
kPoints.add(WptPt(point))
}
dest.points = kPoints
val routeSegments = mutableListOf<RouteSegment>()
for (rs in source.routeSegments) {
for (rs in source.routeSegments.toList()) {
routeSegments.add(cloneRouteSegment(rs))
}
dest.routeSegments = routeSegments
val routeTypes = mutableListOf<RouteType>()
for (rt in source.routeTypes) {
for (rt in source.routeTypes.toList()) {
routeTypes.add(cloneRouteType(rt))
}
dest.routeTypes = routeTypes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ open class GpxExtensions {
}

fun copyExtensions(e: GpxExtensions) {
val extensionsToRead = e.getExtensionsToRead()
val extensionsToRead = e.getExtensionsToRead().toMap()
if (extensionsToRead.isNotEmpty()) {
getExtensionsToWrite().putAll(extensionsToRead)
}
Expand Down
190 changes: 0 additions & 190 deletions OsmAnd/assets/bundled_assets.xml

This file was deleted.

5 changes: 5 additions & 0 deletions OsmAnd/res/values-es-rAR/phrases.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4899,4 +4899,9 @@
<string name="poi_name_left">Nombre del lado izquierdo</string>
<string name="poi_name_right">Nombre del lado derecho</string>
<string name="poi_climbing_boulder">Roca de escalada</string>
<string name="poi_camp_site_basic">Básico</string>
<string name="poi_camp_site_standard">Estándar</string>
<string name="poi_camp_site_serviced">Con servicios</string>
<string name="poi_camp_site_type">Tipo de campamento</string>
<string name="poi_camp_site_deluxe">De lujo</string>
</resources>
Loading

0 comments on commit 2e4aca0

Please sign in to comment.