1<?xml version="1.0" encoding="UTF-8"?> 2<!-- 3 Copyright (C) 2020 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<!-- 19 This defines the format of the XML file used to provide static configuration values 20 for the displays on a device. 21 It is parsed in com/android/server/display/DisplayDeviceConfig.java 22--> 23<xs:schema version="2.0" 24 elementFormDefault="qualified" 25 xmlns:xs="http://www.w3.org/2001/XMLSchema"> 26 <xs:element name="displayConfiguration"> 27 <xs:complexType> 28 <xs:sequence> 29 <xs:element type ="xs:string" name="name"> 30 <xs:annotation name="nullable"/> 31 <xs:annotation name="final"/> 32 </xs:element> 33 <xs:element type="densityMapping" name="densityMapping" minOccurs="0" maxOccurs="1"> 34 <xs:annotation name="nullable"/> 35 <xs:annotation name="final"/> 36 </xs:element> 37 <xs:element type="nitsMap" name="screenBrightnessMap"> 38 <xs:annotation name="nonnull"/> 39 <xs:annotation name="final"/> 40 </xs:element> 41 <xs:element type="nonNegativeDecimal" name="screenBrightnessDefault"> 42 <xs:annotation name="nonnull"/> 43 <xs:annotation name="final"/> 44 </xs:element> 45 <xs:element type="thermalThrottling" name="thermalThrottling" minOccurs="0" maxOccurs="1"> 46 <xs:annotation name="nonnull"/> 47 <xs:annotation name="final"/> 48 </xs:element> 49 <xs:element type="powerThrottlingConfig" name="powerThrottlingConfig" minOccurs="0" 50 maxOccurs="1"/> 51 <xs:element type="luxThrottling" name="luxThrottling" minOccurs="0" 52 maxOccurs="1"/> 53 <xs:element type="highBrightnessMode" name="highBrightnessMode" minOccurs="0" 54 maxOccurs="1"/> 55 56 <xs:element name="hdrBrightnessConfig" type="hdrBrightnessConfig" 57 minOccurs="0" maxOccurs="1"> 58 <xs:annotation name="nullable"/> 59 <xs:annotation name="final"/> 60 </xs:element> 61 62 <xs:element type="displayQuirks" name="quirks" minOccurs="0" maxOccurs="1"/> 63 <xs:element type="autoBrightness" name="autoBrightness" minOccurs="0" 64 maxOccurs="1"/> 65 <xs:element type="refreshRateConfigs" name="refreshRate" minOccurs="0" 66 maxOccurs="1"/> 67 <xs:element type="nonNegativeDecimal" name="screenBrightnessRampFastDecrease"> 68 <xs:annotation name="final"/> 69 </xs:element> 70 <xs:element type="nonNegativeDecimal" name="screenBrightnessRampFastIncrease"> 71 <xs:annotation name="final"/> 72 </xs:element> 73 <xs:element type="nonNegativeDecimal" name="screenBrightnessRampSlowDecrease"> 74 <xs:annotation name="final"/> 75 </xs:element> 76 <xs:element type="nonNegativeDecimal" name="screenBrightnessRampSlowIncrease"> 77 <xs:annotation name="final"/> 78 </xs:element> 79 <!-- Ramp speed used to decrease the screen brightness when in idle mode. 80 In framework brightness units per second. Must exist with 81 screenBrightnessRampSlowIncreaseIdle--> 82 <xs:element type="nonNegativeDecimal" name="screenBrightnessRampSlowDecreaseIdle"> 83 <xs:annotation name="final"/> 84 </xs:element> 85 <!-- Ramp speed used to decrease the screen brightness when in idle mode. 86 In framework brightness units per second. Must exist with 87 screenBrightnessRampSlowDecreaseIdle--> 88 <xs:element type="nonNegativeDecimal" name="screenBrightnessRampSlowIncreaseIdle"> 89 <xs:annotation name="final"/> 90 </xs:element> 91 <!-- Maximum time in milliseconds that a brightness increase animation 92 can take. --> 93 <xs:element type="xs:nonNegativeInteger" name="screenBrightnessRampIncreaseMaxMillis"> 94 <xs:annotation name="final"/> 95 </xs:element> 96 <!-- Maximum time in milliseconds that a brightness decrease animation 97 can take. --> 98 <xs:element type="xs:nonNegativeInteger" name="screenBrightnessRampDecreaseMaxMillis"> 99 <xs:annotation name="final"/> 100 </xs:element> 101 <!-- Maximum time in milliseconds that a brightness increase animation 102 can take in idle mode. --> 103 <xs:element type="xs:nonNegativeInteger" name="screenBrightnessRampIncreaseMaxIdleMillis"> 104 <xs:annotation name="final"/> 105 </xs:element> 106 <!-- Maximum time in milliseconds that a brightness decrease animation 107 can take in idle mode. --> 108 <xs:element type="xs:nonNegativeInteger" name="screenBrightnessRampDecreaseMaxIdleMillis"> 109 <xs:annotation name="final"/> 110 </xs:element> 111 <xs:element type="sensorDetails" name="lightSensor"> 112 <xs:annotation name="final"/> 113 </xs:element> 114 <xs:element type="sensorDetails" name="screenOffBrightnessSensor"> 115 <xs:annotation name="final"/> 116 </xs:element> 117 <xs:element type="sensorDetails" name="proxSensor" maxOccurs="2"> 118 <xs:annotation name="final"/> 119 </xs:element> 120 <xs:element type="sensorDetails" name="tempSensor"> 121 <xs:annotation name="final"/> 122 </xs:element> 123 124 <!-- Length of the ambient light horizon used to calculate the long & short term 125 estimates of ambient light in milliseconds.--> 126 <xs:element type="xs:nonNegativeInteger" name="ambientLightHorizonLong"> 127 <xs:annotation name="final"/> 128 </xs:element> 129 <xs:element type="xs:nonNegativeInteger" name="ambientLightHorizonShort"> 130 <xs:annotation name="final"/> 131 </xs:element> 132 133 <!-- Set of thresholds that dictate the change needed for screen brightness 134 adaptations --> 135 <xs:element type="thresholds" name="displayBrightnessChangeThresholds"> 136 <xs:annotation name="nonnull"/> 137 <xs:annotation name="final"/> 138 </xs:element> 139 <!-- Set of thresholds that dictate the change needed for ambient brightness 140 adaptations --> 141 <xs:element type="thresholds" name="ambientBrightnessChangeThresholds"> 142 <xs:annotation name="nonnull"/> 143 <xs:annotation name="final"/> 144 </xs:element> 145 <!-- Set of thresholds that dictate the change needed for screen brightness 146 adaptations while in idle mode --> 147 <xs:element type="thresholds" name="displayBrightnessChangeThresholdsIdle" minOccurs="0" maxOccurs="1"> 148 <xs:annotation name="final"/> 149 </xs:element> 150 <!-- Set of thresholds that dictate the change needed for ambient brightness 151 adaptations while in idle mode --> 152 <xs:element type="thresholds" name="ambientBrightnessChangeThresholdsIdle" minOccurs="0" maxOccurs="1"> 153 <xs:annotation name="final"/> 154 </xs:element> 155 <!-- Table that translates sensor values from the screenOffBrightnessSensor 156 to lux values; -1 means the lux reading is not available. --> 157 <xs:element type="integer-array" name="screenOffBrightnessSensorValueToLux"> 158 <xs:annotation name="final"/> 159 </xs:element> 160 <!-- The version of the Universal Stylus Initiative 161 (USI, https://universalstylus.org/) protocol supported by the display, if any. --> 162 <xs:element type="usiVersion" name="usiVersion"> 163 <xs:annotation name="final"/> 164 </xs:element> 165 <xs:element type="evenDimmerMode" name="evenDimmer"> 166 <xs:attribute name="enabled" type="xs:boolean" use="optional"/> 167 <xs:annotation name="final"/> 168 </xs:element> 169 <!-- Maximum screen brightness setting when screen brightness capped in 170 Wear Bedtime mode. This must be a non-negative decimal within the range defined by 171 the first and the last brightness value in screenBrightnessMap. --> 172 <xs:element type="nonNegativeDecimal" name="screenBrightnessCapForWearBedtimeMode"> 173 <xs:annotation name="final"/> 174 </xs:element> 175 <!-- Timeout after which we reduce the refresh rate if the screen has been idle, in order to save power. --> 176 <xs:element type="idleScreenRefreshRateTimeout" name="idleScreenRefreshRateTimeout" minOccurs="0"> 177 <xs:annotation name="final"/> 178 </xs:element> 179 <xs:element name="supportsVrr" type="xs:boolean" minOccurs="0"> 180 <xs:annotation name="final"/> 181 </xs:element> 182 <!-- Table that translates doze brightness sensor values to brightness values in 183 the float scale [0, 1]; -1 means the current brightness should be kept. 184 The following formula should be used for conversion between nits and the float 185 scale: float = (nits - minNits) / (maxNits - minNits). minNits and maxNits are 186 defined in screenBrightnessMap. --> 187 <xs:element type="float-array" name="dozeBrightnessSensorValueToBrightness"> 188 <xs:annotation name="final"/> 189 </xs:element> 190 <!-- The default screen brightness in the scale [0, 1] to use while the device is 191 dozing. --> 192 <xs:element type="nonNegativeDecimal" name="defaultDozeBrightness"> 193 <xs:annotation name="final"/> 194 </xs:element> 195 </xs:sequence> 196 </xs:complexType> 197 </xs:element> 198 199 <!-- Type definitions --> 200 <xs:complexType name="displayQuirks"> 201 <xs:sequence> 202 <xs:element name="quirk" type="xs:string" minOccurs="0" maxOccurs="unbounded" /> 203 </xs:sequence> 204 </xs:complexType> 205 206 <xs:complexType name="luxThrottling"> 207 <xs:sequence> 208 <xs:element name="brightnessLimitMap" type="brightnessLimitMap" 209 maxOccurs="unbounded"> 210 <xs:annotation name="nonnull"/> 211 <xs:annotation name="final"/> 212 </xs:element> 213 </xs:sequence> 214 </xs:complexType> 215 216 <xs:complexType name="brightnessLimitMap"> 217 <xs:sequence> 218 <xs:element name="type" type="PredefinedBrightnessLimitNames"> 219 <xs:annotation name="nonnull"/> 220 <xs:annotation name="final"/> 221 </xs:element> 222 <!-- lux level from light sensor to screen brightness recommended max value map. 223 Screen brightness recommended max value is to highBrightnessMode.transitionPoint and must be below that --> 224 <xs:element name="map" type="nonNegativeFloatToFloatMap"> 225 <xs:annotation name="nonnull"/> 226 <xs:annotation name="final"/> 227 </xs:element> 228 </xs:sequence> 229 </xs:complexType> 230 231 <!-- Predefined type names as defined by DisplayDeviceConfig.BrightnessLimitMapType --> 232 <xs:simpleType name="PredefinedBrightnessLimitNames"> 233 <xs:restriction base="xs:string"> 234 <xs:enumeration value="default"/> 235 <xs:enumeration value="adaptive"/> 236 </xs:restriction> 237 </xs:simpleType> 238 239 <xs:complexType name="evenDimmerMode"> 240 <xs:sequence> 241 <xs:element name="transitionPoint" type="nonNegativeDecimal" minOccurs="1" 242 maxOccurs="1"> 243 </xs:element> 244 <!-- Mapping of nits -> backlight -> brightness --> 245 <xs:element name="brightnessMapping" type="comprehensiveBrightnessMap" maxOccurs="1"> 246 </xs:element> 247 <!-- Mapping of current lux to minimum allowed nits values. --> 248 <xs:element name="luxToMinimumNitsMap" type="nitsMap" maxOccurs="1"> 249 </xs:element> 250 </xs:sequence> 251 <xs:attribute name="enabled" type="xs:boolean" use="optional"/> 252 </xs:complexType> 253 254 <xs:complexType name="highBrightnessMode"> 255 <xs:all> 256 <xs:element name="transitionPoint" type="nonNegativeDecimal" minOccurs="1" 257 maxOccurs="1"> 258 <xs:annotation name="nonnull"/> 259 <xs:annotation name="final"/> 260 </xs:element> 261 <xs:element name="minimumLux" type="nonNegativeDecimal" minOccurs="1" maxOccurs="1"> 262 <xs:annotation name="nonnull"/> 263 <xs:annotation name="final"/> 264 </xs:element> 265 <xs:element name="timing" type="hbmTiming" minOccurs="1" maxOccurs="1"/> 266 <xs:element type="refreshRateRange" name="refreshRate" minOccurs="0" maxOccurs="1"> 267 <xs:annotation name="nullable"/> 268 <xs:annotation name="final"/> 269 </xs:element> 270 <xs:element name="allowInLowPowerMode" type="xs:boolean" minOccurs="0" maxOccurs="1"> 271 <xs:annotation name="nonnull"/> 272 <xs:annotation name="final"/> 273 </xs:element> 274 <!-- The minimum HDR video size at which high-brightness-mode is allowed to operate. 275 Default is 0.5 if not specified--> 276 <xs:element name="minimumHdrPercentOfScreen" type="nonNegativeDecimal" 277 minOccurs="0" maxOccurs="1"> 278 <xs:annotation name="nullable"/> 279 <xs:annotation name="final"/> 280 </xs:element> 281 <!-- This LUT specifies how to boost HDR brightness at given SDR brightness (nits). --> 282 <xs:element type="sdrHdrRatioMap" name="sdrHdrRatioMap" minOccurs="0" maxOccurs="1"> 283 <xs:annotation name="nullable"/> 284 <xs:annotation name="final"/> 285 </xs:element> 286 </xs:all> 287 <xs:attribute name="enabled" type="xs:boolean" use="optional"/> 288 </xs:complexType> 289 290 <xs:complexType name="hbmTiming"> 291 <xs:all> 292 <xs:element name="timeWindowSecs" type="xs:nonNegativeInteger" minOccurs="1" 293 maxOccurs="1"> 294 <xs:annotation name="nonnull"/> 295 <xs:annotation name="final"/> 296 </xs:element> 297 <xs:element name="timeMaxSecs" type="xs:nonNegativeInteger" minOccurs="1" maxOccurs="1"> 298 <xs:annotation name="nonnull"/> 299 <xs:annotation name="final"/> 300 </xs:element> 301 <xs:element name="timeMinSecs" type="xs:nonNegativeInteger" minOccurs="1" maxOccurs="1"> 302 <xs:annotation name="nonnull"/> 303 <xs:annotation name="final"/> 304 </xs:element> 305 </xs:all> 306 </xs:complexType> 307 308 <!-- brightness config for HDR content --> 309 <xs:complexType name="hdrBrightnessConfig"> 310 <!-- lux level from light sensor to screen brightness recommended max value map. --> 311 <xs:element name="brightnessMap" type="nonNegativeFloatToFloatMap"> 312 <xs:annotation name="nonnull"/> 313 <xs:annotation name="final"/> 314 </xs:element> 315 <!-- Debounce for brightness increase in millis --> 316 <xs:element name="brightnessIncreaseDebounceMillis" type="xs:nonNegativeInteger"> 317 <xs:annotation name="final"/> 318 </xs:element> 319 <!-- Debounce for brightness decrease in millis --> 320 <xs:element name="brightnessDecreaseDebounceMillis" type="xs:nonNegativeInteger"> 321 <xs:annotation name="final"/> 322 </xs:element> 323 <!-- Animation speed for brightness increase. In framework brightness units per second. --> 324 <xs:element name="screenBrightnessRampIncrease" type="nonNegativeDecimal"> 325 <xs:annotation name="final"/> 326 </xs:element> 327 <!-- Animation speed for brightness decrease. In framework brightness units per second. --> 328 <xs:element name="screenBrightnessRampDecrease" type="nonNegativeDecimal"> 329 <xs:annotation name="final"/> 330 </xs:element> 331 332 <!-- The minimum HDR layer % at which hdr boost will be applied with transition point cap. 333 Should be lower or equal to minimumHdrPercentOfScreenForHbm. --> 334 <xs:element name="minimumHdrPercentOfScreenForNbm" type="nonNegativeDecimal" 335 minOccurs="0" maxOccurs="1"> 336 <xs:annotation name="nullable"/> 337 <xs:annotation name="final"/> 338 </xs:element> 339 <!-- The minimum HDR layer size at which hdr boost will be applied. --> 340 <xs:element name="minimumHdrPercentOfScreenForHbm" type="nonNegativeDecimal" 341 minOccurs="0" maxOccurs="1"> 342 <xs:annotation name="nullable"/> 343 <xs:annotation name="final"/> 344 </xs:element> 345 <!-- If hdr boost is allowed in low power mode. --> 346 <xs:element name="allowInLowPowerMode" type="xs:boolean" minOccurs="0" maxOccurs="1"> 347 <xs:annotation name="nonnull"/> 348 <xs:annotation name="final"/> 349 </xs:element> 350 <!-- sdrNits, hdrRatio This LUT specifies how to boost HDR brightness at given SDR brightness (nits). --> 351 <!-- sdr brightness to hdr boost ratio map 352 Format: first = sdrNits, second = hdrRatio. E.g. : 353 <sdrHdrRatioMap> 354 <point> 355 <first>2.0</first> // sdrNits 356 <second>4.0</second> // hdrRatio 357 </point> 358 .... 359 </sdrHdrRatioMap> 360 --> 361 <xs:element type="nonNegativeFloatToFloatMap" name="sdrHdrRatioMap" minOccurs="0" maxOccurs="1"> 362 <xs:annotation name="nullable"/> 363 <xs:annotation name="final"/> 364 </xs:element> 365 366 367 </xs:complexType> 368 369 <!-- Maps to PowerManager.THERMAL_STATUS_* values. --> 370 <xs:simpleType name="thermalStatus"> 371 <xs:restriction base="xs:string"> 372 <xs:enumeration value="none"/> 373 <xs:enumeration value="light"/> 374 <xs:enumeration value="moderate"/> 375 <xs:enumeration value="severe"/> 376 <xs:enumeration value="critical"/> 377 <xs:enumeration value="emergency"/> 378 <xs:enumeration value="shutdown"/> 379 </xs:restriction> 380 </xs:simpleType> 381 382 <xs:complexType name="thermalThrottling"> 383 <xs:sequence> 384 <xs:element type="brightnessThrottlingMap" name="brightnessThrottlingMap" maxOccurs="unbounded"> 385 <xs:annotation name="final"/> 386 </xs:element> 387 <xs:element type="refreshRateThrottlingMap" name="refreshRateThrottlingMap" maxOccurs="unbounded"> 388 <xs:annotation name="final"/> 389 </xs:element> 390 </xs:sequence> 391 </xs:complexType> 392 393 <xs:complexType name="refreshRateThrottlingMap"> 394 <xs:attribute name="id" type="xs:string" /> 395 <xs:sequence> 396 <xs:element name="refreshRateThrottlingPoint" type="refreshRateThrottlingPoint" maxOccurs="unbounded"> 397 <xs:annotation name="nonnull"/> 398 <xs:annotation name="final"/> 399 </xs:element> 400 </xs:sequence> 401 </xs:complexType> 402 403 <xs:complexType name="refreshRateThrottlingPoint"> 404 <xs:sequence> 405 <xs:element type="thermalStatus" name="thermalStatus"> 406 <xs:annotation name="nonnull"/> 407 <xs:annotation name="final"/> 408 </xs:element> 409 <xs:element type="refreshRateRange" name="refreshRateRange"> 410 <xs:annotation name="nonnull"/> 411 <xs:annotation name="final"/> 412 </xs:element> 413 </xs:sequence> 414 </xs:complexType> 415 416 <xs:complexType name="brightnessThrottlingMap"> 417 <xs:sequence> 418 <xs:element name="brightnessThrottlingPoint" type="brightnessThrottlingPoint" maxOccurs="unbounded" minOccurs="1"> 419 <xs:annotation name="nonnull"/> 420 <xs:annotation name="final"/> 421 </xs:element> 422 </xs:sequence> 423 <xs:attribute name="id" type="xs:string"/> 424 </xs:complexType> 425 426 <xs:complexType name="brightnessThrottlingPoint"> 427 <xs:sequence> 428 <xs:element type="thermalStatus" name="thermalStatus"> 429 <xs:annotation name="nonnull"/> 430 <xs:annotation name="final"/> 431 </xs:element> 432 <xs:element type="nonNegativeDecimal" name="brightness"> 433 <xs:annotation name="nonnull"/> 434 <xs:annotation name="final"/> 435 </xs:element> 436 </xs:sequence> 437 </xs:complexType> 438 439 <xs:complexType name="powerThrottlingMap"> 440 <xs:sequence> 441 <xs:element name="powerThrottlingPoint" type="powerThrottlingPoint" maxOccurs="unbounded" minOccurs="1"> 442 <xs:annotation name="nonnull"/> 443 <xs:annotation name="final"/> 444 </xs:element> 445 </xs:sequence> 446 <xs:attribute name="id" type="xs:string"/> 447 </xs:complexType> 448 449 <xs:complexType name="powerThrottlingPoint"> 450 <xs:sequence> 451 <xs:element type="thermalStatus" name="thermalStatus"> 452 <xs:annotation name="nonnull"/> 453 <xs:annotation name="final"/> 454 </xs:element> 455 <xs:element type="nonNegativeDecimal" name="powerQuotaMilliWatts"> 456 <xs:annotation name="nonnull"/> 457 <xs:annotation name="final"/> 458 </xs:element> 459 </xs:sequence> 460 </xs:complexType> 461 462 <xs:complexType name="powerThrottlingConfig"> 463 <xs:element type="nonNegativeDecimal" name="brightnessLowestCapAllowed"> 464 <xs:annotation name="nonnull"/> 465 <xs:annotation name="final"/> 466 </xs:element> 467 <xs:element name="customAnimationRate" type="nonNegativeDecimal" minOccurs="0" maxOccurs="1"> 468 <xs:annotation name="nonnull"/> 469 <xs:annotation name="final"/> 470 </xs:element> 471 <xs:element name="pollingWindowMaxMillis" type="xs:nonNegativeInteger"> 472 <xs:annotation name="nonnull"/> 473 <xs:annotation name="final"/> 474 </xs:element> 475 <xs:element name="pollingWindowMinMillis" type="xs:nonNegativeInteger"> 476 <xs:annotation name="nonnull"/> 477 <xs:annotation name="final"/> 478 </xs:element> 479 <xs:element type="powerThrottlingMap" name="powerThrottlingMap" maxOccurs="unbounded"> 480 <xs:annotation name="final"/> 481 </xs:element> 482 </xs:complexType> 483 484 <xs:complexType name="nitsMap"> 485 <xs:sequence> 486 <xs:element name="point" type="point" maxOccurs="unbounded" minOccurs="2"> 487 <xs:annotation name="nonnull"/> 488 <xs:annotation name="final"/> 489 </xs:element> 490 </xs:sequence> 491 <!-- valid value of interpolation if specified: linear --> 492 <xs:attribute name="interpolation" type="xs:string" use="optional"/> 493 </xs:complexType> 494 495 <xs:complexType name="point"> 496 <xs:sequence> 497 <xs:element type="nonNegativeDecimal" name="value"> 498 <xs:annotation name="nonnull"/> 499 <xs:annotation name="final"/> 500 </xs:element> 501 <xs:element type="nonNegativeDecimal" name="nits"> 502 <xs:annotation name="nonnull"/> 503 <xs:annotation name="final"/> 504 </xs:element> 505 </xs:sequence> 506 </xs:complexType> 507 508 <xs:complexType name="comprehensiveBrightnessMap"> 509 <xs:sequence> 510 <xs:element name="brightnessPoint" type="brightnessPoint" maxOccurs="unbounded" minOccurs="2"> 511 <xs:annotation name="nonnull"/> 512 <xs:annotation name="final"/> 513 </xs:element> 514 </xs:sequence> 515 </xs:complexType> 516 517 <xs:complexType name="brightnessPoint"> 518 <xs:sequence> 519 <xs:element type="nonNegativeDecimal" name="nits"> 520 <xs:annotation name="nonnull"/> 521 <xs:annotation name="final"/> 522 </xs:element> 523 <xs:element type="nonNegativeDecimal" name="backlight"> 524 <xs:annotation name="nonnull"/> 525 <xs:annotation name="final"/> 526 </xs:element> 527 <xs:element type="nonNegativeDecimal" name="brightness"> 528 <xs:annotation name="nonnull"/> 529 <xs:annotation name="final"/> 530 </xs:element> 531 </xs:sequence> 532 </xs:complexType> 533 534 535 <xs:complexType name="sdrHdrRatioMap"> 536 <xs:sequence> 537 <xs:element name="point" type="sdrHdrRatioPoint" maxOccurs="unbounded" minOccurs="2"> 538 <xs:annotation name="nonnull"/> 539 <xs:annotation name="final"/> 540 </xs:element> 541 </xs:sequence> 542 </xs:complexType> 543 544 <xs:complexType name="sdrHdrRatioPoint"> 545 <xs:sequence> 546 <xs:element type="nonNegativeDecimal" name="sdrNits"> 547 <xs:annotation name="nonnull"/> 548 <xs:annotation name="final"/> 549 </xs:element> 550 <xs:element type="nonNegativeDecimal" name="hdrRatio"> 551 <xs:annotation name="nonnull"/> 552 <xs:annotation name="final"/> 553 </xs:element> 554 </xs:sequence> 555 </xs:complexType> 556 557 <xs:simpleType name="nonNegativeDecimal"> 558 <xs:restriction base="xs:decimal"> 559 <xs:minInclusive value="0.0"/> 560 </xs:restriction> 561 </xs:simpleType> 562 563 <xs:complexType name="sensorDetails"> 564 <xs:attribute name="featureFlag" type="xs:string" use="optional"/> 565 <xs:sequence> 566 <xs:element type="xs:string" name="type" minOccurs="0" maxOccurs="1"> 567 <xs:annotation name="nullable"/> 568 <xs:annotation name="final"/> 569 </xs:element> 570 <xs:element type="xs:string" name="name" minOccurs="0" maxOccurs="1"> 571 <xs:annotation name="nullable"/> 572 <xs:annotation name="final"/> 573 </xs:element> 574 <xs:element type="refreshRateRange" name="refreshRate" minOccurs="0" maxOccurs="1"> 575 <xs:annotation name="nullable"/> 576 <xs:annotation name="final"/> 577 </xs:element> 578 <!-- list of supported modes when sensor is ON. Each point corresponds to one mode. 579 Mode format is : first = refreshRate, second = vsyncRate. E.g. : 580 <supportedModes> 581 <point> 582 <first>60</first> // refreshRate 583 <second>60</second> //vsyncRate 584 </point> 585 .... 586 </supportedModes> 587 --> 588 <xs:element type="nonNegativeFloatToFloatMap" name="supportedModes" minOccurs="0"> 589 <xs:annotation name="nullable"/> 590 <xs:annotation name="final"/> 591 </xs:element> 592 </xs:sequence> 593 </xs:complexType> 594 595 <xs:complexType name="refreshRateRange"> 596 <xs:sequence> 597 <xs:element type="xs:nonNegativeInteger" name="minimum" minOccurs="1" maxOccurs="1"> 598 <xs:annotation name="final"/> 599 </xs:element> 600 <xs:element type="xs:nonNegativeInteger" name="maximum" minOccurs="1" maxOccurs="1"> 601 <xs:annotation name="final"/> 602 </xs:element> 603 </xs:sequence> 604 </xs:complexType> 605 606 <xs:complexType name="densityMapping"> 607 <xs:sequence> 608 <xs:element name="density" type="density" maxOccurs="unbounded" minOccurs="1"> 609 </xs:element> 610 </xs:sequence> 611 </xs:complexType> 612 613 <xs:complexType name="density"> 614 <xs:sequence> 615 <xs:element type="xs:nonNegativeInteger" name="width"> 616 <xs:annotation name="nonnull"/> 617 <xs:annotation name="final"/> 618 </xs:element> 619 <xs:element type="xs:nonNegativeInteger" name="height"> 620 <xs:annotation name="nonnull"/> 621 <xs:annotation name="final"/> 622 </xs:element> 623 <xs:element type="xs:nonNegativeInteger" name="density"> 624 <xs:annotation name="nonnull"/> 625 <xs:annotation name="final"/> 626 </xs:element> 627 </xs:sequence> 628 </xs:complexType> 629 630 <!-- Thresholds for brightness changes. --> 631 <xs:complexType name="thresholds"> 632 <xs:sequence> 633 <!-- Brightening thresholds for active screen brightness mode. --> 634 <xs:element name="brighteningThresholds" type="brightnessThresholds" minOccurs="0" 635 maxOccurs="1" > 636 <xs:annotation name="nonnull"/> 637 <xs:annotation name="final"/> 638 </xs:element> 639 <!-- Darkening thresholds for active screen brightness mode. --> 640 <xs:element name="darkeningThresholds" type="brightnessThresholds" minOccurs="0" 641 maxOccurs="1" > 642 <xs:annotation name="nonnull"/> 643 <xs:annotation name="final"/> 644 </xs:element> 645 </xs:sequence> 646 </xs:complexType> 647 648 <!-- Brightening and darkening minimum change thresholds. --> 649 <xs:complexType name="brightnessThresholds"> 650 <!-- Minimum brightness change needed. --> 651 <xs:element name="minimum" type="nonNegativeDecimal" minOccurs="0" maxOccurs="1" > 652 <xs:annotation name="nonnull"/> 653 <xs:annotation name="final"/> 654 </xs:element> 655 <xs:sequence> 656 <!-- Thresholds as tenths of percent of current brightness level, at each level of 657 brightness --> 658 <xs:element name="brightnessThresholdPoints" type="thresholdPoints" maxOccurs="1" minOccurs="0"> 659 <xs:annotation name="final"/> 660 </xs:element> 661 </xs:sequence> 662 </xs:complexType> 663 664 <xs:complexType name="thresholdPoints"> 665 <xs:sequence> 666 <xs:element type="thresholdPoint" name="brightnessThresholdPoint" maxOccurs="unbounded" minOccurs="1"> 667 <xs:annotation name="nonnull"/> 668 <xs:annotation name="final"/> 669 </xs:element> 670 </xs:sequence> 671 </xs:complexType> 672 673 <xs:complexType name="thresholdPoint"> 674 <xs:sequence> 675 <xs:element type="nonNegativeDecimal" name="threshold"> 676 <xs:annotation name="nonnull"/> 677 <xs:annotation name="final"/> 678 </xs:element> 679 <xs:element type="nonNegativeDecimal" name="percentage"> 680 <xs:annotation name="nonnull"/> 681 <xs:annotation name="final"/> 682 </xs:element> 683 </xs:sequence> 684 </xs:complexType> 685 686 <xs:complexType name="autoBrightness"> 687 <xs:attribute name="enabled" type="xs:boolean" use="optional" default="true"/> 688 <xs:sequence> 689 <!-- Sets the debounce for autoBrightness brightening in millis --> 690 <xs:element name="brighteningLightDebounceMillis" type="xs:nonNegativeInteger" 691 minOccurs="0" maxOccurs="1"> 692 <xs:annotation name="final"/> 693 </xs:element> 694 <!-- Sets the debounce for autoBrightness darkening in millis --> 695 <xs:element name="darkeningLightDebounceMillis" type="xs:nonNegativeInteger" 696 minOccurs="0" maxOccurs="1"> 697 <xs:annotation name="final"/> 698 </xs:element> 699 <!-- Sets the debounce for autoBrightness brightening in millis while in idle mode --> 700 <xs:element name="brighteningLightDebounceIdleMillis" type="xs:nonNegativeInteger" 701 minOccurs="0" maxOccurs="1"> 702 <xs:annotation name="final"/> 703 </xs:element> 704 <!-- Sets the debounce for autoBrightness darkening in millis while in idle mode --> 705 <xs:element name="darkeningLightDebounceIdleMillis" type="xs:nonNegativeInteger" 706 minOccurs="0" maxOccurs="1"> 707 <xs:annotation name="final"/> 708 </xs:element> 709 <!-- Sets the brightness mapping of the desired screen brightness to the corresponding 710 lux for the current display --> 711 <xs:element name="luxToBrightnessMapping" type="luxToBrightnessMapping" 712 minOccurs="0" maxOccurs="unbounded"> 713 <xs:annotation name="final"/> 714 </xs:element> 715 <!-- The time after which the stylus is to be assumed to be not under use. This will 716 enable the logic of changing the brightness with ambient light changes --> 717 <xs:element name="idleStylusTimeoutMillis" type="xs:nonNegativeInteger" 718 minOccurs="0" maxOccurs="1"> 719 <xs:annotation name="final"/> 720 </xs:element> 721 </xs:sequence> 722 </xs:complexType> 723 724 <!-- Sets the list of display brightness points, each representing the desired screen brightness 725 in a certain lux environment. 726 727 The first value of each point is the lux value and the second value is the brightness value. 728 729 The first lux value must be 0. 730 731 The control points must be strictly increasing. 732 733 Example: if currentLux == the second lux value in the mapping then the brightness will be 734 determined by the second brightness value in the mapping. Spline interpolation is used 735 to determine the auto-brightness values for lux levels between these control points. 736 737 The brightness values must be non-negative decimals within the range between the first and 738 the last brightness values in screenBrightnessMap. 739 740 This is used in place of config_autoBrightnessLevels and config_autoBrightnessLcdBacklightValues 741 defined in the config XML resource. 742 743 On devices that allow users to choose from a set of predefined options in display 744 auto-brightness settings, multiple mappings for different modes and settings can be defined. 745 746 If no mode is specified, the mapping will be used for the default mode. 747 If no setting is specified, the mapping will be used for the normal brightness setting. 748 749 If no mapping is defined for one of the settings, the mapping for the normal setting will be 750 used as a fallback. 751 --> 752 <xs:complexType name="luxToBrightnessMapping"> 753 <xs:element name="map" type="nonNegativeFloatToFloatMap"> 754 <xs:annotation name="nonnull"/> 755 <xs:annotation name="final"/> 756 </xs:element> 757 <xs:element name="mode" type="AutoBrightnessModeName" minOccurs="0"/> 758 <xs:element name="setting" type="AutoBrightnessSettingName" minOccurs="0"/> 759 </xs:complexType> 760 761 <!-- Represents a point in the display brightness mapping, representing the lux level from the 762 light sensor to the desired screen brightness in nits at this level --> 763 <xs:complexType name="displayBrightnessPoint"> 764 <xs:sequence> 765 <!-- The lux level from the light sensor. This must be a non-negative integer --> 766 <xs:element name="lux" type="xs:nonNegativeInteger" 767 minOccurs="1" maxOccurs="1"> 768 <xs:annotation name="final"/> 769 </xs:element> 770 771 <!-- Desired screen brightness in nits corresponding to the suggested lux values. 772 The display brightness is defined as the measured brightness of an all-white image. 773 This must be a non-negative integer --> 774 <xs:element name="nits" type="nonNegativeDecimal" 775 minOccurs="1" maxOccurs="1"> 776 <xs:annotation name="final"/> 777 </xs:element> 778 </xs:sequence> 779 </xs:complexType> 780 781 <xs:complexType name="refreshRateConfigs"> 782 <xs:element name="defaultRefreshRate" type="xs:nonNegativeInteger" 783 minOccurs="0" maxOccurs="1"> 784 <xs:annotation name="final"/> 785 </xs:element> 786 <xs:element name="defaultPeakRefreshRate" type="xs:nonNegativeInteger" 787 minOccurs="0" maxOccurs="1"> 788 <xs:annotation name="final"/> 789 </xs:element> 790 <xs:element name="refreshRateZoneProfiles" type="refreshRateZoneProfiles" 791 minOccurs="0" maxOccurs="1"> 792 <xs:annotation name="final"/> 793 </xs:element> 794 <xs:element name="defaultRefreshRateInHbmHdr" type="xs:nonNegativeInteger" 795 minOccurs="0" maxOccurs="1"> 796 <xs:annotation name="final"/> 797 </xs:element> 798 <xs:element name="defaultRefreshRateInHbmSunlight" type="xs:nonNegativeInteger" 799 minOccurs="0" maxOccurs="1"> 800 <xs:annotation name="final"/> 801 </xs:element> 802 <xs:element name="lowerBlockingZoneConfigs" type="blockingZoneConfig" 803 minOccurs="0" maxOccurs="1"> 804 <xs:annotation name="final"/> 805 </xs:element> 806 <xs:element name="higherBlockingZoneConfigs" type="blockingZoneConfig" 807 minOccurs="0" maxOccurs="1"> 808 <xs:annotation name="final"/> 809 </xs:element> 810 <!-- list of supported modes for low power. Each point corresponds to one mode. 811 Mode format is : first = refreshRate, second = vsyncRate. E.g. : 812 <lowPowerSupportedModes> 813 <point> 814 <first>60</first> // refreshRate 815 <second>60</second> //vsyncRate 816 </point> 817 .... 818 </lowPowerSupportedModes> 819 --> 820 <xs:element type="nonNegativeFloatToFloatMap" name="lowPowerSupportedModes" minOccurs="0"> 821 <xs:annotation name="nullable"/> 822 <xs:annotation name="final"/> 823 </xs:element> 824 </xs:complexType> 825 826 <xs:complexType name="refreshRateZoneProfiles"> 827 <xs:sequence> 828 <xs:element name="refreshRateZoneProfile" type="refreshRateZone" 829 minOccurs="0" maxOccurs="unbounded"> 830 <xs:annotation name="final"/> 831 </xs:element> 832 </xs:sequence> 833 </xs:complexType> 834 835 <xs:complexType name="refreshRateZone"> 836 <xs:attribute name="id" use="required" type="xs:string" /> 837 <xs:element name="refreshRateRange" type="refreshRateRange"> 838 <xs:annotation name="final"/> 839 </xs:element> 840 </xs:complexType> 841 842 <xs:complexType name="blockingZoneConfig"> 843 <!-- list of supported modes for blocking zone . Each point corresponds to one mode. 844 Supported only for lowerBlockingZoneConfigs 845 Mode format is : first = refreshRate, second = vsyncRate. E.g. : 846 <supportedModes> 847 <point> 848 <first>60</first> // refreshRate 849 <second>60</second> //vsyncRate 850 </point> 851 .... 852 </supportedModes> 853 --> 854 <xs:element type="nonNegativeFloatToFloatMap" name="supportedModes" minOccurs="0"> 855 <xs:annotation name="nullable"/> 856 <xs:annotation name="final"/> 857 </xs:element> 858 <xs:element name="defaultRefreshRate" type="xs:nonNegativeInteger" 859 minOccurs="1" maxOccurs="1"> 860 <xs:annotation name="final"/> 861 </xs:element> 862 <xs:element type ="xs:string" name="refreshRateThermalThrottlingId"> 863 <xs:annotation name="nullable"/> 864 <xs:annotation name="final"/> 865 </xs:element> 866 <xs:element name="blockingZoneThreshold" type="blockingZoneThreshold" 867 minOccurs="1" maxOccurs="1"> 868 <xs:annotation name="final"/> 869 </xs:element> 870 </xs:complexType> 871 872 <xs:complexType name="blockingZoneThreshold"> 873 <xs:sequence> 874 <xs:element name="displayBrightnessPoint" type="displayBrightnessPoint" 875 minOccurs="1" maxOccurs="unbounded"> 876 <xs:annotation name="final"/> 877 </xs:element> 878 </xs:sequence> 879 </xs:complexType> 880 881 <xs:complexType name="integer-array"> 882 <xs:sequence> 883 <xs:element name="item" type="xs:nonNegativeInteger" minOccurs="0" maxOccurs="unbounded"/> 884 </xs:sequence> 885 </xs:complexType> 886 887 <xs:complexType name="float-array"> 888 <xs:sequence> 889 <xs:element name="item" type="nonNegativeDecimal" minOccurs="0" maxOccurs="unbounded"/> 890 </xs:sequence> 891 </xs:complexType> 892 893 <xs:complexType name="usiVersion"> 894 <xs:element name="majorVersion" type="xs:nonNegativeInteger" 895 minOccurs="1" maxOccurs="1"> 896 <xs:annotation name="final"/> 897 </xs:element> 898 <xs:element name="minorVersion" type="xs:nonNegativeInteger" 899 minOccurs="1" maxOccurs="1"> 900 <xs:annotation name="final"/> 901 </xs:element> 902 </xs:complexType> 903 904 <!-- generic types --> 905 <xs:complexType name="nonNegativeFloatToFloatPoint"> 906 <xs:sequence> 907 <xs:element name="first" type="nonNegativeDecimal"> 908 <xs:annotation name="nonnull"/> 909 <xs:annotation name="final"/> 910 </xs:element> 911 <xs:element name="second" type="nonNegativeDecimal"> 912 <xs:annotation name="nonnull"/> 913 <xs:annotation name="final"/> 914 </xs:element> 915 </xs:sequence> 916 </xs:complexType> 917 918 <xs:complexType name="nonNegativeFloatToFloatMap"> 919 <xs:sequence> 920 <xs:element name="point" type="nonNegativeFloatToFloatPoint" maxOccurs="unbounded"> 921 <xs:annotation name="nonnull"/> 922 <xs:annotation name="final"/> 923 </xs:element> 924 </xs:sequence> 925 </xs:complexType> 926 927 <xs:complexType name="idleScreenRefreshRateTimeout"> 928 <xs:element name="luxThresholds" type="idleScreenRefreshRateTimeoutLuxThresholds" minOccurs="0"> 929 <xs:annotation name="final"/> 930 </xs:element> 931 </xs:complexType> 932 933 <!-- Lux based timeout after which we reduce the refresh rate if the screen has been idle, in order to save power. --> 934 <xs:complexType name="idleScreenRefreshRateTimeoutLuxThresholds"> 935 <xs:sequence> 936 <xs:element name="point" type="idleScreenRefreshRateTimeoutLuxThresholdPoint" maxOccurs="unbounded" /> 937 </xs:sequence> 938 </xs:complexType> 939 940 <!-- Represents a tuple of lux and timeout(in ms), which represents the timeout value for the lux in 941 the [luxValue, nextLuxValue (INF if missing)) --> 942 <xs:complexType name="idleScreenRefreshRateTimeoutLuxThresholdPoint"> 943 <xs:element name="lux" type="xs:nonNegativeInteger"> 944 <xs:annotation name="final"/> 945 </xs:element> 946 <xs:element name="timeout" type="xs:nonNegativeInteger"> 947 <xs:annotation name="final"/> 948 </xs:element> 949 </xs:complexType> 950 951 <!-- Predefined type names as defined by 952 AutomaticBrightnessController.AutomaticBrightnessMode --> 953 <xs:simpleType name="AutoBrightnessModeName"> 954 <xs:restriction base="xs:string"> 955 <xs:enumeration value="default"/> 956 <xs:enumeration value="idle"/> 957 <xs:enumeration value="doze"/> 958 <xs:enumeration value="bedtime_wear"/> 959 </xs:restriction> 960 </xs:simpleType> 961 962 <!-- Predefined auto-brighntess settings --> 963 <xs:simpleType name="AutoBrightnessSettingName"> 964 <xs:restriction base="xs:string"> 965 <xs:enumeration value="dim"/> 966 <xs:enumeration value="normal"/> 967 <xs:enumeration value="bright"/> 968 </xs:restriction> 969 </xs:simpleType> 970</xs:schema> 971