1<?xml version="1.0" encoding="utf-8"?> 2<!-- 3 ~ Copyright (C) 2021 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<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" 18 version="2.0" 19 elementFormDefault="qualified" 20 attributeFormDefault="unqualified" 21 targetNamespace="http://schemas.android.com/art/apex-cache-info/v1_0" 22 xmlns:t="http://schemas.android.com/art/apex-cache-info/v1_0" > 23 <!-- Data type holding information on the AOT artifact cache in 24 `/data/misc/apexdata/com.android.art/dalvik-cache` --> 25 <xs:element name="cacheInfo"> 26 <xs:complexType> 27 <!-- True if the cache info is generated in the Compilation OS. --> 28 <xs:attribute name="compilationOsMode" type="xs:boolean" /> 29 <xs:sequence> 30 <xs:element name="systemProperties" minOccurs="1" maxOccurs="1" type="t:keyValuePairList" /> 31 <xs:element name="artModuleInfo" minOccurs="1" maxOccurs="1" type="t:moduleInfo" /> 32 <xs:element name="moduleInfoList" minOccurs="1" maxOccurs="1" type="t:moduleInfoList" /> 33 <xs:element name="bootClasspath" minOccurs="1" maxOccurs="1" type="t:classpath" /> 34 <xs:element name="dex2oatBootClasspath" minOccurs="1" maxOccurs="1" type="t:classpath" /> 35 <xs:element name="systemServerComponents" minOccurs="1" maxOccurs="1" type="t:systemServerComponents" /> 36 </xs:sequence> 37 </xs:complexType> 38 </xs:element> 39 40 <!-- List of key-value pairs. --> 41 <xs:complexType name="keyValuePairList"> 42 <xs:sequence> 43 <xs:element name="item" type="t:keyValuePair" /> 44 </xs:sequence> 45 </xs:complexType> 46 47 <!-- A key-value pair. --> 48 <xs:complexType name="keyValuePair"> 49 <xs:attribute name="k" type="xs:string" use="required" /> 50 <xs:attribute name="v" type="xs:string" use="required" /> 51 </xs:complexType> 52 53 <!-- List of modules. --> 54 <xs:complexType name="moduleInfoList"> 55 <xs:sequence> 56 <xs:element name="moduleInfo" type="t:moduleInfo" /> 57 </xs:sequence> 58 </xs:complexType> 59 60 <!-- Data type representing the provenance of the AOT artifacts in the cache. --> 61 <xs:complexType name="moduleInfo"> 62 <!-- Module name for the active APEX from `/apex/apex-info-list.xml`. --> 63 <xs:attribute name="name" type="xs:string" use="required" /> 64 <!-- Module versionCode for the active APEX from `/apex/apex-info-list.xml`. --> 65 <xs:attribute name="versionCode" type="xs:long" use="required" /> 66 <!-- Module versionName for the active APEX from `/apex/apex-info-list.xml`. --> 67 <xs:attribute name="versionName" type="xs:string" use="required" /> 68 <!-- Module lastUpdateMillis for the active APEX from `/apex/apex-info-list.xml`. --> 69 <xs:attribute name="lastUpdateMillis" type="xs:long" use="required" /> 70 </xs:complexType> 71 72 <!-- Components of a classpath. --> 73 <xs:complexType name="classpath"> 74 <xs:sequence> 75 <xs:element name="component" type="t:component" /> 76 </xs:sequence> 77 </xs:complexType> 78 79 <xs:complexType name="component"> 80 <!-- File path of component. --> 81 <xs:attribute name="file" type="xs:string" use="required" /> 82 <!-- Size of component when cache information is generated. --> 83 <xs:attribute name="size" type="xs:unsignedLong" use="required" /> 84 <!-- DEX file checksums within the component. Multidex files have multiple checksums. --> 85 <xs:attribute name="checksums" type="xs:string" use="required" /> 86 </xs:complexType> 87 88 <xs:complexType name="systemServerComponents"> 89 <xs:sequence> 90 <xs:element name="component" type="t:systemServerComponent" /> 91 </xs:sequence> 92 </xs:complexType> 93 94 <xs:complexType name="systemServerComponent"> 95 <xs:complexContent> 96 <xs:extension base="component"> 97 <!-- True if the component is in SYSTEMSERVERCLASSPATH. Otherwise, the component is a 98 standalone one. --> 99 <xs:attribute name="isInClasspath" type="xs:boolean" use="required" /> 100 </xs:extension> 101 </xs:complexContent> 102 </xs:complexType> 103 104</xs:schema> 105