diff options
| author | 2019-07-25 09:24:04 -0700 | |
|---|---|---|
| committer | 2019-07-25 09:24:04 -0700 | |
| commit | 503b521adf70af6d981561c801038ebb983a57ce (patch) | |
| tree | 9e89eddcb346a45296a5cf23db2cc0697fdfd3d9 | |
| parent | 3d9fb617ae437a18e960bd6a626d00bced99e051 (diff) | |
| parent | 9f634082012c0237410f38f0563144f5583d5e0c (diff) | |
Merge "Add a platform compat config schema API." am: 64e01268ce am: 4565dd5de3
am: 9f63408201
Change-Id: I2dd76b48d33567c457a6e8a8a06fe7897ef8b219
| -rw-r--r-- | services/core/xsd/Android.bp | 8 | ||||
| -rw-r--r-- | services/core/xsd/platform-compat-config.xsd | 51 | ||||
| -rw-r--r-- | services/core/xsd/platform-compat-schema/current.txt | 31 | ||||
| -rw-r--r-- | services/core/xsd/platform-compat-schema/last_current.txt | 0 | ||||
| -rw-r--r-- | services/core/xsd/platform-compat-schema/last_removed.txt | 0 | ||||
| -rw-r--r-- | services/core/xsd/platform-compat-schema/removed.txt | 1 |
6 files changed, 91 insertions, 0 deletions
diff --git a/services/core/xsd/Android.bp b/services/core/xsd/Android.bp index 98e4343e6e57..8b2cbbde2db8 100644 --- a/services/core/xsd/Android.bp +++ b/services/core/xsd/Android.bp @@ -4,3 +4,11 @@ xsd_config { api_dir: "schema", package_name: "com.android.server.pm.permission.configfile", } + + +xsd_config { + name: "platform-compat-config", + srcs: ["platform-compat-config.xsd"], + api_dir: "platform-compat-schema", + package_name: "com.android.server.compat.config", +} diff --git a/services/core/xsd/platform-compat-config.xsd b/services/core/xsd/platform-compat-config.xsd new file mode 100644 index 000000000000..ee39e507aff1 --- /dev/null +++ b/services/core/xsd/platform-compat-config.xsd @@ -0,0 +1,51 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + ~ Copyright (C) 2019 The Android Open Source Project + ~ + ~ Licensed under the Apache License, Version 2.0 (the "License"); + ~ you may not use this file except in compliance with the License. + ~ You may obtain a copy of the License at + ~ + ~ http://www.apache.org/licenses/LICENSE-2.0 + ~ + ~ Unless required by applicable law or agreed to in writing, software + ~ distributed under the License is distributed on an "AS IS" BASIS, + ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + ~ See the License for the specific language governing permissions and + ~ limitations under the License. + --> + +<!-- This defines the format of the XML file generated by + ~ com.android.compat.annotation.ChangeIdProcessor annotation processor (from + ~ tools/platform-compat), and is parsed in com/android/server/compat/CompatConfig.java. +--> +<xs:schema version="2.0" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema"> + + <xs:complexType name="change"> + <xs:simpleContent> + <xs:extension base="xs:string"> + <xs:attribute type="xs:long" name="id" use="required"/> + <xs:attribute type="xs:string" name="name" use="required"/> + <xs:attribute type="xs:boolean" name="disabled"/> + <xs:attribute type="xs:int" name="enableAfterTargetSdk"/> + </xs:extension> + </xs:simpleContent> + </xs:complexType> + + <xs:element name="config"> + <xs:complexType> + <xs:sequence> + <xs:element name="compat-change" type="change" maxOccurs="unbounded" + minOccurs="0"/> + </xs:sequence> + </xs:complexType> + <xs:unique name="UniqueId"> + <xs:selector xpath="compat-change" /> + <xs:field xpath="@id" /> + </xs:unique> + </xs:element> +</xs:schema> + + + + diff --git a/services/core/xsd/platform-compat-schema/current.txt b/services/core/xsd/platform-compat-schema/current.txt new file mode 100644 index 000000000000..84567851da2c --- /dev/null +++ b/services/core/xsd/platform-compat-schema/current.txt @@ -0,0 +1,31 @@ +// Signature format: 2.0 +package com.android.server.compat.config { + + public class Change { + ctor public Change(); + method public boolean getDisabled(); + method public int getEnableAfterTargetSdk(); + method public long getId(); + method public String getName(); + method public String getValue(); + method public void setDisabled(boolean); + method public void setEnableAfterTargetSdk(int); + method public void setId(long); + method public void setName(String); + method public void setValue(String); + } + + public class Config { + ctor public Config(); + method public java.util.List<com.android.server.compat.config.Change> getCompatChange(); + } + + public class XmlParser { + ctor public XmlParser(); + method public static com.android.server.compat.config.Config 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/platform-compat-schema/last_current.txt b/services/core/xsd/platform-compat-schema/last_current.txt new file mode 100644 index 000000000000..e69de29bb2d1 --- /dev/null +++ b/services/core/xsd/platform-compat-schema/last_current.txt diff --git a/services/core/xsd/platform-compat-schema/last_removed.txt b/services/core/xsd/platform-compat-schema/last_removed.txt new file mode 100644 index 000000000000..e69de29bb2d1 --- /dev/null +++ b/services/core/xsd/platform-compat-schema/last_removed.txt diff --git a/services/core/xsd/platform-compat-schema/removed.txt b/services/core/xsd/platform-compat-schema/removed.txt new file mode 100644 index 000000000000..d802177e249b --- /dev/null +++ b/services/core/xsd/platform-compat-schema/removed.txt @@ -0,0 +1 @@ +// Signature format: 2.0 |