From 3703fa9b2c2f8efeca147df71665d50572bd057e Mon Sep 17 00:00:00 2001 From: Victor Shcherb Date: Sat, 25 Mar 2017 19:07:13 +0100 Subject: [PATCH] Revert "Display alternative names for streets" This reverts commit 51d9605cdedec97ce79269226e5818a52749d31a. --- .../osmand/search/core/SearchCoreFactory.java | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/OsmAnd-java/src/net/osmand/search/core/SearchCoreFactory.java b/OsmAnd-java/src/net/osmand/search/core/SearchCoreFactory.java index ac43c28dba..32bca1d208 100644 --- a/OsmAnd-java/src/net/osmand/search/core/SearchCoreFactory.java +++ b/OsmAnd-java/src/net/osmand/search/core/SearchCoreFactory.java @@ -41,7 +41,6 @@ import java.util.Iterator; import java.util.LinkedHashMap; import java.util.LinkedHashSet; import java.util.List; -import java.util.Locale; import java.util.Map; import java.util.Map.Entry; @@ -357,15 +356,6 @@ public class SearchCoreFactory { if (!phrase.getNameStringMatcher().matches(stripBraces(sr.localeName))) { sr.priorityDistance = 5; } - String searchTextLower = phrase.getUnknownSearchWord().toLowerCase(); - if (!Algorithms.isEmpty(searchTextLower) && !sr.localeName.toLowerCase().contains(searchTextLower)) { - for (String otherName : sr.otherNames) { - if (otherName.toLowerCase().contains(searchTextLower)) { - sr.localeName = sr.localeName + " (" + otherName + ")"; - break; - } - } - } sr.objectType = ObjectType.STREET; sr.localeRelatedObjectName = ((Street)object).getCity().getName(phrase.getSettings().getLang(), phrase.getSettings().isTransliterate()); sr.relatedObject = ((Street)object).getCity(); @@ -876,15 +866,6 @@ public class SearchCoreFactory { && !(nm.matches(res.localeName) || nm.matches(res.otherNames))) { continue; } - String searchTextLower = phrase.getUnknownSearchWord().toLowerCase(); - if (!Algorithms.isEmpty(searchTextLower) && !res.localeName.toLowerCase().contains(searchTextLower)) { - for (String otherName : res.otherNames) { - if (otherName.toLowerCase().contains(searchTextLower)) { - res.localeName = res.localeName + " (" + otherName + ")"; - break; - } - } - } res.localeRelatedObjectName = c.getName(phrase.getSettings().getLang(), phrase.getSettings().isTransliterate()); res.object = object; res.preferredZoom = 17;