Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b7256439 authored by Anna Trostanetski's avatar Anna Trostanetski Committed by android-build-merger
Browse files

Merge "Add a platform compat config schema API." am: 64e01268 am: 4565dd5d am: 9f634082

am: 503b521a

Change-Id: Ic6c87430e5e65c0185787573f305de61d8ce42ff
parents 04c6bb2c 503b521a
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -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",
}
+51 −0
Original line number Diff line number Diff line
<?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>



+31 −0
Original line number Diff line number Diff line
// 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;
  }

}
+0 −0

Empty file added.

+0 −0

Empty file added.

Loading