mirror of
https://github.com/Anything-at-25-00/android_device_tecno_LG8n.git
synced 2024-11-22 21:56:26 -08:00
X6833B: overlay: Add brightness and power profile configs from stock
Signed-off-by: dodyirawan85 <40514988+dodyirawan85@users.noreply.github.com>
This commit is contained in:
parent
5f632b55a9
commit
69fc1fe174
|
@ -213,6 +213,10 @@ PRODUCT_COPY_FILES += \
|
|||
$(LOCAL_PATH)/configs/nfc/libnfc-slm.conf:$(TARGET_COPY_OUT_VENDOR)/etc/libnfc-slm.conf \
|
||||
$(LOCAL_PATH)/configs/nfc/libnfc-nxp_RF.conf:$(TARGET_COPY_OUT_VENDOR)/libnfc-nxp_RF.conf
|
||||
|
||||
# Overlays
|
||||
PRODUCT_PACKAGES += \
|
||||
FrameworksResOverlay
|
||||
|
||||
# Permissions
|
||||
PRODUCT_COPY_FILES += \
|
||||
frameworks/native/data/etc/android.hardware.audio.low_latency.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.audio.low_latency.xml \
|
||||
|
|
12
overlay/FrameworksResOverlay/Android.bp
Normal file
12
overlay/FrameworksResOverlay/Android.bp
Normal file
|
@ -0,0 +1,12 @@
|
|||
//
|
||||
// Copyright (C) 2023 LineageOS
|
||||
//
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
|
||||
runtime_resource_overlay {
|
||||
name: "FrameworksResOverlay",
|
||||
sdk_version: "current",
|
||||
product_specific: true,
|
||||
resource_dirs: ["res"]
|
||||
}
|
18
overlay/FrameworksResOverlay/AndroidManifest.xml
Normal file
18
overlay/FrameworksResOverlay/AndroidManifest.xml
Normal file
|
@ -0,0 +1,18 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright (C) 2023 LineageOS
|
||||
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.
|
||||
-->
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.android.frameworksres.overlay">
|
||||
|
||||
<application android:hasCode="false" />
|
||||
<overlay android:targetPackage="android" android:isStatic="true" android:priority="1" />
|
||||
</manifest>
|
218
overlay/FrameworksResOverlay/res/values/config.xml
Normal file
218
overlay/FrameworksResOverlay/res/values/config.xml
Normal file
|
@ -0,0 +1,218 @@
|
|||
<?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. Do not translate.
|
||||
NOTE: The naming convention is "config_camelCaseValue". Some legacy
|
||||
entries do not follow the convention, but all new entries should. -->
|
||||
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
|
||||
|
||||
<!-- 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>
|
||||
|
||||
<!-- 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>100</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>200</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 -->
|
||||
<array name="config_autoBrightnessDisplayValuesNits">
|
||||
<item>4.522</item>
|
||||
<item>20.246</item>
|
||||
<item>55.509</item>
|
||||
<item>74.653</item>
|
||||
<item>82.757</item>
|
||||
<item>93.15</item>
|
||||
<item>117.678</item>
|
||||
<item>138.666</item>
|
||||
<item>164.847</item>
|
||||
<item>189.157</item>
|
||||
<item>207.656</item>
|
||||
<item>221.191</item>
|
||||
<item>277.164</item>
|
||||
<item>350.798</item>
|
||||
<item>391.524</item>
|
||||
<item>414.81</item>
|
||||
<item>434.151</item>
|
||||
<item>455.291</item>
|
||||
<item>490.922</item>
|
||||
<item>500</item>
|
||||
<item>580</item>
|
||||
</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>15</item>
|
||||
<item>30</item>
|
||||
<item>45</item>
|
||||
<item>60</item>
|
||||
<item>75</item>
|
||||
<item>90</item>
|
||||
<item>105</item>
|
||||
<item>120</item>
|
||||
<item>135</item>
|
||||
<item>150</item>
|
||||
<item>165</item>
|
||||
<item>180</item>
|
||||
<item>195</item>
|
||||
<item>210</item>
|
||||
<item>225</item>
|
||||
<item>240</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 -->
|
||||
<array name="config_screenBrightnessNits">
|
||||
<item>4.5215</item>
|
||||
<item>33.37784</item>
|
||||
<item>69.09702</item>
|
||||
<item>105.53111</item>
|
||||
<item>141.15657</item>
|
||||
<item>177.40657</item>
|
||||
<item>212.14172</item>
|
||||
<item>247.64085</item>
|
||||
<item>282.03754</item>
|
||||
<item>317.2586</item>
|
||||
<item>351.1292</item>
|
||||
<item>384.87363</item>
|
||||
<item>418.19705</item>
|
||||
<item>451.90884</item>
|
||||
<item>485.0235</item>
|
||||
<item>517.10864</item>
|
||||
<item>548.933</item>
|
||||
<item>580</item>
|
||||
</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>6</item>
|
||||
<item>18</item>
|
||||
<item>34</item>
|
||||
<item>82</item>
|
||||
<item>128</item>
|
||||
<item>256</item>
|
||||
<item>384</item>
|
||||
<item>512</item>
|
||||
<item>640</item>
|
||||
<item>768</item>
|
||||
<item>896</item>
|
||||
<item>1536</item>
|
||||
<item>2560</item>
|
||||
<item>3584</item>
|
||||
<item>4608</item>
|
||||
<item>5632</item>
|
||||
<item>7168</item>
|
||||
<item>8192</item>
|
||||
<item>8704</item>
|
||||
<item>9728</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_screenThresholdLevels. The brightening threshold is calculated as
|
||||
screenBrightness * (1.0f + CONSTRAINT_VALUE). When the new screen brightness is higher
|
||||
than this threshold, it is applied. See the config_screenThresholdLevels description for
|
||||
how the constraint value is chosen. -->
|
||||
<integer-array name="config_screenBrighteningThresholds">
|
||||
<item>100</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_screenThresholdLevels. The darkening threshold is calculated as
|
||||
screenBrightness * (1.0f - CONSTRAINT_VALUE). When the new screen brightness is lower than
|
||||
this threshold, it is applied. See the config_screenThresholdLevels description for how
|
||||
the constraint value is chosen. -->
|
||||
<integer-array name="config_screenDarkeningThresholds">
|
||||
<item>200</item>
|
||||
</integer-array>
|
||||
|
||||
<!-- Minimum screen brightness setting allowed by power manager.
|
||||
The user is forbidden from setting the brightness below this level. -->
|
||||
<item name="config_screenBrightnessSettingMinimumFloat" format="float" type="dimen">0.003921569</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. -->
|
||||
<item name="config_screenBrightnessSettingDefaultFloat" format="float" type="dimen">0.4</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">2000</integer>
|
||||
<integer name="config_autoBrightnessDarkeningLightDebounce">3000</integer>
|
||||
</resources>
|
207
overlay/FrameworksResOverlay/res/xml/power_profile.xml
Normal file
207
overlay/FrameworksResOverlay/res/xml/power_profile.xml
Normal file
|
@ -0,0 +1,207 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<device name="Android">
|
||||
<item name="ambient.on">0.1</item>
|
||||
<item name="screen.on">64.45</item>
|
||||
<item name="screen.full">383.95</item>
|
||||
<item name="bluetooth.active">9</item>
|
||||
<item name="bluetooth.on">0.8</item>
|
||||
<item name="wifi.on">0.1</item>
|
||||
<item name="wifi.active">254.73</item>
|
||||
<item name="wifi.scan">39.5</item>
|
||||
<item name="audio">40.2</item>
|
||||
<item name="video">91.1</item>
|
||||
<item name="camera.flashlight">237.4</item>
|
||||
<item name="camera.avg">1038.4</item>
|
||||
<item name="gps.on">24.5</item>
|
||||
<item name="radio.active">15</item>
|
||||
<item name="radio.scanning">40</item>
|
||||
<array name="radio.on">
|
||||
<value>3.3</value>
|
||||
<value>3.3</value>
|
||||
</array>
|
||||
<array name="cpu.clusters.cores">
|
||||
<value>6</value>
|
||||
<value>2</value>
|
||||
</array>
|
||||
<array name="cpu.speeds.cluster0">
|
||||
<value>500000</value>
|
||||
<value>774000</value>
|
||||
<value>875000</value>
|
||||
<value>975000</value>
|
||||
<value>1075000</value>
|
||||
<value>1175000</value>
|
||||
<value>1275000</value>
|
||||
<value>1375000</value>
|
||||
<value>1500000</value>
|
||||
<value>1618000</value>
|
||||
<value>1666000</value>
|
||||
<value>1733000</value>
|
||||
<value>1800000</value>
|
||||
<value>1866000</value>
|
||||
<value>1933000</value>
|
||||
<value>2000000</value>
|
||||
</array>
|
||||
<array name="cpu.speeds.cluster1">
|
||||
<value>774000</value>
|
||||
<value>835000</value>
|
||||
<value>919000</value>
|
||||
<value>1002000</value>
|
||||
<value>1085000</value>
|
||||
<value>1169000</value>
|
||||
<value>1308000</value>
|
||||
<value>1419000</value>
|
||||
<value>1530000</value>
|
||||
<value>1670000</value>
|
||||
<value>1733000</value>
|
||||
<value>1796000</value>
|
||||
<value>1860000</value>
|
||||
<value>1923000</value>
|
||||
<value>1986000</value>
|
||||
<value>2050000</value>
|
||||
</array>
|
||||
<array name="cpu.active.cluster0">
|
||||
<value>6.76</value>
|
||||
<value>9.47</value>
|
||||
<value>11.18</value>
|
||||
<value>12.95</value>
|
||||
<value>15.27</value>
|
||||
<value>18.73</value>
|
||||
<value>22.00</value>
|
||||
<value>25.15</value>
|
||||
<value>30.29</value>
|
||||
<value>35.78</value>
|
||||
<value>38.37</value>
|
||||
<value>41.35</value>
|
||||
<value>45.00</value>
|
||||
<value>49.04</value>
|
||||
<value>53.58</value>
|
||||
<value>55.65</value>
|
||||
</array>
|
||||
<array name="cpu.active.cluster1">
|
||||
<value>34.42</value>
|
||||
<value>36.76</value>
|
||||
<value>42.69</value>
|
||||
<value>49.41</value>
|
||||
<value>56.50</value>
|
||||
<value>69.44</value>
|
||||
<value>80.24</value>
|
||||
<value>107.99</value>
|
||||
<value>129.97</value>
|
||||
<value>156.56</value>
|
||||
<value>168.90</value>
|
||||
<value>176.07</value>
|
||||
<value>178.23</value>
|
||||
<value>200.59</value>
|
||||
<value>203.88</value>
|
||||
<value>210.66</value>
|
||||
</array>
|
||||
<item name="cpu.idle">7.2</item>
|
||||
<item name="cpu.suspend">5</item>
|
||||
<item name="cpu.active">9.89</item>
|
||||
<item name="cpu.cluster_power.cluster0">2.11</item>
|
||||
<item name="cpu.cluster_power.cluster1">2.22</item>
|
||||
<array name="cpu.core_speeds.cluster0">
|
||||
<value>500000</value>
|
||||
<value>774000</value>
|
||||
<value>875000</value>
|
||||
<value>975000</value>
|
||||
<value>1075000</value>
|
||||
<value>1175000</value>
|
||||
<value>1275000</value>
|
||||
<value>1375000</value>
|
||||
<value>1500000</value>
|
||||
<value>1618000</value>
|
||||
<value>1666000</value>
|
||||
<value>1733000</value>
|
||||
<value>1800000</value>
|
||||
<value>1866000</value>
|
||||
<value>1933000</value>
|
||||
<value>2000000</value>
|
||||
</array>
|
||||
<array name="cpu.core_speeds.cluster1">
|
||||
<value>774000</value>
|
||||
<value>835000</value>
|
||||
<value>919000</value>
|
||||
<value>1002000</value>
|
||||
<value>1085000</value>
|
||||
<value>1169000</value>
|
||||
<value>1308000</value>
|
||||
<value>1419000</value>
|
||||
<value>1530000</value>
|
||||
<value>1670000</value>
|
||||
<value>1733000</value>
|
||||
<value>1796000</value>
|
||||
<value>1860000</value>
|
||||
<value>1923000</value>
|
||||
<value>1986000</value>
|
||||
<value>2050000</value>
|
||||
</array>
|
||||
<array name="cpu.core_power.cluster0">
|
||||
<value>6.76</value>
|
||||
<value>9.47</value>
|
||||
<value>11.18</value>
|
||||
<value>12.95</value>
|
||||
<value>15.27</value>
|
||||
<value>18.73</value>
|
||||
<value>22.00</value>
|
||||
<value>25.15</value>
|
||||
<value>30.29</value>
|
||||
<value>35.78</value>
|
||||
<value>38.37</value>
|
||||
<value>41.35</value>
|
||||
<value>45.00</value>
|
||||
<value>49.04</value>
|
||||
<value>53.58</value>
|
||||
<value>55.65</value>
|
||||
</array>
|
||||
<array name="cpu.core_power.cluster1">
|
||||
<value>34.42</value>
|
||||
<value>36.76</value>
|
||||
<value>42.69</value>
|
||||
<value>49.41</value>
|
||||
<value>56.50</value>
|
||||
<value>69.44</value>
|
||||
<value>80.24</value>
|
||||
<value>107.99</value>
|
||||
<value>129.97</value>
|
||||
<value>156.56</value>
|
||||
<value>168.90</value>
|
||||
<value>176.07</value>
|
||||
<value>178.23</value>
|
||||
<value>200.59</value>
|
||||
<value>203.88</value>
|
||||
<value>210.66</value>
|
||||
</array>
|
||||
<array name="memory.bandwidths">
|
||||
<value>22.7</value>
|
||||
</array>
|
||||
<item name="battery.capacity">5000</item>
|
||||
<item name="wifi.controller.idle">15.2</item>
|
||||
<item name="wifi.controller.rx">296.22</item>
|
||||
<item name="wifi.controller.tx">426.91</item>
|
||||
<array name="wifi.controller.tx_levels" />
|
||||
<item name="wifi.controller.voltage">4.0</item>
|
||||
<array name="wifi.batchedscan">
|
||||
<value>30.7</value>
|
||||
<value>30.7</value>
|
||||
<value>30.7</value>
|
||||
<value>30.7</value>
|
||||
<value>30.7</value>
|
||||
</array>
|
||||
<item name="modem.controller.sleep">0</item>
|
||||
<item name="modem.controller.idle">96.36</item>
|
||||
<item name="modem.controller.rx">676.3</item>
|
||||
<array name="modem.controller.tx">
|
||||
<value>676.3</value>
|
||||
<value>430.7</value>
|
||||
<value>157.3</value>
|
||||
<value>111.2</value>
|
||||
<value>106.4</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>
|
Loading…
Reference in a new issue