grus: Initial overlays

* Power profile from stock
* Status bar height and rounded corner radius from stock
* Brightness overlays from stock
* UDFPS properties from vendor.prop
* Use green like stock for UDFPS circle
* The device has a notch

Change-Id: I4bc38d66ed487c86dc61bc7885a89a6fdae61be9
This commit is contained in:
Sebastiano Barezzi 2022-05-19 00:23:46 +02:00
parent a0d8a0a027
commit 7c5b23ac70
No known key found for this signature in database
GPG Key ID: 47760583F393BC44
8 changed files with 560 additions and 0 deletions

View File

@ -22,6 +22,11 @@ PRODUCT_COPY_FILES += \
TARGET_SCREEN_HEIGHT := 2340
TARGET_SCREEN_WIDTH := 1080
# Overlays
DEVICE_PACKAGE_OVERLAYS += \
$(LOCAL_PATH)/overlay \
$(LOCAL_PATH)/overlay-lineage
# Shipping API level
PRODUCT_SHIPPING_API_LEVEL := 28

View File

@ -0,0 +1,31 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
/*
** Copyright 2009, 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.
*/
-->
<!-- These resources are around just to allow their values to be customized
for different hardware and product builds. -->
<resources>
<!-- Color of the UDFPS pressed view -->
<color name="config_udfpsColor">#00ff00</color>
<!-- HBM type of UDFPS overlay.
0 - GLOBAL HBM
1 - LOCAL HBM
-->
<integer name="config_udfpsHbmType">0</integer>
</resources>

View File

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2020 The LineageOS 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.
-->
<resources>
<!-- Whether device has a notch -->
<bool name="config_haveNotch">true</bool>
</resources>

View File

@ -0,0 +1,300 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2009 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.
-->
<!-- These resources are around just to allow their values to be customized
for different hardware and product builds. Do not translate. -->
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<!-- 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 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>4</item>
<item>6</item>
<item>8</item>
<item>10</item>
<item>15</item>
<item>20</item>
<item>25</item>
<item>30</item>
<item>35</item>
<item>40</item>
<item>45</item>
<item>50</item>
<item>55</item>
<item>60</item>
<item>65</item>
<item>70</item>
<item>75</item>
<item>80</item>
<item>85</item>
<item>90</item>
<item>95</item>
<item>100</item>
<item>120</item>
<item>140</item>
<item>160</item>
<item>180</item>
<item>200</item>
<item>220</item>
<item>240</item>
<item>260</item>
<item>280</item>
<item>300</item>
<item>320</item>
<item>340</item>
<item>360</item>
<item>380</item>
<item>400</item>
<item>420</item>
<item>440</item>
<item>460</item>
<item>480</item>
<item>500</item>
<item>700</item>
<item>900</item>
<item>1100</item>
<item>1300</item>
<item>1500</item>
<item>1700</item>
<item>1900</item>
<item>2200</item>
<item>2500</item>
<item>3000</item>
<item>3500</item>
<item>4000</item>
<item>4500</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>4</item>
<item>5</item>
<item>9</item>
<item>16</item>
<item>24</item>
<item>31</item>
<item>35</item>
<item>48</item>
<item>61</item>
<item>83</item>
<item>87</item>
<item>87</item>
<item>88</item>
<item>88</item>
<item>88</item>
<item>89</item>
<item>89</item>
<item>89</item>
<item>90</item>
<item>90</item>
<item>91</item>
<item>91</item>
<item>91</item>
<item>92</item>
<item>92</item>
<item>93</item>
<item>95</item>
<item>96</item>
<item>98</item>
<item>98</item>
<item>100</item>
<item>101</item>
<item>102</item>
<item>104</item>
<item>105</item>
<item>107</item>
<item>108</item>
<item>110</item>
<item>111</item>
<item>113</item>
<item>114</item>
<item>116</item>
<item>117</item>
<item>119</item>
<item>120</item>
<item>142</item>
<item>164</item>
<item>190</item>
<item>216</item>
<item>243</item>
<item>272</item>
<item>302</item>
<item>313</item>
<item>386</item>
<item>430</item>
<item>434</item>
<item>445</item>
<item>445</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 -->
<array name="config_screenBrightnessNits">
<item>2.0</item>
<item>450.0</item>
</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>1</item>
<item>255</item>
</integer-array>
<!-- 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_dynamicHysteresisLuxLevels. 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_dynamicHysteresisLuxLevels
description for how the constraint value is chosen. -->
<integer-array name="config_dynamicHysteresisBrightLevels">
<item>200</item>
<item>200</item>
<item>200</item>
<item>200</item>
<item>200</item>
<item>200</item>
<item>200</item>
<item>200</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_dynamicHysteresisLuxLevels. 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_dynamicHysteresisLuxLevels
description for how the constraint value is chosen. -->
<integer-array name="config_dynamicHysteresisDarkLevels">
<item>800</item>
<item>800</item>
<item>800</item>
<item>800</item>
<item>800</item>
<item>500</item>
<item>500</item>
<item>500</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_dynamicHysteresisBrightLevels, and the new darkening
hysteresis constraint value is the n-th element of config_dynamicHysteresisDarkLevels.
The (zero-based) index is calculated as follows: (MAX is the largest index of the array)
condition calculated index
value < lux[0] 0
lux[n] <= value < lux[n+1] n+1
lux[MAX] <= value MAX+1 -->
<integer-array name="config_dynamicHysteresisLuxLevels">
<item>2</item>
<item>10</item>
<item>30</item>
<item>100</item>
<item>800</item>
<item>2000</item>
<item>4000</item>
</integer-array>
<!-- 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. -->
<integer name="config_screenBrightnessDim">12</integer>
<!-- Default screen brightness setting.
Must be in the range specified by minimum and maximum. -->
<integer name="config_screenBrightnessSettingDefault">536</integer>
<!-- Minimum screen brightness setting allowed by the power manager.
The user is forbidden from setting the brightness below this level. -->
<integer name="config_screenBrightnessSettingMinimum">12</integer>
<!-- 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">2000</integer>
<!-- The maximum range of gamma adjustment possible using the screen
auto-brightness adjustment setting. -->
<fraction name="config_autoBrightnessAdjustmentMaxGamma">100%</fraction>
<!-- Whether the always on display mode is available. -->
<bool name="config_dozeAlwaysOnDisplayAvailable">true</bool>
<!-- Control whether the always on display mode is enabled by default. This value will be used
during initialization when the setting is still null. -->
<bool name="config_dozeAlwaysOnEnabled">false</bool>
<!-- The properties of a UDFPS sensor in pixels, in the order listed below: -->
<integer-array name="config_udfps_sensor_props" translatable="false" >
<!--
<item>sensorLocationX</item>
<item>sensorLocationY</item>
<item>sensorRadius</item>
-->
<item>540</item>
<item>2030</item>
<item>92</item>
</integer-array>
<!-- How long it takes for the HW to start illuminating after the illumination is requested. -->
<integer name="config_udfps_illumination_transition_ms">0</integer>
</resources>

View File

@ -0,0 +1,33 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
/* //device/apps/common/assets/res/any/dimens.xml
**
** Copyright 2006, 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.
*/
-->
<resources>
<!-- Height of the status bar.
Do not read this dimen directly. Use {@link SystemBarUtils#getStatusBarHeight} instead.
-->
<dimen name="status_bar_height">81px</dimen>
<!-- Radius of the software rounded corners at the top of the display in its natural
orientation. If zero, the value of rounded_corner_radius is used. -->
<dimen name="rounded_corner_radius_top">108px</dimen>
<!-- Radius of the software rounded corners at the bottom of the display in its natural
orientation. If zero, the value of rounded_corner_radius is used. -->
<dimen name="rounded_corner_radius_bottom">124px</dimen>
</resources>

View File

@ -0,0 +1,118 @@
<?xml version="1.0" encoding="utf-8"?>
<device name="Android">
<item name="none">0</item>
<item name="screen.on">58.61</item>
<item name="screen.full">281.38</item>
<item name="bluetooth.active">10.4</item>
<item name="bluetooth.on">0.84</item>
<item name="wifi.on">0.66</item>
<item name="wifi.active">226.4</item>
<item name="wifi.scan">9.82</item>
<item name="dsp.audio">14.48</item>
<item name="dsp.video">92.05</item>
<item name="camera.flashlight">164.26</item>
<item name="camera.avg">723</item>
<item name="gps.on">77.47</item>
<item name="radio.active">204.58</item>
<item name="radio.scanning">9.78</item>
<array name="radio.on">
<value>8.96</value>
<value>8.96</value>
</array>
<item name="modem.controller.idle">0</item>
<item name="modem.controller.rx">0</item>
<item name="modem.controller.tx">0</item>
<item name="modem.controller.voltage">0</item>
<array name="cpu.clusters.cores">
<value>6</value>
<value>2</value>
</array>
<array name="cpu.core_speeds.cluster0">
<value>300000</value>
<value>576000</value>
<value>748000</value>
<value>998400</value>
<value>1209600</value>
<value>1324800</value>
<value>1516800</value>
<value>1612800</value>
<value>1780000</value>
</array>
<array name="cpu.core_power.cluster0">
<value>27.36</value>
<value>31.3</value>
<value>33.28</value>
<value>41.15</value>
<value>46.59</value>
<value>51.15</value>
<value>57.75</value>
<value>62.39</value>
<value>73.05</value>
</array>
<array name="cpu.core_speeds.cluster1">
<value>300000</value>
<value>652800</value>
<value>825600</value>
<value>979200</value>
<value>1132800</value>
<value>1363200</value>
<value>1536000</value>
<value>1747200</value>
<value>1843200</value>
<value>1996800</value>
<value>2054400</value>
<value>2169600</value>
<value>2208000</value>
<value>2304000</value>
</array>
<array name="cpu.core_power.cluster1">
<value>39.32</value>
<value>52.98</value>
<value>60.94</value>
<value>71.46</value>
<value>82.99</value>
<value>105.8</value>
<value>122.44</value>
<value>149.89</value>
<value>184.13</value>
<value>208.16</value>
<value>235.4</value>
<value>261.15</value>
<value>270.98</value>
<value>299.82</value>
</array>
<item name="cpu.idle">9.72</item>
<item name="cpu.suspend">6.44</item>
<array name="memory.bandwidths">
<value>22.7</value>
</array>
<item name="battery.capacity">3070</item>
<item name="wifi.controller.idle">0</item>
<item name="wifi.controller.rx">0</item>
<item name="wifi.controller.tx">0</item>
<array name="wifi.controller.tx_levels" />
<item name="wifi.controller.voltage">0</item>
<array name="wifi.batchedscan">
<value>.0002</value>
<value>.002</value>
<value>.02</value>
<value>.2</value>
<value>2</value>
</array>
<item name="modem.controller.sleep">0</item>
<item name="modem.controller.idle">0</item>
<item name="modem.controller.rx">0</item>
<array name="modem.controller.tx">
<value>0</value>
<value>0</value>
<value>0</value>
<value>0</value>
<value>0</value>
</array>
<item name="modem.controller.voltage">0</item>
<array name="gps.signalqualitybased">
<value>0</value>
<value>0</value>
</array>
<item name="gps.voltage">0</item>
</device>

View File

@ -0,0 +1,34 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
/*
** Copyright 2020, The LineageOS 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.
*/
-->
<!-- These resources are around just to allow their values to be customized
for different hardware and product builds. -->
<resources>
<!-- Default rounded corner curve (a Bezier). Must match (the curved path in) rounded.xml.
Note that while rounded.xml includes the entire path (including the horizontal and vertical
corner edges), this pulls out just the curve.
-->
<string name="config_rounded_mask" translatable="false">M122,0 C71.76,3.59 52.03,8.07 29.6,29.6 8.07,52.03 3.59,71.76 0,122</string>
<!-- Allow CornerHandleView and PathSpecCornerPathRenderer to decouple from corner-radius -->
<dimen name="config_rounded_mask_size">122px</dimen>
<!-- The radius of the enrollment progress bar, in dp -->
<integer name="config_udfpsEnrollProgressBar" translatable="false">97</integer>
</resources>

View File

@ -0,0 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
* Copyright (c) 2006, 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.
*/
-->
<resources>
<!-- Height of the status bar header bar when on Keyguard -->
<dimen name="status_bar_header_height_keyguard">@*android:dimen/status_bar_height</dimen>
</resources>