From 64651134f6cf6a674f12f2043f87fce0063a6b5d Mon Sep 17 00:00:00 2001 From: Michal Olech Date: Wed, 26 Aug 2020 15:55:37 +0200 Subject: [PATCH] [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 --- services/core/Android.bp | 1 + services/core/xsd/Android.bp | 8 ++++ services/core/xsd/cec-config/cec-config.xsd | 27 +++++++++++++ .../core/xsd/cec-config/schema/current.txt | 40 +++++++++++++++++++ .../xsd/cec-config/schema/last_current.txt | 0 .../xsd/cec-config/schema/last_removed.txt | 0 .../core/xsd/cec-config/schema/removed.txt | 1 + 7 files changed, 77 insertions(+) create mode 100644 services/core/xsd/cec-config/cec-config.xsd create mode 100644 services/core/xsd/cec-config/schema/current.txt create mode 100644 services/core/xsd/cec-config/schema/last_current.txt create mode 100644 services/core/xsd/cec-config/schema/last_removed.txt create mode 100644 services/core/xsd/cec-config/schema/removed.txt diff --git a/services/core/Android.bp b/services/core/Android.bp index 1a7f0d1ce37e8..60aa7cb5dd15b 100644 --- a/services/core/Android.bp +++ b/services/core/Android.bp @@ -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", diff --git a/services/core/xsd/Android.bp b/services/core/xsd/Android.bp index b7d6424450f36..fb55e75b9ac47 100644 --- a/services/core/xsd/Android.bp +++ b/services/core/xsd/Android.bp @@ -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", +} diff --git a/services/core/xsd/cec-config/cec-config.xsd b/services/core/xsd/cec-config/cec-config.xsd new file mode 100644 index 0000000000000..0801c88c54ade --- /dev/null +++ b/services/core/xsd/cec-config/cec-config.xsd @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/services/core/xsd/cec-config/schema/current.txt b/services/core/xsd/cec-config/schema/current.txt new file mode 100644 index 0000000000000..34faf459d2512 --- /dev/null +++ b/services/core/xsd/cec-config/schema/current.txt @@ -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 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 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; + } + +} + diff --git a/services/core/xsd/cec-config/schema/last_current.txt b/services/core/xsd/cec-config/schema/last_current.txt new file mode 100644 index 0000000000000..e69de29bb2d1d diff --git a/services/core/xsd/cec-config/schema/last_removed.txt b/services/core/xsd/cec-config/schema/last_removed.txt new file mode 100644 index 0000000000000..e69de29bb2d1d diff --git a/services/core/xsd/cec-config/schema/removed.txt b/services/core/xsd/cec-config/schema/removed.txt new file mode 100644 index 0000000000000..d802177e249b3 --- /dev/null +++ b/services/core/xsd/cec-config/schema/removed.txt @@ -0,0 +1 @@ +// Signature format: 2.0