Don't write IntentFilter autoVerify field to xml if false.

Bug: 21205789
Change-Id: I650265eeec99d470ae2f089d8ae3ef3c866c0096
This commit is contained in:
Wale Ogunwale
2015-06-19 08:59:52 -07:00
parent 43cf8d1ed1
commit 15b9fd268a

View File

@@ -1480,7 +1480,11 @@ public class IntentFilter implements Parcelable {
* Write the contents of the IntentFilter as an XML stream.
*/
public void writeToXml(XmlSerializer serializer) throws IOException {
serializer.attribute(null, AUTO_VERIFY_STR, Boolean.toString(getAutoVerify()));
if (getAutoVerify()) {
serializer.attribute(null, AUTO_VERIFY_STR, Boolean.toString(true));
}
int N = countActions();
for (int i=0; i<N; i++) {
serializer.startTag(null, ACTION_STR);