[Motorola One Fusion+] Add overlay

This commit is contained in:
Jesus R 2022-03-08 11:22:19 -06:00
parent d581f730ac
commit d82dc4112f
6 changed files with 281 additions and 0 deletions

View file

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

View file

@ -0,0 +1,10 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="me.phh.treble.overlay.moto.onefusionplus"
android:versionCode="1"
android:versionName="1.0">
<overlay android:targetPackage="android"
android:requiredSystemPropertyName="ro.product.vendor.device"
android:requiredSystemPropertyValue="liber"
android:priority="362"
android:isStatic="true" />
</manifest>

View file

@ -0,0 +1,142 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
/*
** Copyright 2012, 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 xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<!-- 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>
<item>10000</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 -->
<array name="config_autoBrightnessDisplayValuesNits">
<item>5.139055</item> <!-- 0 - 1 -->
<item>9.962018965</item> <!-- 1 - 2 -->
<item>18.34822964</item> <!-- 2 - 3 -->
<item>21.55068128</item> <!-- 3 - 4 -->
<item>24.0167788</item> <!-- 4 - 8 -->
<item>30.62162162</item> <!-- 8 - 12 -->
<item>35.09486396</item> <!-- 12 - 20 -->
<item>41.2249643</item> <!-- 20 - 33 -->
<item>47.6760716</item> <!-- 33 - 55 -->
<item>55.73002427</item> <!-- 55 - 90 -->
<item>66.24126116</item> <!-- 90 - 148 -->
<item>79.67614115</item> <!-- 148 - 245 -->
<item>98.04727274</item> <!-- 245 - 403 -->
<item>125.1221991</item> <!-- 403 - 665 -->
<item>161.6875093</item> <!-- 665 - 1097 -->
<item>208.4885553</item> <!-- 1097 - 1808 -->
<item>264.8221315</item> <!-- 1808 - 2981 -->
<item>327.8974352</item> <!-- 2981 - 5000 -->
<item>401.1676739</item> <!-- 5000 - 10000 -->
<item>494.0846144</item> <!-- 10000+ -->
</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>
<!-- 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">1</integer>
<!-- Default screen brightness setting.
Must be in the range specified by minimum and maximum. -->
<integer name="config_screenBrightnessSettingDefault">68</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">1</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">500</integer>
<!-- Amount of time it takes for the light sensor to warm up in milliseconds.
For this time after the screen turns on, the Power Manager
will not debounce light sensor readings -->
<integer name="config_lightSensorWarmupTime">200</integer>
<!-- Control whether the always on display mode is available. This should only be enabled on
devices where the display has been tuned to be power efficient in DOZE and/or DOZE_SUSPEND
states. -->
<bool name="config_dozeAlwaysOnDisplayAvailable">false</bool>
</resources>

View file

@ -0,0 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
/*
** Copyright 2012, 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 xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<!-- Radius of the software rounded corners. -->
<dimen name="rounded_corner_radius">103px</dimen>
</resources>

View file

@ -0,0 +1,97 @@
<?xml version="1.0" encoding="utf-8"?>
<device name="Android">
<item name="none">0</item>
<item name="screen.on">83.73</item>
<item name="screen.full">308.75</item>
<item name="wifi.on">0.606</item>
<item name="wifi.active">74.462</item>
<item name="wifi.scan">25.088</item>
<item name="camera.avg">616.782</item>
<item name="camera.flashlight">111.666</item>
<item name="gps.on">50.69</item>
<item name="radio.active">208.332</item>
<item name="radio.scanning">46.310</item>
<array name="radio.on">
<value>33.079</value>
<value>30</value>
<value>25</value>
<value>20</value>
<value>15</value>
<value>10</value>
<value>5</value>
<value>1.090</value>
</array>
<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>748800</value>
<value>1017600</value>
<value>1248000</value>
<value>1324800</value>
<value>1497600</value>
<value>1612800</value>
<value>1708800</value>
<value>1804800</value>
</array>
<array name="cpu.core_speeds.cluster1">
<value>300000</value>
<value>652800</value>
<value>806400</value>
<value>979200</value>
<value>1094400</value>
<value>1209600</value>
<value>1324800</value>
<value>1555200</value>
<value>1708800</value>
<value>1843200</value>
<value>1939200</value>
<value>2169600</value>
<value>2208000</value>
</array>
<array name="cpu.core_power.cluster0">
<value>7.9</value>
<value>10.1</value>
<value>14.1</value>
<value>24.5</value>
<value>31.2</value>
<value>40.4</value>
<value>45.4</value>
<value>60.4</value>
<value>77.9</value>
<value>77.9</value>
</array>
<array name="cpu.core_power.cluster1">
<value>18.3</value>
<value>28.6</value>
<value>32.5</value>
<value>48.1</value>
<value>54.3</value>
<value>77.3</value>
<value>107.2</value>
<value>141.1</value>
<value>162.8</value>
<value>206.1</value>
<value>225.9</value>
<value>282.2</value>
<value>292.2</value>
</array>
<item name="cpu.cluster_power.cluster0">0.7</item>
<item name="cpu.cluster_power.cluster1">6.7</item>
<item name="cpu.suspend">3.993</item>
<item name="cpu.idle">5.019</item>
<item name="cpu.active">3</item>
<item name="battery.capacity">5000</item>
<!-- Idle current for bluetooth in mA.-->
<item name="bluetooth.controller.idle">0.01</item>
<!-- Rx current for bluetooth in mA.-->
<item name="bluetooth.controller.rx">9</item>
<!-- Tx current for bluetooth in mA-->
<item name="bluetooth.controller.tx">7</item>
<!-- Operating voltage for bluetooth in mV.-->
<item name="bluetooth.controller.voltage">3300</item>
</device>

View file

@ -84,6 +84,7 @@ PRODUCT_PACKAGES += \
treble-overlay-moto-nio \
treble-overlay-moto-one \
treble-overlay-moto-one-action \
treble-overlay-moto-onefusionplus \
treble-overlay-moto-onehyper \
treble-overlay-moto-razr \
treble-overlay-mtk-ims \