Fix crash
This commit is contained in:
parent
2183cf8b0b
commit
05485aae96
2 changed files with 3 additions and 2 deletions
|
@ -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>
|
||||
|
|
|
@ -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)) {
|
||||
|
|
Loading…
Reference in a new issue