[CEC Configuration] Add XML schema parser API
The schema will be used for system and OEM level configuration of CEC. Bug: 166430550 Test: Ran 'make update-api' and inspected the current.txt Change-Id: I2359a4957e2d8f99818b8c53c3914794a0b4fa85
This commit is contained in:
@@ -73,6 +73,7 @@ java_library_static {
|
||||
":vold_aidl",
|
||||
":platform-compat-config",
|
||||
":display-device-config",
|
||||
":cec-config",
|
||||
"java/com/android/server/EventLogTags.logtags",
|
||||
"java/com/android/server/am/EventLogTags.logtags",
|
||||
"java/com/android/server/wm/EventLogTags.logtags",
|
||||
|
||||
@@ -20,3 +20,11 @@ xsd_config {
|
||||
api_dir: "display-device-config/schema",
|
||||
package_name: "com.android.server.display.config",
|
||||
}
|
||||
|
||||
|
||||
xsd_config {
|
||||
name: "cec-config",
|
||||
srcs: ["cec-config/cec-config.xsd"],
|
||||
api_dir: "cec-config/schema",
|
||||
package_name: "com.android.server.hdmi.cec.config",
|
||||
}
|
||||
|
||||
27
services/core/xsd/cec-config/cec-config.xsd
Normal file
27
services/core/xsd/cec-config/cec-config.xsd
Normal file
@@ -0,0 +1,27 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<xs:schema version="2.0"
|
||||
elementFormDefault="qualified"
|
||||
attributeFormDefault="unqualified"
|
||||
xmlns:xs="http://www.w3.org/2001/XMLSchema">
|
||||
<xs:element name="cec-settings">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="setting" type="setting" minOccurs="0" maxOccurs="unbounded"/>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:complexType name="setting">
|
||||
<xs:attribute name="name" type="xs:string"/>
|
||||
<xs:attribute name="user-configurable" type="xs:boolean"/>
|
||||
<xs:element name="allowed-values" type="value-list" minOccurs="1" maxOccurs="1"/>
|
||||
<xs:element name="default-value" type="value" minOccurs="1" maxOccurs="1"/>
|
||||
</xs:complexType>
|
||||
<xs:complexType name="value-list">
|
||||
<xs:sequence>
|
||||
<xs:element name="value" type="value" minOccurs="1" maxOccurs="unbounded"/>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
<xs:complexType name="value">
|
||||
<xs:attribute name="string-value" type="xs:string"/>
|
||||
</xs:complexType>
|
||||
</xs:schema>
|
||||
40
services/core/xsd/cec-config/schema/current.txt
Normal file
40
services/core/xsd/cec-config/schema/current.txt
Normal file
@@ -0,0 +1,40 @@
|
||||
// Signature format: 2.0
|
||||
package com.android.server.hdmi.cec.config {
|
||||
|
||||
public class CecSettings {
|
||||
ctor public CecSettings();
|
||||
method public java.util.List<com.android.server.hdmi.cec.config.Setting> getSetting();
|
||||
}
|
||||
|
||||
public class Setting {
|
||||
ctor public Setting();
|
||||
method public com.android.server.hdmi.cec.config.ValueList getAllowedValues();
|
||||
method public com.android.server.hdmi.cec.config.Value getDefaultValue();
|
||||
method public String getName();
|
||||
method public boolean getUserConfigurable();
|
||||
method public void setAllowedValues(com.android.server.hdmi.cec.config.ValueList);
|
||||
method public void setDefaultValue(com.android.server.hdmi.cec.config.Value);
|
||||
method public void setName(String);
|
||||
method public void setUserConfigurable(boolean);
|
||||
}
|
||||
|
||||
public class Value {
|
||||
ctor public Value();
|
||||
method public String getStringValue();
|
||||
method public void setStringValue(String);
|
||||
}
|
||||
|
||||
public class ValueList {
|
||||
ctor public ValueList();
|
||||
method public java.util.List<com.android.server.hdmi.cec.config.Value> getValue();
|
||||
}
|
||||
|
||||
public class XmlParser {
|
||||
ctor public XmlParser();
|
||||
method public static com.android.server.hdmi.cec.config.CecSettings read(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;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
1
services/core/xsd/cec-config/schema/removed.txt
Normal file
1
services/core/xsd/cec-config/schema/removed.txt
Normal file
@@ -0,0 +1 @@
|
||||
// Signature format: 2.0
|
||||
Reference in New Issue
Block a user