mirror of
https://github.com/PixelExperience-Devices/device_xiaomi_miatoll.git
synced 2025-08-05 16:24:13 +09:00
249 lines
11 KiB
XML
249 lines
11 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!--
|
|
Copyright (C) 2022 The LineageOS Project
|
|
SPDX-License-Identifier: Apache-2.0
|
|
-->
|
|
<resources>
|
|
|
|
<!-- The bounding path of the cutout region of the main built-in display.
|
|
Must either be empty if there is no cutout region, or a string that is parsable by
|
|
{@link android.util.PathParser}.
|
|
The path is assumed to be specified in display coordinates with pixel units and in
|
|
the display's native orientation, with the origin of the coordinate system at the
|
|
center top of the display.
|
|
To facilitate writing device-independent emulation overlays, the marker `@dp` can be
|
|
appended after the path string to interpret coordinates in dp instead of px units.
|
|
Note that a physical cutout should be configured in pixels for the best results.
|
|
Example for a 10px x 10px square top-center cutout:
|
|
<string ...>M -5,0 L -5,10 L 5,10 L 5,0 Z</string>
|
|
Example for a 10dp x 10dp square top-center cutout:
|
|
<string ...>M -5,0 L -5,10 L 5,10 L 5,0 Z @dp</string>
|
|
@see https://www.w3.org/TR/SVG/paths.html#PathData
|
|
-->
|
|
<string name="config_mainBuiltInDisplayCutout" translatable="false">
|
|
M 0,0 H -36 V 102 H 36 V 0 H 0 Z
|
|
</string>
|
|
|
|
<!-- Flag indicating whether the we should enable the automatic brightness in Settings.
|
|
Software implementation will be used if config_hardware_auto_brightness_available is not set -->
|
|
<bool name="config_automatic_brightness_available">true</bool>
|
|
|
|
<!-- Array of hysteresis constraint values for brightening, represented as tenths of a
|
|
percent. The length of this array is assumed to be one greater than
|
|
config_ambientThresholdLevels. The brightening threshold is calculated as
|
|
lux * (1.0f + CONSTRAINT_VALUE). When the current lux is higher than this threshold,
|
|
the screen brightness is recalculated. See the config_ambientThresholdLevels
|
|
description for how the constraint value is chosen. -->
|
|
<integer-array name="config_ambientBrighteningThresholds">
|
|
<item>11373</item>
|
|
<item>5000</item>
|
|
<item>4333</item>
|
|
<item>3666</item>
|
|
<item>3000</item>
|
|
<item>2760</item>
|
|
<item>2520</item>
|
|
<item>2280</item>
|
|
<item>2040</item>
|
|
<item>1800</item>
|
|
<item>800</item>
|
|
<item>527</item>
|
|
<item>500</item>
|
|
<item>470</item>
|
|
<item>396</item>
|
|
<item>322</item>
|
|
<item>248</item>
|
|
<item>174</item>
|
|
<item>99</item>
|
|
<item>99</item>
|
|
</integer-array>
|
|
|
|
<!-- Array of hysteresis constraint values for darkening, represented as tenths of a
|
|
percent. The length of this array is assumed to be one greater than
|
|
config_ambientThresholdLevels. The darkening threshold is calculated as
|
|
lux * (1.0f - CONSTRAINT_VALUE). When the current lux is lower than this threshold,
|
|
the screen brightness is recalculated. See the config_ambientThresholdLevels
|
|
description for how the constraint value is chosen. -->
|
|
<integer-array name="config_ambientDarkeningThresholds">
|
|
<item>853</item>
|
|
<item>700</item>
|
|
<item>683</item>
|
|
<item>666</item>
|
|
<item>650</item>
|
|
<item>640</item>
|
|
<item>630</item>
|
|
<item>620</item>
|
|
<item>610</item>
|
|
<item>600</item>
|
|
<item>500</item>
|
|
<item>500</item>
|
|
<item>440</item>
|
|
<item>385</item>
|
|
<item>348</item>
|
|
<item>311</item>
|
|
<item>274</item>
|
|
<item>237</item>
|
|
<item>200</item>
|
|
<item>200</item>
|
|
</integer-array>
|
|
|
|
<!-- Array of ambient lux threshold values. This is used for determining hysteresis constraint
|
|
values by calculating the index to use for lookup and then setting the constraint value
|
|
to the corresponding value of the array. The new brightening hysteresis constraint value
|
|
is the n-th element of config_ambientBrighteningThresholds, and the new darkening
|
|
hysteresis constraint value is the n-th element of config_ambientDarkeningThresholds.
|
|
The (zero-based) index is calculated as follows: (MAX is the largest index of the array)
|
|
condition calculated index
|
|
value < level[0] 0
|
|
level[n] <= value < level[n+1] n+1
|
|
level[MAX] <= value MAX+1 -->
|
|
<integer-array name="config_ambientThresholdLevels">
|
|
<item>1</item>
|
|
<item>2</item>
|
|
<item>3</item>
|
|
<item>4</item>
|
|
<item>5</item>
|
|
<item>6</item>
|
|
<item>7</item>
|
|
<item>8</item>
|
|
<item>9</item>
|
|
<item>10</item>
|
|
<item>20</item>
|
|
<item>30</item>
|
|
<item>40</item>
|
|
<item>50</item>
|
|
<item>60</item>
|
|
<item>70</item>
|
|
<item>80</item>
|
|
<item>90</item>
|
|
<item>100</item>
|
|
</integer-array>
|
|
|
|
<!-- Array of desired screen brightness in nits corresponding to the lux values
|
|
in the config_autoBrightnessLevels array. As with config_screenBrightnessMinimumNits and
|
|
config_screenBrightnessMaximumNits, 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>5</item> <!-- 0 - 1 -->
|
|
<item>10</item> <!-- 1 - 2 -->
|
|
<item>18</item> <!-- 2 - 3 -->
|
|
<item>22</item> <!-- 3 - 4 -->
|
|
<item>24</item> <!-- 4 - 8 -->
|
|
<item>31</item> <!-- 8 - 12 -->
|
|
<item>35</item> <!-- 12 - 20 -->
|
|
<item>41</item> <!-- 20 - 33 -->
|
|
<item>48</item> <!-- 33 - 55 -->
|
|
<item>56</item> <!-- 55 - 90 -->
|
|
<item>66</item> <!-- 90 - 148 -->
|
|
<item>80</item> <!-- 148 - 245 -->
|
|
<item>98</item> <!-- 245 - 403 -->
|
|
<item>125</item> <!-- 403 - 665 -->
|
|
<item>162</item> <!-- 665 - 1097 -->
|
|
<item>208</item> <!-- 1097 - 1808 -->
|
|
<item>265</item> <!-- 1808 - 2981 -->
|
|
<item>328</item> <!-- 2981 - 5000 -->
|
|
<item>450</item> <!-- 5000+ -->
|
|
</integer-array>
|
|
|
|
<!-- 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>1</item>
|
|
<item>2</item>
|
|
<item>3</item>
|
|
<item>4</item>
|
|
<item>8</item>
|
|
<item>12</item>
|
|
<item>20</item>
|
|
<item>33</item>
|
|
<item>55</item>
|
|
<item>90</item>
|
|
<item>148</item>
|
|
<item>245</item>
|
|
<item>403</item>
|
|
<item>665</item>
|
|
<item>1097</item>
|
|
<item>1808</item>
|
|
<item>2981</item>
|
|
<item>5000</item>
|
|
</integer-array>
|
|
|
|
<!-- An array describing the screen's backlight values corresponding to the brightness
|
|
values in the config_screenBrightnessNits array. -->
|
|
<integer-array name="config_screenBrightnessBacklight">
|
|
<item>1</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>2</item>
|
|
<item>450</item>
|
|
</integer-array>
|
|
|
|
<!-- 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">2000</integer>
|
|
<integer name="config_autoBrightnessDarkeningLightDebounce">4000</integer>
|
|
|
|
<!-- Minimum screen brightness setting allowed by power manager.
|
|
The user is forbidden from setting the brightness below this level.
|
|
Equivalent to 1/255. -->
|
|
<item name="config_screenBrightnessSettingMinimumFloat" format="float" type="dimen">0.0</item>
|
|
|
|
<!-- Maximum screen brightness allowed by the power manager.
|
|
The user is forbidden from setting the brightness above this level. -->
|
|
<item name="config_screenBrightnessSettingMaximumFloat" format="float" type="dimen">1.0</item>
|
|
|
|
<!-- Default screen brightness setting
|
|
Must be in the range specified by minimum and maximum.
|
|
Equivalent to 67/255 (default for this device) -->
|
|
<item name="config_screenBrightnessSettingDefaultFloat" format="float" type="dimen">0.26274509804</item>
|
|
|
|
<!-- Indicates whether device has a power button fingerprint sensor. -->
|
|
<bool name="config_is_powerbutton_fps">true</bool>
|
|
|
|
<!-- An array of arrays of side fingerprint sensor properties relative to each display.
|
|
Note: this value is temporary and is expected to be queried directly
|
|
from the HAL in the future. -->
|
|
<array name="config_sfps_sensor_props">
|
|
<item>@array/config_sfps_sensor_props_0</item>
|
|
</array>
|
|
|
|
<array name="config_sfps_sensor_props_0">
|
|
<item></item> <!-- displayId -->
|
|
<item>1080</item> <!-- sensorLocationX -->
|
|
<item>760</item> <!-- sensorLocationY -->
|
|
<item>100</item> <!-- sensorRadius -->
|
|
</array>
|
|
|
|
</resources>
|