diff --git a/OsmAnd-java/src/net/osmand/CollatorStringMatcher.java b/OsmAnd-java/src/net/osmand/CollatorStringMatcher.java index 1fa8ce9088..8ae8e3cf92 100644 --- a/OsmAnd-java/src/net/osmand/CollatorStringMatcher.java +++ b/OsmAnd-java/src/net/osmand/CollatorStringMatcher.java @@ -1,5 +1,7 @@ package net.osmand; +import java.util.Locale; + /** @@ -23,7 +25,7 @@ public class CollatorStringMatcher implements StringMatcher { public CollatorStringMatcher(String part, StringMatcherMode mode) { this.collator = OsmAndCollator.primaryCollator(); - this.part = part; + this.part = part.toLowerCase(Locale.getDefault()); this.mode = mode; } @@ -94,8 +96,9 @@ public class CollatorStringMatcher implements StringMatcher { * @param theStart * @return true if searchIn starts with token */ - public static boolean cstartsWith(Collator collator, String searchIn, String theStart, + public static boolean cstartsWith(Collator collator, String searchInParam, String theStart, boolean checkBeginning, boolean checkSpaces) { + String searchIn = searchInParam.toLowerCase(Locale.getDefault()); int startLength = theStart.length(); int searchInLength = searchIn.length(); if (startLength == 0) { diff --git a/OsmAnd/src/net/osmand/plus/views/POIMapLayer.java b/OsmAnd/src/net/osmand/plus/views/POIMapLayer.java index 6756992201..abfbea6f47 100644 --- a/OsmAnd/src/net/osmand/plus/views/POIMapLayer.java +++ b/OsmAnd/src/net/osmand/plus/views/POIMapLayer.java @@ -23,9 +23,7 @@ import net.osmand.plus.OsmandApplication; import net.osmand.plus.OsmandSettings; import net.osmand.plus.R; import net.osmand.plus.activities.MapActivity; -import net.osmand.plus.download.DownloadActivity; import net.osmand.plus.helpers.FileNameTranslationHelper; -import net.osmand.plus.osmo.OsMoService; import net.osmand.plus.poi.PoiFiltersHelper; import net.osmand.plus.poi.PoiUIFilter; import net.osmand.plus.render.RenderingIcons; @@ -34,21 +32,18 @@ import net.osmand.plus.routing.RoutingHelper; import net.osmand.plus.routing.RoutingHelper.IRouteInformationListener; import net.osmand.plus.views.MapTextLayer.MapTextProvider; import net.osmand.util.Algorithms; -import android.app.Activity; import android.app.AlertDialog; -import android.app.Dialog; import android.app.AlertDialog.Builder; +import android.app.Dialog; import android.content.Context; -import android.content.DialogInterface; import android.content.Intent; -import android.content.DialogInterface.OnCancelListener; import android.graphics.Bitmap; import android.graphics.Canvas; import android.graphics.Color; import android.graphics.Paint; import android.graphics.Paint.Style; -import android.graphics.drawable.Drawable; import android.graphics.PointF; +import android.graphics.drawable.Drawable; import android.net.Uri; import android.support.v4.view.MenuItemCompat; import android.support.v7.widget.PopupMenu; @@ -64,7 +59,6 @@ import android.view.MotionEvent; import android.view.View; import android.webkit.WebSettings; import android.webkit.WebView; -import android.webkit.WebViewClient; import android.widget.ArrayAdapter; import android.widget.Button; import android.widget.LinearLayout; @@ -496,7 +490,8 @@ public class POIMapLayer extends OsmandMapLayer implements ContextMenuLayer.ICon @Override public PointDescription getObjectName(Object o) { if (o instanceof Amenity) { - return new PointDescription(PointDescription.POINT_TYPE_POI, ((Amenity) o).getName()); + return new PointDescription(PointDescription.POINT_TYPE_POI, ((Amenity) o).getName( + view.getSettings().MAP_PREFERRED_LOCALE.get())); } return null; } @@ -526,7 +521,7 @@ public class POIMapLayer extends OsmandMapLayer implements ContextMenuLayer.ICon @Override public String getText(Amenity o) { - return o.getName(view.getSettings().usingEnglishNames()); + return o.getName(view.getSettings().MAP_PREFERRED_LOCALE.get()); } @Override