Fix crash

This commit is contained in:
Alexey Kulish 2016-07-18 09:38:53 +03:00
parent 2183cf8b0b
commit 05485aae96
2 changed files with 3 additions and 2 deletions

View file

@ -9,6 +9,7 @@
3. All your modified/created strings are in the top of the file (to make easier find what\'s translated).
PLEASE: Have a look at http://code.google.com/p/osmand/wiki/UIConsistency, it may really improve your and our work :-) Thx - Hardy
-->
<string name="postcode">Postcode</string>
<string name="shared_string_from">from</string>
<string name="city_type_district">District</string>
<string name="city_type_neighbourhood">Neighbourhood</string>

View file

@ -7,7 +7,6 @@ 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.Street;
import net.osmand.osm.AbstractPoiType;
import net.osmand.osm.PoiCategory;
@ -65,9 +64,10 @@ public class SearchListItem {
public String getTypeName() {
switch (searchResult.objectType) {
case CITY:
case POSTCODE:
City city = (City) searchResult.object;
return getCityTypeStr(city.getType());
case POSTCODE:
return app.getString(R.string.postcode);
case VILLAGE:
city = (City) searchResult.object;
if (!Algorithms.isEmpty(searchResult.localeRelatedObjectName)) {