<?xml version="1.0" encoding="utf-8"?>
<!--
     SPDX-FileCopyrightText: The LineageOS Project
     SPDX-License-Identifier: Apache-2.0
-->
<resources>
    <!-- Flag indicating whether we should enable the automatic brightness.
         Software implementation will be used if config_hardware_auto_brightness_available is not set -->
    <bool name="config_automatic_brightness_available">true</bool>

    <!-- Indicate available ColorDisplayManager.COLOR_MODE_xxx. -->
    <integer-array name="config_availableColorModes">
        <item>0</item>
        <item>1</item>
        <item>300</item>
    </integer-array>

    <!-- Minimum screen brightness setting allowed by power manager.
         -2 is invalid so setting will resort to int value specified above.
         Set this to 0.0 to allow screen to go to minimal brightness.
         The user is forbidden from setting the brightness below this level. -->
    <item type="dimen" name="config_screenBrightnessSettingMinimumFloat">0.033404917</item>

    <!-- Maximum screen brightness allowed by the power manager.
         -2 is invalid so setting will resort to int value specified above.
         Set this to 1.0 for maximum brightness range.
         The user is forbidden from setting the brightness above this level. -->
    <item type="dimen" name="config_screenBrightnessSettingMaximumFloat">1.0</item>

    <!-- Default screen brightness setting set.
         -2 is invalid so setting will resort to int value specified above.
         Must be in the range specified by minimum and maximum. -->
    <item name="config_screenBrightnessSettingDefaultFloat" format="float" type="dimen">0.38188976</item>

    <!-- Screen brightness used to dim the screen while dozing in a very low power state.
         May be less than the minimum allowed brightness setting
         that can be set by the user. -->
    <item type="dimen" name="config_screenBrightnessDozeFloat">0.5</item>

    <!-- Stability requirements in milliseconds for accepting a new brightness level.  This is used
         for debouncing the light sensor.  Different constants are used to debounce the light sensor
         when adapting to brighter or darker environments.  This parameter controls how quickly
         brightness changes occur in response to an observed change in light level that exceeds the
         hysteresis threshold. -->
    <integer name="config_autoBrightnessBrighteningLightDebounce">500</integer>
    <integer name="config_autoBrightnessDarkeningLightDebounce">500</integer>

    <!-- Screen brightness used to dim the screen when the user activity
         timeout expires.  May be less than the minimum allowed brightness setting
         that can be set by the user. -->
    <item name="config_screenBrightnessDimFloat" format="float" type="dimen">0.033404917</item>

    <!-- Array of light sensor lux values to define our levels for auto backlight brightness support.
         The N entries of this array define N + 1 control points as follows:
         (1-based arrays)

         Point 1:            (0, value[1]):             lux <= 0
         Point 2:     (level[1], value[2]):  0        < lux <= level[1]
         Point 3:     (level[2], value[3]):  level[2] < lux <= level[3]
         ...
         Point N+1: (level[N], value[N+1]):  level[N] < lux

         The control points must be strictly increasing.  Each control point
         corresponds to an entry in the brightness backlight values arrays.
         For example, if lux == level[1] (first element of the levels array)
         then the brightness will be determined by value[2] (second element
         of the brightness values array).

         Spline interpolation is used to determine the auto-brightness
         backlight values for lux levels between these control points.

         Must be overridden in platform specific overlays -->
    <integer-array name="config_autoBrightnessLevels">
        <item>2</item>
        <item>4</item>
        <item>10</item>
        <item>20</item>
        <item>40</item>
        <item>100</item>
        <item>325</item>
        <item>1250</item>
        <item>3500</item>
        <item>5000</item>
        <item>10000</item>
        <item>20000</item>
        <item>30000</item>
        <item>200000</item>
    </integer-array>

    <!-- Array of desired screen brightness in nits corresponding to the lux values
         in the config_autoBrightnessLevels array. The display brightness is defined as the measured
         brightness of an all-white image.

         If this is defined then:
            - config_autoBrightnessLcdBacklightValues should not be defined
            - config_screenBrightnessNits must be defined
            - config_screenBrightnessBacklight must be defined

         This array should have size one greater than the size of the config_autoBrightnessLevels
         array. The brightness values must be non-negative and non-decreasing. This must be
         overridden in platform specific overlays -->
    <integer-array name="config_autoBrightnessDisplayValuesNits">
        <item>3</item>
        <item>7</item>
        <item>10</item>
        <item>24</item>
        <item>64</item>
        <item>82</item>
        <item>90</item>
        <item>105</item>
        <item>192</item>
        <item>412</item>
        <item>500</item>
        <item>700</item>
        <item>1000</item>
        <item>1200</item>
        <item>1600</item>
    </integer-array>

    <!-- An array describing the screen's backlight values corresponding to the brightness
         values in the config_screenBrightnessNits array.

         This array should be equal in size to config_screenBrightnessBacklight. -->
    <integer-array name="config_screenBrightnessBacklight">
        <item>9</item>
        <item>26</item>
        <item>34</item>
        <item>52</item>
        <item>85</item>
        <item>96</item>
        <item>100</item>
        <item>107</item>
        <item>141</item>
        <item>201</item>
        <item>220</item>
        <item>227</item>
        <item>236</item>
        <item>243</item>
        <item>255</item>
    </integer-array>

    <!-- An array of floats describing the screen brightness in nits corresponding to the backlight
         values in the config_screenBrightnessBacklight array.  On OLED displays these  values
         should be measured with an all white image while the display is in the fully on state.
         Note that this value should *not* reflect the maximum brightness value for any high
         brightness modes but only the maximum brightness value obtainable in a sustainable manner.

         This array should be equal in size to config_screenBrightnessBacklight -->
    <integer-array name="config_screenBrightnessNits">
        <item>3</item>
        <item>7</item>
        <item>10</item>
        <item>24</item>
        <item>64</item>
        <item>82</item>
        <item>90</item>
        <item>105</item>
        <item>192</item>
        <item>412</item>
        <item>500</item>
        <item>700</item>
        <item>1000</item>
        <item>1200</item>
        <item>1600</item>
    </integer-array>

    <!-- The default peak refresh rate for a given device. Change this value if you want to prevent
         the framework from using higher refresh rates, even if display modes with higher refresh
         rates are available from hardware composer. Only has an effect if the value is
         non-zero. -->
    <integer name="config_defaultPeakRefreshRate">120</integer>

    <!-- A string config in svg path format for the main display shape.
         (@see https://www.w3.org/TR/SVG/paths.html#PathData).

         This config must be set unless:
         1. {@link Configuration#isScreenRound} is true which means the display shape is circular
            and the system will auto-generate a circular shape.
         2. The display has no rounded corner and the system will auto-generate a rectangular shape.
         (@see DisplayShape#createDefaultDisplayShape)

         Note: If the display supports multiple resolutions, please define the path config based on
         the highest resolution so that it can be scaled correctly in each resolution. -->
    <string name="config_mainDisplayShape" translatable="false">"M20 0C10.7 0 0 10.7 0 24v0h24V0z"</string>
</resources>