From 0682d3b3bcab4c4cbd57672160aa1b03441f0b0b Mon Sep 17 00:00:00 2001 From: veliymolfar Date: Mon, 18 May 2020 17:00:05 +0300 Subject: [PATCH] fix subCategories --- .../resources/AmenityIndexRepositoryBinary.java | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/resources/AmenityIndexRepositoryBinary.java b/OsmAnd/src/net/osmand/plus/resources/AmenityIndexRepositoryBinary.java index 930012f998..8929309257 100644 --- a/OsmAnd/src/net/osmand/plus/resources/AmenityIndexRepositoryBinary.java +++ b/OsmAnd/src/net/osmand/plus/resources/AmenityIndexRepositoryBinary.java @@ -26,8 +26,10 @@ import java.io.IOException; import java.util.ArrayList; import java.util.Collections; import java.util.HashMap; +import java.util.HashSet; import java.util.List; import java.util.Map; +import java.util.Set; public class AmenityIndexRepositoryBinary implements AmenityIndexRepository { @@ -82,14 +84,12 @@ public class AmenityIndexRepositoryBinary implements AmenityIndexRepository { PoiCategory poiCategory = poiTypes.getPoiCategoryByName(categoryName); List deltaSubCategories = null; - for (List subList : subCategories) { - for (String subCategory : subList) { - if (poiCategory.getPoiTypeByKeyName(subCategory) != null) { - if (deltaSubCategories == null) { - deltaSubCategories = new ArrayList<>(); - } - deltaSubCategories.add(subCategory); + for (String subCategory : subCategories.get(i)) { + if (poiCategory.getPoiTypeByKeyName(subCategory) == null) { + if (deltaSubCategories == null) { + deltaSubCategories = new ArrayList<>(); } + deltaSubCategories.add(subCategory); } } if (deltaSubCategories != null) {