From 18074b0dfcd2f680c0ca0c3a8c8796f41399ee49 Mon Sep 17 00:00:00 2001 From: veliymolfar Date: Thu, 18 Jun 2020 13:38:24 +0300 Subject: [PATCH] small refactor --- .../java/net/osmand/binary/BinaryMapPoiReaderAdapter.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/OsmAnd-java/src/main/java/net/osmand/binary/BinaryMapPoiReaderAdapter.java b/OsmAnd-java/src/main/java/net/osmand/binary/BinaryMapPoiReaderAdapter.java index a080b25851..5c196ebd89 100644 --- a/OsmAnd-java/src/main/java/net/osmand/binary/BinaryMapPoiReaderAdapter.java +++ b/OsmAnd-java/src/main/java/net/osmand/binary/BinaryMapPoiReaderAdapter.java @@ -715,10 +715,6 @@ public class BinaryMapPoiReaderAdapter { am.setRoutePoint(arp); } } - PoiType poiType = poiTypes.getPoiTypeByKeyInCategory(am.getType(), am.getSubType()); - if (poiType != null && poiType.isForbidden()) { - return null; - } return am; case OsmandOdb.OsmAndPoiBoxDataAtom.DX_FIELD_NUMBER: x = (codedIS.readSInt32() + (px << (24 - zoom))) << 7; @@ -774,6 +770,10 @@ public class BinaryMapPoiReaderAdapter { } } subtype = poiTypes.replaceDeprecatedSubtype(type, subtype); + PoiType poiType = poiTypes.getPoiTypeByKeyInCategory(type, subtype); + if (poiType != null && poiType.isForbidden()) { + return null; + } if (req.poiTypeFilter == null || req.poiTypeFilter.accept(type, subtype)) { if (amenityType == null) { amenityType = type;