Add new tags

The ImageDecoding tag is added to media_profiles.xsd.
The Include, Included and Alias tags are added to media_codecs.xsd. And
the sequence type is changed to choice with min=0 and max=unbounded to
support any order and any number elements.

Bug:128380795
Test: m -j

Change-Id: I9817c4d4b895fcf3a70e074bf27a384fecc43aad
diff --git a/media/libmedia/xsd/api/current.txt b/media/libmedia/xsd/api/current.txt
index 0924dd9..05e8a49 100644
--- a/media/libmedia/xsd/api/current.txt
+++ b/media/libmedia/xsd/api/current.txt
@@ -45,10 +45,17 @@
     ctor public CamcorderProfiles();
     method public int getCameraId();
     method public java.util.List<media.profiles.EncoderProfile> getEncoderProfile();
+    method public java.util.List<media.profiles.CamcorderProfiles.ImageDecoding> getImageDecoding();
     method public java.util.List<media.profiles.CamcorderProfiles.ImageEncoding> getImageEncoding();
     method public void setCameraId(int);
   }
 
+  public static class CamcorderProfiles.ImageDecoding {
+    ctor public CamcorderProfiles.ImageDecoding();
+    method public int getMemCap();
+    method public void setMemCap(int);
+  }
+
   public static class CamcorderProfiles.ImageEncoding {
     ctor public CamcorderProfiles.ImageEncoding();
     method public int getQuality();
diff --git a/media/libmedia/xsd/media_profiles.xsd b/media/libmedia/xsd/media_profiles.xsd
index a9687b0..a02252a 100644
--- a/media/libmedia/xsd/media_profiles.xsd
+++ b/media/libmedia/xsd/media_profiles.xsd
@@ -42,6 +42,11 @@
                     <xs:attribute name="quality" type="xs:int"/>
                 </xs:complexType>
             </xs:element>
+            <xs:element name="ImageDecoding" minOccurs="0" maxOccurs="unbounded">
+                <xs:complexType>
+                    <xs:attribute name="memCap" type="xs:int"/>
+                </xs:complexType>
+            </xs:element>
         </xs:sequence>
         <xs:attribute name="cameraId" type="xs:int"/>
     </xs:complexType>
diff --git a/media/libstagefright/xmlparser/api/current.txt b/media/libstagefright/xmlparser/api/current.txt
index f5245c1..5443f2c 100644
--- a/media/libstagefright/xmlparser/api/current.txt
+++ b/media/libstagefright/xmlparser/api/current.txt
@@ -1,6 +1,12 @@
 // Signature format: 2.0
 package media.codecs {
 
+  public class Alias {
+    ctor public Alias();
+    method public String getName();
+    method public void setName(String);
+  }
+
   public class Decoders {
     ctor public Decoders();
     method public java.util.List<media.codecs.MediaCodec> getMediaCodec();
@@ -23,6 +29,23 @@
     method public void setValue(String);
   }
 
+  public class Include {
+    ctor public Include();
+    method public String getHref();
+    method public void setHref(String);
+  }
+
+  public class Included {
+    ctor public Included();
+    method public media.codecs.Decoders getDecoders_optional();
+    method public media.codecs.Encoders getEncoders_optional();
+    method public java.util.List<media.codecs.Include> getInclude_optional();
+    method public media.codecs.Settings getSettings_optional();
+    method public void setDecoders_optional(media.codecs.Decoders);
+    method public void setEncoders_optional(media.codecs.Encoders);
+    method public void setSettings_optional(media.codecs.Settings);
+  }
+
   public class Limit {
     ctor public Limit();
     method public String getIn();
@@ -47,12 +70,13 @@
 
   public class MediaCodec {
     ctor public MediaCodec();
-    method public java.util.List<media.codecs.Feature> getFeature();
-    method public java.util.List<media.codecs.Limit> getLimit();
+    method public java.util.List<media.codecs.Alias> getAlias_optional();
+    method public java.util.List<media.codecs.Feature> getFeature_optional();
+    method public java.util.List<media.codecs.Limit> getLimit_optional();
     method public String getName();
-    method public java.util.List<media.codecs.Quirk> getQuirk();
-    method public java.util.List<media.codecs.Type> getType();
+    method public java.util.List<media.codecs.Quirk> getQuirk_optional();
     method public String getType();
+    method public java.util.List<media.codecs.Type> getType_optional();
     method public String getUpdate();
     method public void setName(String);
     method public void setType(String);
@@ -61,9 +85,13 @@
 
   public class MediaCodecs {
     ctor public MediaCodecs();
-    method public java.util.List<media.codecs.Decoders> getDecoders();
-    method public java.util.List<media.codecs.Encoders> getEncoders();
-    method public java.util.List<media.codecs.Settings> getSettings();
+    method public media.codecs.Decoders getDecoders_optional();
+    method public media.codecs.Encoders getEncoders_optional();
+    method public java.util.List<media.codecs.Include> getInclude_optional();
+    method public media.codecs.Settings getSettings_optional();
+    method public void setDecoders_optional(media.codecs.Decoders);
+    method public void setEncoders_optional(media.codecs.Encoders);
+    method public void setSettings_optional(media.codecs.Settings);
   }
 
   public class Quirk {
@@ -89,6 +117,7 @@
 
   public class Type {
     ctor public Type();
+    method public java.util.List<media.codecs.Alias> getAlias();
     method public java.util.List<media.codecs.Feature> getFeature();
     method public java.util.List<media.codecs.Limit> getLimit();
     method public String getName();
@@ -99,7 +128,8 @@
 
   public class XmlParser {
     ctor public XmlParser();
-    method public static media.codecs.MediaCodecs read(java.io.InputStream) throws javax.xml.datatype.DatatypeConfigurationException, java.io.IOException, org.xmlpull.v1.XmlPullParserException;
+    method public static media.codecs.Included readIncluded(java.io.InputStream) throws javax.xml.datatype.DatatypeConfigurationException, java.io.IOException, org.xmlpull.v1.XmlPullParserException;
+    method public static media.codecs.MediaCodecs readMediaCodecs(java.io.InputStream) throws javax.xml.datatype.DatatypeConfigurationException, java.io.IOException, org.xmlpull.v1.XmlPullParserException;
     method public static String readText(org.xmlpull.v1.XmlPullParser) throws java.io.IOException, org.xmlpull.v1.XmlPullParserException;
     method public static void skip(org.xmlpull.v1.XmlPullParser) throws java.io.IOException, org.xmlpull.v1.XmlPullParserException;
   }
diff --git a/media/libstagefright/xmlparser/media_codecs.xsd b/media/libstagefright/xmlparser/media_codecs.xsd
index 4faba87..77193a2 100644
--- a/media/libstagefright/xmlparser/media_codecs.xsd
+++ b/media/libstagefright/xmlparser/media_codecs.xsd
@@ -20,11 +20,22 @@
            xmlns:xs="http://www.w3.org/2001/XMLSchema">
     <xs:element name="MediaCodecs">
         <xs:complexType>
-            <xs:sequence>
-                <xs:element name="Decoders" type="Decoders" maxOccurs="unbounded"/>
-                <xs:element name="Encoders" type="Encoders" maxOccurs="unbounded"/>
-                <xs:element name="Settings" type="Settings" maxOccurs="unbounded"/>
-            </xs:sequence>
+            <xs:choice minOccurs="0" maxOccurs="unbounded">
+                <xs:element name="Include" type="Include" maxOccurs="unbounded"/>
+                <xs:element name="Settings" type="Settings"/>
+                <xs:element name="Decoders" type="Decoders"/>
+                <xs:element name="Encoders" type="Encoders"/>
+            </xs:choice>
+        </xs:complexType>
+    </xs:element>
+    <xs:element name="Included">
+        <xs:complexType>
+            <xs:choice minOccurs="0" maxOccurs="unbounded">
+                <xs:element name="Include" type="Include" maxOccurs="unbounded"/>
+                <xs:element name="Settings" type="Settings"/>
+                <xs:element name="Decoders" type="Decoders"/>
+                <xs:element name="Encoders" type="Encoders"/>
+            </xs:choice>
         </xs:complexType>
     </xs:element>
     <xs:complexType name="Decoders">
@@ -43,12 +54,13 @@
         </xs:sequence>
     </xs:complexType>
     <xs:complexType name="MediaCodec">
-        <xs:sequence>
-            <xs:element name="Quirk" type="Quirk" maxOccurs="unbounded"/>
-            <xs:element name="Type" type="Type" maxOccurs="unbounded"/>
-            <xs:element name="Limit" type="Limit" maxOccurs="unbounded"/>
-            <xs:element name="Feature" type="Feature" maxOccurs="unbounded"/>
-        </xs:sequence>
+        <xs:choice minOccurs="0" maxOccurs="unbounded">
+            <xs:element name="Quirk" type="Quirk" minOccurs="0" maxOccurs="unbounded"/>
+            <xs:element name="Type" type="Type" minOccurs="0" maxOccurs="unbounded"/>
+            <xs:element name="Alias" type="Alias" minOccurs="0" maxOccurs="unbounded"/>
+            <xs:element name="Limit" type="Limit" minOccurs="0" maxOccurs="unbounded"/>
+            <xs:element name="Feature" type="Feature" minOccurs="0" maxOccurs="unbounded"/>
+        </xs:choice>
         <xs:attribute name="name" type="xs:string"/>
         <xs:attribute name="type" type="xs:string"/>
         <xs:attribute name="update" type="xs:string"/>
@@ -58,12 +70,16 @@
     </xs:complexType>
     <xs:complexType name="Type">
         <xs:sequence>
-            <xs:element name="Limit" type="Limit" maxOccurs="unbounded"/>
-            <xs:element name="Feature" type="Feature" maxOccurs="unbounded"/>
+            <xs:element name="Alias" type="Alias" minOccurs="0" maxOccurs="unbounded"/>
+            <xs:element name="Limit" type="Limit" minOccurs="0" maxOccurs="unbounded"/>
+            <xs:element name="Feature" type="Feature" minOccurs="0" maxOccurs="unbounded"/>
         </xs:sequence>
         <xs:attribute name="name" type="xs:string"/>
         <xs:attribute name="update" type="xs:string"/>
     </xs:complexType>
+    <xs:complexType name="Alias">
+        <xs:attribute name="name" type="xs:string"/>
+    </xs:complexType>
     <xs:complexType name="Limit">
         <xs:attribute name="name" type="xs:string"/>
         <xs:attribute name="default" type="xs:string"/>
@@ -86,4 +102,7 @@
         <xs:attribute name="value" type="xs:string"/>
         <xs:attribute name="update" type="xs:string"/>
     </xs:complexType>
+    <xs:complexType name="Include">
+        <xs:attribute name="href" type="xs:string"/>
+    </xs:complexType>
 </xs:schema>