added TextUtils

This commit is contained in:
Chumva 2018-03-22 14:14:33 +02:00
parent 272a62ab09
commit 9662a320cb

View file

@ -1,6 +1,7 @@
package net.osmand.plus.mapcontextmenu.controllers;
import android.graphics.drawable.Drawable;
import android.text.TextUtils;
import net.osmand.data.Amenity;
import net.osmand.data.LatLon;
@ -142,7 +143,7 @@ public class AmenityMenuController extends MenuController {
Map<String, String> additionalInfo = amenity.getAdditionalInfo();
if (additionalInfo != null) {
String ref = additionalInfo.get("ref");
if (ref != null && !ref.isEmpty()) {
if (!TextUtils.isEmpty(ref)) {
return name + " (" + ref + ")";
}
}