AbstractEfaProvider: parse 'ns' in queryTripsMobile()

This commit is contained in:
Andreas Schildbach 2025-04-08 17:54:31 +02:00
parent 31066c46ee
commit 66f3603c9f

View file

@ -2854,8 +2854,15 @@ public abstract class AbstractEfaProvider extends AbstractNetworkProvider {
XmlPullUtil.optSkip(pp, "interchange");
XmlPullUtil.requireSkip(pp, "ns");
// TODO messages
StringBuilder message = new StringBuilder();
XmlPullUtil.enter(pp, "ns");
while (XmlPullUtil.optEnter(pp, "no")) {
String text = XmlPullUtil.valueTag(pp, "tx");
if (text != null)
message.append(text).append('\n');
XmlPullUtil.skipExit(pp, "no");
}
XmlPullUtil.skipExit(pp, "ns");
XmlPullUtil.skipExit(pp, "l");
@ -2870,7 +2877,7 @@ public abstract class AbstractEfaProvider extends AbstractNetworkProvider {
// ignore
} else {
legs.add(new Trip.Public(lineDestination.line, lineDestination.destination, departure, arrival,
intermediateStops, path, null));
intermediateStops, path, Strings.emptyToNull(message.toString())));
}
}