Fix compatibility issues in XmlPullParserFactory.
- We should set features on a parser only if the feature
value is true. I.e, we guarantee that we'll never call
XmlPullParser.setFeature(..., false).
- In change 0363556bad8930a, we didn't consider the fact
that apps could extend XmlPullParserFactory and modify
protected fields to change the parser / serializer that's
instantiated. I've reinstated this feature, despite the
fact that it's a particularly pointless feature on a
more-or-less pointless public API. Apps can and should
instantiate their own parser instances directly instead
of going through this factory.
bug: 12956724
Change-Id: I793eba335b5385eb641e023b3613bba4515a85bf
2 files changed