diff --git a/OsmAnd/src/net/osmand/plus/search/QuickSearchDialogFragment.java b/OsmAnd/src/net/osmand/plus/search/QuickSearchDialogFragment.java index bf9c799963..d57570e180 100644 --- a/OsmAnd/src/net/osmand/plus/search/QuickSearchDialogFragment.java +++ b/OsmAnd/src/net/osmand/plus/search/QuickSearchDialogFragment.java @@ -509,6 +509,10 @@ public class QuickSearchDialogFragment extends DialogFragment implements OsmAndC @Override public boolean publish(SearchResult object) { + if (mainSearchFragment == null) { + return false; + } + switch (object.objectType) { case SEARCH_API_FINISHED: final SearchCoreAPI searchApi = (SearchCoreAPI) object.object; @@ -581,7 +585,7 @@ public class QuickSearchDialogFragment extends DialogFragment implements OsmAndC @Override public boolean isCancelled() { - return false; + return mainSearchFragment == null; } }); } diff --git a/OsmAnd/src/net/osmand/plus/search/QuickSearchListItem.java b/OsmAnd/src/net/osmand/plus/search/QuickSearchListItem.java index 73f3fd47ac..e007738e35 100644 --- a/OsmAnd/src/net/osmand/plus/search/QuickSearchListItem.java +++ b/OsmAnd/src/net/osmand/plus/search/QuickSearchListItem.java @@ -8,6 +8,7 @@ import net.osmand.data.Amenity; import net.osmand.data.City; import net.osmand.data.City.CityType; import net.osmand.data.FavouritePoint; +import net.osmand.data.LatLon; import net.osmand.data.PointDescription; import net.osmand.data.Street; import net.osmand.osm.AbstractPoiType; @@ -180,7 +181,13 @@ public class QuickSearchListItem { } return typeStr; case LOCATION: - break; + LatLon latLon = (LatLon) searchResult.object; + String country = app.getRegions().getCountryName(latLon); + if (!Algorithms.isEmpty(country)) { + return country; + } else { + return ""; + } case FAVORITE: FavouritePoint fav = (FavouritePoint) searchResult.object; return fav.getCategory().length() == 0 ? @@ -275,7 +282,7 @@ public class QuickSearchListItem { return null; } case LOCATION: - return app.getIconsCache().getIcon(R.drawable.ic_action_coordinates_latitude, + return app.getIconsCache().getIcon(R.drawable.ic_action_world_globe, app.getSettings().isLightContent() ? R.color.osmand_orange : R.color.osmand_orange_dark); case FAVORITE: FavouritePoint fav = (FavouritePoint) searchResult.object;