detect more invalid dates for efa based providers

This commit is contained in:
Andreas Schildbach 2013-04-14 11:01:48 +02:00
parent 95cce1eb4f
commit 82560423c8

View file

@ -1731,8 +1731,11 @@ public abstract class AbstractEfaProvider extends AbstractNetworkProvider
final int year = Integer.parseInt(pp.getAttributeValue(null, "year"));
final int month = Integer.parseInt(pp.getAttributeValue(null, "month")) - 1;
final int day = Integer.parseInt(pp.getAttributeValue(null, "day"));
final int weekday = Integer.parseInt(pp.getAttributeValue(null, "weekday"));
XmlPullUtil.next(pp);
if (weekday < 0)
return false;
if (year == 0)
return false;
if (year < 1900 || year > 2100)