Andreas Schildbach 2012-09-19 12:33:50 +02:00
parent 6ac291eb5f
commit 946414a760
2 changed files with 11 additions and 2 deletions

View file

@ -1889,7 +1889,8 @@ public abstract class AbstractEfaProvider extends AbstractNetworkProvider
XmlPullUtil.enter(pp, "itdDate");
if (XmlPullUtil.test(pp, "itdMessage"))
{
final String message = pp.nextText();
final String message = XmlPullUtil.nextText(pp, null, "itdMessage");
if ("invalid date".equals(message))
return new QueryConnectionsResult(header, QueryConnectionsResult.Status.INVALID_DATE);
else

View file

@ -301,7 +301,15 @@ public final class XmlPullUtil
throw new XmlPullParserException("name for element can not be null");
pp.require(XmlPullParser.START_TAG, namespace, name);
return pp.nextText();
final String text = pp.nextText();
// work around http://code.google.com/p/android/issues/detail?id=21425
if (pp.getEventType() != XmlPullParser.END_TAG)
pp.nextTag();
pp.require(XmlPullParser.END_TAG, namespace, name);
return text;
}
/**