Merge pull request #450 from ponces/dev-renoir

Improve Mi 11 Lite 5G overlay
This commit is contained in:
Pierre-Hugues HUSSON 2022-01-28 15:49:34 +01:00 committed by GitHub
commit 4a59d680ff
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 367 additions and 147 deletions

View file

@ -1,8 +0,0 @@
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE_TAGS := optional
LOCAL_PACKAGE_NAME := treble-overlay-xiaomi-mi11lite5g-settings
LOCAL_MODULE_PATH := $(TARGET_OUT_PRODUCT)/overlay
LOCAL_IS_RUNTIME_RESOURCE_OVERLAY := true
LOCAL_PRIVATE_PLATFORM_APIS := true
include $(BUILD_PACKAGE)

View file

@ -1,11 +0,0 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="me.phh.treble.overlay.xiaomi.mi11lite5g.settings"
android:versionCode="1"
android:versionName="1.0">
<application android:extractNativeLibs="false"/>
<overlay android:targetPackage="com.android.settings"
android:requiredSystemPropertyName="ro.vendor.build.fingerprint"
android:requiredSystemPropertyValue="+*iaomi/renoir*"
android:priority="911"
android:isStatic="true" />
</manifest>

View file

@ -1,28 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
/*
** Copyright 2017, 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>
<!-- Indicates whether device has a power button fingerprint sensor. -->
<bool name="config_is_powerbutton_fps" translatable="false">true</bool>
<!-- Whether or not the device is capable of multiple levels of vibration intensity.
Note that this is different from whether it can control the vibration amplitude as some
devices will be able to vary their amplitude but do not possess enough dynamic range to
have distinct intensity levels -->
<bool name="config_vibration_supports_multiple_intensities">true</bool>
</resources>

View file

@ -17,43 +17,150 @@
*/ */
--> -->
<resources> <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">M 0,0 H 144 V 104 H 0 V 0 Z @left</string>
<!-- Height of the status bar in portrait. The height should be
Max((status bar content height + waterfall top size), top cutout size) -->
<dimen name="status_bar_height_portrait">104px</dimen>
<!-- Whether a software navigation bar should be shown. NOTE: in the future this may be
autodetected from the Configuration. -->
<bool name="config_showNavigationBar">true</bool>
<!-- This string array should be overridden by the device to present a list of network
attributes. This is used by the connectivity manager to decide which networks can coexist
based on the hardware -->
<!-- An Array of "[Connection name],[ConnectivityManager.TYPE_xxxx],
[associated radio-type],[priority],[restoral-timer(ms)],[dependencyMet] -->
<!-- the 5th element "resore-time" indicates the number of milliseconds to delay
before automatically restore the default connection. Set -1 if the connection
does not require auto-restore. -->
<!-- the 6th element indicates boot-time dependency-met value. -->
<string-array name="networkAttributes">
<item>wifi,1,1,1,-1,true</item>
<item>mobile,0,0,0,-1,true</item>
<item>mobile_mms,2,0,4,60000,true</item>
<item>mobile_supl,3,0,2,60000,true</item>
<item>mobile_dun,4,0,2,60000,true</item>
<item>mobile_hipri,5,0,3,60000,true</item>
<item>mobile_fota,10,0,2,60000,true</item>
<item>mobile_ims,11,0,2,60000,true</item>
<item>mobile_cbs,12,0,2,60000,true</item>
<item>bluetooth,7,7,2,-1,true</item>
<item>mobile_emergency,15,0,5,-1,true</item>
<item>ethernet,9,9,9,-1,true</item>
<item>wifi_slave,30,1,1,-1,true</item>
</string-array>
<!-- Configure mobile tcp buffer sizes in the form:
rat-name:rmem_min,rmem_def,rmem_max,wmem_min,wmem_def,wmem_max
If no value is found for the rat-name in use, the system default will be applied. -->
<string-array name="config_mobile_tcp_buffers">
<item>5gnr:2097152,6291456,16777216,512000,2097152,8388608</item>
<item>lte:2097152,4194304,8388608,262144,524288,1048576</item>
<item>lte_ca:4096,6291456,12582912,4096,1048576,2097152</item>
<item>umts:4094,87380,1220608,4096,16384,1220608</item>
<item>hspa:4094,87380,1220608,4096,16384,1220608</item>
<item>hsupa:4094,87380,1220608,4096,16384,1220608</item>
<item>hsdpa:4094,87380,1220608,4096,16384,1220608</item>
<item>hspap:4094,87380,1220608,4096,16384,1220608</item>
<item>edge:4093,26280,35040,4096,16384,35040</item>
<item>gprs:4092,8760,11680,4096,8760,11680</item>
<item>evdo:4094,87380,524288,4096,16384,262144</item>
</string-array>
<!-- This string array should be overridden by the device to present a list of radio
attributes. This is used by the connectivity manager to decide which networks can coexist
based on the hardware -->
<!-- An Array of "[ConnectivityManager connectionType],
[# simultaneous connection types]" -->
<string-array name="radioAttributes">
<item>"1,1"</item>
<item>"0,1"</item>
<item>"7,1"</item>
</string-array>
<!-- String indicating the package name of the device ImsService implementation for RCS. -->
<string name="config_ims_package">org.codeaurora.ims</string> <string name="config_ims_package">org.codeaurora.ims</string>
<bool name="config_dynamic_bind_ims">true</bool>
<!-- Flag specifying whether or not IMS will use the ImsResolver dynamically -->
<bool name="config_dynamic_bind_ims">true</bool>
<!-- Flag specifying whether VoLTE should be available for carrier: independent of
carrier provisioning. If false: hard disabled. If true: then depends on carrier
provisioning, availability etc -->
<bool name="config_carrier_volte_available">true</bool> <bool name="config_carrier_volte_available">true</bool>
<!-- Flag specifying whether VoLTE is available on device -->
<bool name="config_device_volte_available">true</bool> <bool name="config_device_volte_available">true</bool>
<!-- Flag specifying whether VoLTE is available on device -->
<bool name="config_device_vt_available">true</bool>
<!-- Flag specifying whether WFC over IMS is available on device -->
<bool name="config_device_wfc_ims_available">true</bool> <bool name="config_device_wfc_ims_available">true</bool>
<!-- Flag specifying whether WFC over IMS should be available for carrier: independent of
carrier provisioning. If false: hard disabled. If true: then depends on carrier
provisioning, availability etc -->
<bool name="config_carrier_wfc_ims_available">true</bool>
<!-- Boolean indicating if restoring network selection should be skipped -->
<!-- The restoring is handled by modem if it is true-->
<bool name="skip_restoring_network_selection">true</bool> <bool name="skip_restoring_network_selection">true</bool>
<!-- Config determines whether to update phone object when voice registration
state changes. Voice radio tech change will always trigger an update of
phone object irrespective of this config -->
<bool name="config_switch_phone_on_voice_reg_state_change">false</bool>
<!-- Is the device capable of hot swapping an ICC Card -->
<bool name="config_hotswapCapable">true</bool>
<!-- If true, the display will be shifted around in ambient mode. --> <!-- If true, the display will be shifted around in ambient mode. -->
<bool name="config_enableBurnInProtection">true</bool> <bool name="config_enableBurnInProtection">true</bool>
<!-- Specifies the maximum burn-in offset displacement from the center. If -1, no maximum value <!-- When true use the linux /dev/input/event subsystem to detect the switch changes
will be used. --> on the headphone/microphone jack. When false use the older uevent framework. -->
<integer name="config_burnInProtectionMaxRadius">70</integer> <bool name="config_useDevInputEventForAudioJack">true</bool>
<!-- Specifies the minimum burn-in offset horizontally. --> <!-- Is the notification LED intrusive? Used to decide if there should be a disable option -->
<integer name="config_burnInProtectionMinHorizontalOffset">-15</integer> <bool name="config_intrusiveNotificationLed">true</bool>
<!-- Specifies the maximum burn-in offset horizontally. --> <!-- Whether the Unprocessed audio source supports the required frequency range and level -->
<integer name="config_burnInProtectionMaxHorizontalOffset">15</integer> <bool name="config_supportAudioSourceUnprocessed">true</bool>
<!-- Specifies the minimum burn-in offset vertically. --> <!-- Idle current for bluetooth controller. 0 by default-->
<integer name="config_burnInProtectionMinVerticalOffset">-40</integer> <integer name="config_bluetooth_idle_cur_ma">6</integer>
<!-- Specifies the maximum burn-in offset vertically. --> <!-- Rx current for bluetooth controller. 0 by default-->
<integer name="config_burnInProtectionMaxVerticalOffset">40</integer> <integer name="config_bluetooth_rx_cur_ma">28</integer>
<!-- Indicate whether closing the lid causes the device to go to sleep and opening <!-- Tx current for bluetooth controller. 0 by default-->
it causes the device to wake up. <integer name="config_bluetooth_tx_cur_ma">36</integer>
The default is false. -->
<bool name="config_lidControlsSleep">true</bool>
<!-- Indicate whether to allow the device to suspend when the screen is off <!-- Operating voltage for bluetooth controller. 0 by default-->
due to the proximity sensor. This resource should only be set to true <integer name="config_bluetooth_operating_voltage_mv">3700</integer>
if the sensor HAL correctly handles the proximity sensor as a wake-up source.
Otherwise, the device may fail to wake out of suspend reliably. <!-- Should the pinner service pin the Camera application? -->
The default is false. --> <bool name="config_pinnerCameraApp">true</bool>
<bool name="config_suspendWhenScreenOffDueToProximity">true</bool>
<!-- Should the pinner service pin the Home application? -->
<bool name="config_pinnerHomeApp">true</bool>
<!-- The default peak refresh rate for a given device. Change this value if you want to prevent <!-- 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 the framework from using higher refresh rates, even if display modes with higher refresh
@ -61,9 +168,6 @@
non-zero. --> non-zero. -->
<integer name="config_defaultPeakRefreshRate">90</integer> <integer name="config_defaultPeakRefreshRate">90</integer>
<!-- Radius of the software rounded corners. -->
<dimen name="rounded_corner_radius">103px</dimen>
<!-- Boolean indicating whether the HWC setColorTransform function can be performed efficiently <!-- Boolean indicating whether the HWC setColorTransform function can be performed efficiently
in hardware. --> in hardware. -->
<bool name="config_setColorTransformAccelerated">true</bool> <bool name="config_setColorTransformAccelerated">true</bool>
@ -84,60 +188,46 @@
--> -->
<bool name="config_powerDecoupleAutoSuspendModeFromDisplay">true</bool> <bool name="config_powerDecoupleAutoSuspendModeFromDisplay">true</bool>
<!-- Vibrator pattern for feedback about a long screen/key press --> <!-- Power Management: Specifies whether to decouple the interactive state of the
<integer-array name="config_longPressVibePattern"> device from the display on/off state.
<item>0</item> When false, setInteractive(..., true) will be called before the display is turned on
<item>12</item> and setInteractive(..., false) will be called after the display is turned off.
<item>7</item> This mode provides best compatibility for devices that expect the interactive
</integer-array> state to be tied to the display state.
When true, setInteractive(...) will be called independently of whether the display
is being turned on or off. This mode enables the power manager to reduce
clocks and disable the touch controller while the display is on.
This resource should be set to "true" when a doze component has been specified
to maximize power savings but not all devices support it.
Refer to power.h for details. -->
<bool name="config_powerDecoupleInteractiveModeFromDisplay">false</bool>
<!-- Vibrator pattern for feedback about touching a virtual key --> <!-- If true, the doze component is not started until after the screen has been
<integer-array name="config_virtualKeyVibePattern"> turned off and the screen off animation has been performed. -->
<item>0</item> <bool name="config_dozeAfterScreenOffByDefault">true</bool>
<item>12</item>
<item>7</item>
</integer-array>
<!-- Vibrator pattern for a very short but reliable vibration for soft keyboard tap --> <!-- Enable doze alwaysOn Display -->
<integer-array name="config_keyboardTapVibePattern"> <bool name="config_dozeAlwaysOnDisplayAvailable">true</bool>
<item>10</item>
</integer-array>
<integer-array name="config_defaultNotificationVibePattern"> <!-- Doze: should the TYPE_PICK_UP_GESTURE sensor be used as a pulse signal. -->
<item>0</item> <bool name="config_dozePulsePickup">true</bool>
<item>180</item>
<item>80</item>
<item>180</item>
</integer-array>
<integer-array name="config_notificationFallbackVibePattern">
<item>0</item>
<item>100</item>
<item>150</item>
<item>100</item>
</integer-array>
<!-- Minimum screen brightness setting allowed by the power manager.
The user is forbidden from setting the brightness below this level. -->
<integer name="config_screenBrightnessSettingMinimum">2</integer>
<!-- Maximum screen brightness setting allowed by the power manager.
The user is forbidden from setting the brightness above this level. -->
<integer name="config_screenBrightnessSettingMaximum">255</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. -->
<integer name="config_screenBrightnessDim">10</integer>
<!-- Screen brightness used to dim the screen while dozing in a very low power state. <!-- Screen brightness used to dim the screen while dozing in a very low power state.
May be less than the minimum allowed brightness setting May be less than the minimum allowed brightness setting
that can be set by the user. --> that can be set by the user. -->
<integer name="config_screenBrightnessDoze">17</integer> <integer name="config_screenBrightnessDoze">17</integer>
<!-- Default screen brightness setting. <!-- Flag indicating whether the we should enable the automatic brightness in Settings.
Must be in the range specified by minimum and maximum. --> Software implementation will be used if config_hardware_auto_brightness_available is not set -->
<integer name="config_screenBrightnessSettingDefault">102</integer> <bool name="config_automatic_brightness_available">true</bool>
<!-- True if the display hardware only has brightness buckets rather than a full range of
backlight values -->
<bool name="config_displayBrightnessBucketsInDoze">true</bool>
<!-- The maximum range of gamma adjustment possible using the screen
auto-brightness adjustment setting. -->
<fraction name="config_autoBrightnessAdjustmentMaxGamma">100%</fraction>
<!-- Stability requirements in milliseconds for accepting a new brightness level. This is used <!-- 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 for debouncing the light sensor. Different constants are used to debounce the light sensor
@ -166,22 +256,111 @@
<integer-array name="config_autoBrightnessLevels"> <integer-array name="config_autoBrightnessLevels">
<item>1</item> <item>1</item>
<item>2</item> <item>2</item>
<item>3</item>
<item>4</item> <item>4</item>
<item>6</item>
<item>8</item> <item>8</item>
<item>12</item> <item>10</item>
<item>15</item>
<item>20</item> <item>20</item>
<item>33</item> <item>25</item>
<item>30</item>
<item>35</item>
<item>40</item>
<item>45</item>
<item>50</item>
<item>55</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>90</item>
<item>148</item> <item>95</item>
<item>245</item> <item>100</item>
<item>403</item> <item>120</item>
<item>665</item> <item>140</item>
<item>1097</item> <item>160</item>
<item>1808</item> <item>180</item>
<item>2981</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>2000</item>
<item>2500</item>
<item>3000</item>
<item>3500</item>
<item>4000</item>
<item>4500</item>
<item>5000</item> <item>5000</item>
<item>5500</item>
<item>6000</item>
<item>6500</item>
<item>7000</item>
<item>7500</item>
<item>8000</item>
<item>8500</item>
<item>9000</item>
<item>9500</item>
<item>10000</item>
<item>10500</item>
<item>11000</item>
<item>11500</item>
<item>12000</item>
<item>12500</item>
<item>13000</item>
<item>13500</item>
<item>14000</item>
<item>14500</item>
<item>15000</item>
<item>16000</item>
<item>17000</item>
<item>18000</item>
<item>19000</item>
<item>20000</item>
<item>21000</item>
<item>22000</item>
<item>23000</item>
<item>24000</item>
<item>25000</item>
<item>26000</item>
<item>27000</item>
<item>28000</item>
<item>29000</item>
<item>30000</item>
<item>35000</item>
<item>40000</item>
<item>45000</item>
<item>50000</item>
<item>55000</item>
<item>60000</item>
<item>65000</item>
<item>70000</item>
<item>75000</item>
<item>80000</item>
<item>85000</item>
<item>90000</item>
<item>95000</item>
<item>100000</item>
</integer-array> </integer-array>
<!-- Array of desired screen brightness in nits corresponding to the lux values <!-- Array of desired screen brightness in nits corresponding to the lux values
@ -196,25 +375,114 @@
array. The brightness values must be non-negative and non-decreasing. This must be array. The brightness values must be non-negative and non-decreasing. This must be
overridden in platform specific overlays --> overridden in platform specific overlays -->
<array name="config_autoBrightnessDisplayValuesNits"> <array name="config_autoBrightnessDisplayValuesNits">
<item>10.45935</item> <!-- 0-1 --> <item>4.5</item>
<item>29.25559</item> <!-- 1-2 --> <item>6.6</item>
<item>34.240692</item> <!-- 2-3 --> <item>8.0</item>
<item>37.514347</item> <!-- 3-4 --> <item>20.0</item>
<item>40.018696</item> <!-- 4-8 --> <item>24.3</item>
<item>46.885098</item> <!-- 8-12 --> <item>29.7</item>
<item>51.626434</item> <!-- 12-20 --> <item>34.0</item>
<item>58.610405</item> <!-- 20-33 --> <item>46.0</item>
<item>66.890915</item> <!-- 33-55 --> <item>59.0</item>
<item>77.61644</item> <!-- 55-90 --> <item>76.0</item>
<item>90.221886</item> <!-- 90-148 --> <item>81.0</item>
<item>105.80314</item> <!-- 148-245 --> <item>82.0</item>
<item>126.073845</item> <!-- 245-403 --> <item>82.0</item>
<item>154.16931</item> <!-- 403-665 --> <item>82.0</item>
<item>191.83717</item> <!-- 665-1097 --> <item>83.0</item>
<item>240.74442</item> <!-- 1097-1808 --> <item>83.0</item>
<item>294.84857</item> <!-- 1808-2981 --> <item>83.0</item>
<item>348.05453</item> <!-- 2981-5000 --> <item>84.0</item>
<item>389.70</item> <!-- 5000+ --> <item>84.0</item>
<item>85.0</item>
<item>85.0</item>
<item>85.0</item>
<item>85.0</item>
<item>86.0</item>
<item>86.0</item>
<item>87.0</item>
<item>89.0</item>
<item>90.0</item>
<item>91.0</item>
<item>93.0</item>
<item>94.0</item>
<item>96.0</item>
<item>97.0</item>
<item>99.0</item>
<item>100.0</item>
<item>101.0</item>
<item>104.0</item>
<item>105.0</item>
<item>106.0</item>
<item>108.0</item>
<item>109.0</item>
<item>111.0</item>
<item>112.0</item>
<item>114.0</item>
<item>116.0</item>
<item>137.0</item>
<item>157.0</item>
<item>180.0</item>
<item>205.0</item>
<item>226.0</item>
<item>257.0</item>
<item>280.0</item>
<item>295.0</item>
<item>369.0</item>
<item>400.0</item>
<item>416.7</item>
<item>433.3</item>
<item>450.0</item>
<item>466.7</item>
<item>483.3</item>
<item>500.0</item>
<item>512.5</item>
<item>525.0</item>
<item>537.5</item>
<item>550.0</item>
<item>562.5</item>
<item>575.0</item>
<item>587.5</item>
<item>600.0</item>
<item>610.0</item>
<item>620.0</item>
<item>630.0</item>
<item>640.0</item>
<item>650.0</item>
<item>660.0</item>
<item>670.0</item>
<item>680.0</item>
<item>690.0</item>
<item>700.0</item>
<item>705.0</item>
<item>710.0</item>
<item>715.0</item>
<item>720.0</item>
<item>725.0</item>
<item>730.0</item>
<item>735.0</item>
<item>740.0</item>
<item>745.0</item>
<item>750.0</item>
<item>755.0</item>
<item>760.0</item>
<item>765.0</item>
<item>770.0</item>
<item>775.0</item>
<item>800.0</item>
<item>816.7</item>
<item>833.3</item>
<item>850.0</item>
<item>866.7</item>
<item>883.3</item>
<item>900.0</item>
<item>914.3</item>
<item>928.6</item>
<item>942.9</item>
<item>957.1</item>
<item>971.4</item>
<item>985.7</item>
<item>1000.0</item>
</array> </array>
<!-- An array describing the screen's backlight values corresponding to the brightness <!-- An array describing the screen's backlight values corresponding to the brightness

View file

@ -174,7 +174,6 @@ PRODUCT_PACKAGES += \
treble-overlay-vsmart-live \ treble-overlay-vsmart-live \
treble-overlay-wifi5g \ treble-overlay-wifi5g \
treble-overlay-xiaomi-mi11lite5g \ treble-overlay-xiaomi-mi11lite5g \
treble-overlay-xiaomi-mi11lite5g-settings \
treble-overlay-xiaomi-mi6x \ treble-overlay-xiaomi-mi6x \
treble-overlay-xiaomi-mi8 \ treble-overlay-xiaomi-mi8 \
treble-overlay-xiaomi-mi8ee \ treble-overlay-xiaomi-mi8ee \