EFA: Handle missing destination in <m> elements in mobile locations query.

This commit is contained in:
Andreas Schildbach 2016-11-10 17:56:30 +01:00
parent 77a69bc9c0
commit 3317396dbc

View file

@ -1741,8 +1741,8 @@ public abstract class AbstractEfaProvider extends AbstractNetworkProvider {
final String co = XmlPullUtil.valueTag(pp, "co");
final String productType = tyOrCo ? ty : co;
XmlPullUtil.optValueTag(pp, "prid", null);
final String destinationName = normalizeLocationName(XmlPullUtil.valueTag(pp, "des"));
destination = new Location(LocationType.ANY, null, null, destinationName);
final String destinationName = normalizeLocationName(XmlPullUtil.optValueTag(pp, "des", null));
destination = destinationName != null ? new Location(LocationType.ANY, null, null, destinationName) : null;
XmlPullUtil.optValueTag(pp, "dy", null);
final String de = XmlPullUtil.optValueTag(pp, "de", null);
final String productName = n != null ? n : de;