Make simpler

This commit is contained in:
Victor Shcherb 2020-06-19 13:30:07 +02:00
parent 6270e202fb
commit 37465266aa

View file

@ -694,11 +694,10 @@ public class BinaryMapPoiReaderAdapter {
StringBuilder retValue = new StringBuilder();
PoiCategory amenityType = null;
LinkedList<String> textTags = null;
boolean isForbidden = false;
while (true) {
int t = codedIS.readTag();
int tag = WireFormat.getTagFieldNumber(t);
if (amenityType == null && (tag > OsmandOdb.OsmAndPoiBoxDataAtom.CATEGORIES_FIELD_NUMBER || tag == 0) || isForbidden) {
if (amenityType == null && (tag > OsmandOdb.OsmAndPoiBoxDataAtom.CATEGORIES_FIELD_NUMBER || tag == 0)) {
codedIS.skipRawBytes(codedIS.getBytesUntilLimit());
return null;
}
@ -773,8 +772,8 @@ public class BinaryMapPoiReaderAdapter {
}
}
subtype = poiTypes.replaceDeprecatedSubtype(type, subtype);
isForbidden = poiTypes.isKeyNameForbidden(subtype);
if (req.poiTypeFilter == null || req.poiTypeFilter.accept(type, subtype)) {
boolean isForbidden = poiTypes.isKeyNameForbidden(subtype);
if (!isForbidden && (req.poiTypeFilter == null || req.poiTypeFilter.accept(type, subtype))) {
if (amenityType == null) {
amenityType = type;
am.setSubType(subtype);