1<?xml version="1.0" encoding="UTF-8"?>
2<!--
3  ~ Copyright (C) 2019 The Android Open Source Project
4  ~
5  ~ Licensed under the Apache License, Version 2.0 (the "License");
6  ~ you may not use this file except in compliance with the License.
7  ~ You may obtain a copy of the License at
8  ~
9  ~      http://www.apache.org/licenses/LICENSE-2.0
10  ~
11  ~ Unless required by applicable law or agreed to in writing, software
12  ~ distributed under the License is distributed on an "AS IS" BASIS,
13  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  ~ See the License for the specific language governing permissions and
15  ~ limitations under the License.
16  -->
17
18<!-- This defines the format of the XML file generated by
19  ~ com.android.compat.annotation.ChangeIdProcessor annotation processor (from
20  ~ tools/platform-compat), and is parsed in com/android/server/compat/CompatConfig.java.
21-->
22<xs:schema version="2.0" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
23
24    <xs:complexType name="change">
25        <xs:simpleContent>
26            <xs:extension base="xs:string">
27                <xs:attribute type="xs:long" name="id" use="required"/>
28                <xs:attribute type="xs:string" name="name" use="required"/>
29                <xs:attribute type="xs:boolean" name="disabled"/>
30                <xs:attribute type="xs:boolean" name="loggingOnly"/>
31                <xs:attribute type="xs:int" name="enableAfterTargetSdk"/>
32                <xs:attribute type="xs:int" name="enableSinceTargetSdk"/>
33                <xs:attribute type="xs:string" name="description"/>
34                <xs:attribute type="xs:boolean" name="overridable"/>
35            </xs:extension>
36        </xs:simpleContent>
37    </xs:complexType>
38
39    <xs:element name="config">
40        <xs:complexType>
41            <xs:sequence>
42                <xs:element name="compat-change" type="change" maxOccurs="unbounded"
43                            minOccurs="0"/>
44            </xs:sequence>
45        </xs:complexType>
46        <xs:unique name="UniqueId">
47            <xs:selector xpath="compat-change" />
48            <xs:field xpath="@id" />
49        </xs:unique>
50    </xs:element>
51</xs:schema>
52