blob: bea5e2c2de748516bae8472ea7008d621bcf562c [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (C) 2020 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 used to provide static configuration values
for the displays on a device.
It is parsed in com/android/server/display/DisplayDeviceConfig.java
-->
<xs:schema version="2.0"
elementFormDefault="qualified"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:include schemaLocation="autobrightness.xsd" />
<xs:element name="displayConfiguration">
<xs:complexType>
<xs:sequence>
<xs:element type="densityMapping" name="densityMapping" minOccurs="0" maxOccurs="1">
<xs:annotation name="nullable"/>
<xs:annotation name="final"/>
</xs:element>
<xs:element type="nitsMap" name="screenBrightnessMap">
<xs:annotation name="nonnull"/>
<xs:annotation name="final"/>
</xs:element>
<xs:element type="nonNegativeDecimal" name="screenBrightnessDefault">
<xs:annotation name="nonnull"/>
<xs:annotation name="final"/>
</xs:element>
<xs:element type="thermalThrottling" name="thermalThrottling">
<xs:annotation name="nonnull"/>
<xs:annotation name="final"/>
</xs:element>
<xs:element type="highBrightnessMode" name="highBrightnessMode" minOccurs="0"
maxOccurs="1"/>
<xs:element type="displayQuirks" name="quirks" minOccurs="0" maxOccurs="1" />
<xs:element type="autoBrightness" name="autoBrightness" minOccurs="0"
maxOccurs="1" />
<xs:element type="nonNegativeDecimal" name="screenBrightnessRampFastDecrease">
<xs:annotation name="final"/>
</xs:element>
<xs:element type="nonNegativeDecimal" name="screenBrightnessRampFastIncrease">
<xs:annotation name="final"/>
</xs:element>
<xs:element type="nonNegativeDecimal" name="screenBrightnessRampSlowDecrease">
<xs:annotation name="final"/>
</xs:element>
<xs:element type="nonNegativeDecimal" name="screenBrightnessRampSlowIncrease">
<xs:annotation name="final"/>
</xs:element>
<!-- Maximum time in milliseconds that a brightness increase animation
can take. -->
<xs:element type="xs:nonNegativeInteger" name="screenBrightnessRampIncreaseMaxMillis">
<xs:annotation name="final"/>
</xs:element>
<!-- Maximum time in milliseconds that a brightness decrease animation
can take. -->
<xs:element type="xs:nonNegativeInteger" name="screenBrightnessRampDecreaseMaxMillis">
<xs:annotation name="final"/>
</xs:element>
<xs:element type="sensorDetails" name="lightSensor">
<xs:annotation name="final"/>
</xs:element>
<xs:element type="sensorDetails" name="proxSensor">
<xs:annotation name="final"/>
</xs:element>
<!-- Length of the ambient light horizon used to calculate the long & short term
estimates of ambient light in milliseconds.-->
<xs:element type="xs:nonNegativeInteger" name="ambientLightHorizonLong">
<xs:annotation name="final"/>
</xs:element>
<xs:element type="xs:nonNegativeInteger" name="ambientLightHorizonShort">
<xs:annotation name="final"/>
</xs:element>
<!-- Set of thresholds that dictate the change needed for screen brightness
adaptations -->
<xs:element type="thresholds" name="displayBrightnessChangeThresholds">
<xs:annotation name="nonnull"/>
<xs:annotation name="final"/>
</xs:element>
<!-- Set of thresholds that dictate the change needed for ambient brightness
adaptations -->
<xs:element type="thresholds" name="ambientBrightnessChangeThresholds">
<xs:annotation name="nonnull"/>
<xs:annotation name="final"/>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<!-- Type definitions -->
<xs:complexType name="displayQuirks">
<xs:sequence>
<xs:element name="quirk" type="xs:string" minOccurs="0" maxOccurs="unbounded" />
</xs:sequence>
</xs:complexType>
<xs:complexType name="highBrightnessMode">
<xs:all>
<xs:element name="transitionPoint" type="nonNegativeDecimal" minOccurs="1"
maxOccurs="1">
<xs:annotation name="nonnull"/>
<xs:annotation name="final"/>
</xs:element>
<xs:element name="minimumLux" type="nonNegativeDecimal" minOccurs="1" maxOccurs="1">
<xs:annotation name="nonnull"/>
<xs:annotation name="final"/>
</xs:element>
<xs:element name="timing" type="hbmTiming" minOccurs="1" maxOccurs="1"/>
<xs:element type="refreshRateRange" name="refreshRate" minOccurs="0" maxOccurs="1">
<xs:annotation name="nullable"/>
<xs:annotation name="final"/>
</xs:element>
<!-- The highest (most severe) thermal status at which high-brightness-mode is allowed
to operate. -->
<xs:element name="thermalStatusLimit" type="thermalStatus" minOccurs="0" maxOccurs="1">
<xs:annotation name="nonnull"/>
<xs:annotation name="final"/>
</xs:element>
<xs:element name="allowInLowPowerMode" type="xs:boolean" minOccurs="0" maxOccurs="1">
<xs:annotation name="nonnull"/>
<xs:annotation name="final"/>
</xs:element>
<!-- The minimum HDR video size at which high-brightness-mode is allowed to operate.
Default is 0.5 if not specified-->
<xs:element name="minimumHdrPercentOfScreen" type="nonNegativeDecimal"
minOccurs="0" maxOccurs="1">
<xs:annotation name="nullable"/>
<xs:annotation name="final"/>
</xs:element>
<!-- This LUT specifies how to boost HDR brightness at given SDR brightness (nits). -->
<xs:element type="sdrHdrRatioMap" name="sdrHdrRatioMap" minOccurs="0" maxOccurs="1">
<xs:annotation name="nullable"/>
<xs:annotation name="final"/>
</xs:element>
</xs:all>
<xs:attribute name="enabled" type="xs:boolean" use="optional"/>
</xs:complexType>
<xs:complexType name="hbmTiming">
<xs:all>
<xs:element name="timeWindowSecs" type="xs:nonNegativeInteger" minOccurs="1"
maxOccurs="1">
<xs:annotation name="nonnull"/>
<xs:annotation name="final"/>
</xs:element>
<xs:element name="timeMaxSecs" type="xs:nonNegativeInteger" minOccurs="1" maxOccurs="1">
<xs:annotation name="nonnull"/>
<xs:annotation name="final"/>
</xs:element>
<xs:element name="timeMinSecs" type="xs:nonNegativeInteger" minOccurs="1" maxOccurs="1">
<xs:annotation name="nonnull"/>
<xs:annotation name="final"/>
</xs:element>
</xs:all>
</xs:complexType>
<!-- Maps to PowerManager.THERMAL_STATUS_* values. -->
<xs:simpleType name="thermalStatus">
<xs:restriction base="xs:string">
<xs:enumeration value="none"/>
<xs:enumeration value="light"/>
<xs:enumeration value="moderate"/>
<xs:enumeration value="severe"/>
<xs:enumeration value="critical"/>
<xs:enumeration value="emergency"/>
<xs:enumeration value="shutdown"/>
</xs:restriction>
</xs:simpleType>
<xs:complexType name="thermalThrottling">
<xs:complexType>
<xs:element type="brightnessThrottlingMap" name="brightnessThrottlingMap">
<xs:annotation name="nonnull"/>
<xs:annotation name="final"/>
</xs:element>
</xs:complexType>
</xs:complexType>
<xs:complexType name="brightnessThrottlingMap">
<xs:sequence>
<xs:element name="brightnessThrottlingPoint" type="brightnessThrottlingPoint" maxOccurs="unbounded" minOccurs="1">
<xs:annotation name="nonnull"/>
<xs:annotation name="final"/>
</xs:element>
</xs:sequence>
</xs:complexType>
<xs:complexType name="brightnessThrottlingPoint">
<xs:sequence>
<xs:element type="thermalStatus" name="thermalStatus">
<xs:annotation name="nonnull"/>
<xs:annotation name="final"/>
</xs:element>
<xs:element type="nonNegativeDecimal" name="brightness">
<xs:annotation name="nonnull"/>
<xs:annotation name="final"/>
</xs:element>
</xs:sequence>
</xs:complexType>
<xs:complexType name="nitsMap">
<xs:sequence>
<xs:element name="point" type="point" maxOccurs="unbounded" minOccurs="2">
<xs:annotation name="nonnull"/>
<xs:annotation name="final"/>
</xs:element>
</xs:sequence>
<!-- valid value of interpolation if specified: linear -->
<xs:attribute name="interpolation" type="xs:string" use="optional"/>
</xs:complexType>
<xs:complexType name="point">
<xs:sequence>
<xs:element type="nonNegativeDecimal" name="value">
<xs:annotation name="nonnull"/>
<xs:annotation name="final"/>
</xs:element>
<xs:element type="nonNegativeDecimal" name="nits">
<xs:annotation name="nonnull"/>
<xs:annotation name="final"/>
</xs:element>
</xs:sequence>
</xs:complexType>
<xs:complexType name="sdrHdrRatioMap">
<xs:sequence>
<xs:element name="point" type="sdrHdrRatioPoint" maxOccurs="unbounded" minOccurs="2">
<xs:annotation name="nonnull"/>
<xs:annotation name="final"/>
</xs:element>
</xs:sequence>
</xs:complexType>
<xs:complexType name="sdrHdrRatioPoint">
<xs:sequence>
<xs:element type="nonNegativeDecimal" name="sdrNits">
<xs:annotation name="nonnull"/>
<xs:annotation name="final"/>
</xs:element>
<xs:element type="nonNegativeDecimal" name="hdrRatio">
<xs:annotation name="nonnull"/>
<xs:annotation name="final"/>
</xs:element>
</xs:sequence>
</xs:complexType>
<xs:simpleType name="nonNegativeDecimal">
<xs:restriction base="xs:decimal">
<xs:minInclusive value="0.0"/>
</xs:restriction>
</xs:simpleType>
<xs:complexType name="sensorDetails">
<xs:sequence>
<xs:element type="xs:string" name="type" minOccurs="0" maxOccurs="1">
<xs:annotation name="nullable"/>
<xs:annotation name="final"/>
</xs:element>
<xs:element type="xs:string" name="name" minOccurs="0" maxOccurs="1">
<xs:annotation name="nullable"/>
<xs:annotation name="final"/>
</xs:element>
<xs:element type="refreshRateRange" name="refreshRate" minOccurs="0" maxOccurs="1">
<xs:annotation name="nullable"/>
<xs:annotation name="final"/>
</xs:element>
</xs:sequence>
</xs:complexType>
<xs:complexType name="refreshRateRange">
<xs:sequence>
<xs:element type="xs:nonNegativeInteger" name="minimum" minOccurs="1" maxOccurs="1">
<xs:annotation name="final"/>
</xs:element>
<xs:element type="xs:nonNegativeInteger" name="maximum" minOccurs="1" maxOccurs="1">
<xs:annotation name="final"/>
</xs:element>
</xs:sequence>
</xs:complexType>
<xs:complexType name="densityMapping">
<xs:sequence>
<xs:element name="density" type="density" maxOccurs="unbounded" minOccurs="1">
</xs:element>
</xs:sequence>
</xs:complexType>
<xs:complexType name="density">
<xs:sequence>
<xs:element type="xs:nonNegativeInteger" name="width">
<xs:annotation name="nonnull"/>
<xs:annotation name="final"/>
</xs:element>
<xs:element type="xs:nonNegativeInteger" name="height">
<xs:annotation name="nonnull"/>
<xs:annotation name="final"/>
</xs:element>
<xs:element type="xs:nonNegativeInteger" name="density">
<xs:annotation name="nonnull"/>
<xs:annotation name="final"/>
</xs:element>
</xs:sequence>
</xs:complexType>
<!-- Thresholds for brightness changes. -->
<xs:complexType name="thresholds">
<xs:sequence>
<!-- Brightening thresholds. -->
<xs:element name="brighteningThresholds" type="brightnessThresholds" minOccurs="0"
maxOccurs="1" >
<xs:annotation name="nonnull"/>
<xs:annotation name="final"/>
</xs:element>
<!-- Darkening thresholds. -->
<xs:element name="darkeningThresholds" type="brightnessThresholds" minOccurs="0"
maxOccurs="1" >
<xs:annotation name="nonnull"/>
<xs:annotation name="final"/>
</xs:element>
</xs:sequence>
</xs:complexType>
<!-- Brightening and darkening minimum change thresholds. -->
<xs:complexType name="brightnessThresholds">
<!-- Minimum brightness change needed. -->
<xs:element name="minimum" type="nonNegativeDecimal" minOccurs="0" maxOccurs="1" >
<xs:annotation name="nonnull"/>
<xs:annotation name="final"/>
</xs:element>
</xs:complexType>
</xs:schema>