miatoll: Rearrange common and target device trees

Change-Id: I5ce121204a9ba81d11f30bd1ddf57aeafc6b8f54
This commit is contained in:
Alexander Winkowski 2022-08-26 05:30:39 +00:00
parent eb18f2f516
commit ad16ea511a
No known key found for this signature in database
GPG Key ID: 72762A66704CDE44
10 changed files with 3 additions and 448 deletions

View File

@ -1,5 +1,5 @@
#
# Copyright (C) 2021 The LineageOS Project
# Copyright (C) 2021-2022 The LineageOS Project
#
# SPDX-License-Identifier: Apache-2.0
#
@ -9,9 +9,6 @@ include device/xiaomi/sm6250-common/BoardConfigCommon.mk
DEVICE_PATH := device/xiaomi/miatoll
# Display
TARGET_SCREEN_DENSITY := 440
# HIDL
ODM_MANIFEST_SKUS += \
nfc
@ -22,6 +19,8 @@ ODM_MANIFEST_NFC_FILES := $(DEVICE_PATH)/manifest_nfc.xml
TARGET_INIT_VENDOR_LIB := //$(DEVICE_PATH):init_xiaomi_miatoll
TARGET_RECOVERY_DEVICE_MODULES := init_xiaomi_miatoll
# Kernel
TARGET_KERNEL_CONFIG := vendor/xiaomi/miatoll_defconfig
# OTA assert
TARGET_OTA_ASSERT_DEVICE := curtana,excalibur,gram,joyeuse,miatoll

View File

@ -7,10 +7,6 @@
# Inherit from sm6250-common
$(call inherit-product, device/xiaomi/sm6250-common/atoll.mk)
# AAPT
PRODUCT_AAPT_CONFIG := normal
PRODUCT_AAPT_PREF_CONFIG := xxhdpi
# NFC
PRODUCT_PACKAGES += \
NfcNci \
@ -30,18 +26,10 @@ PRODUCT_COPY_FILES += \
frameworks/native/data/etc/com.android.nfc_extras.xml:$(TARGET_COPY_OUT_ODM)/etc/permissions/sku_nfc/com.android.nfc_extras.xml \
frameworks/native/data/etc/com.nxp.mifare.xml:$(TARGET_COPY_OUT_ODM)/etc/permissions/sku_nfc/com.nxp.mifare.xml
# Overlays
PRODUCT_PACKAGES += \
MiatollFrameworks \
MiatollSystemUI
# Rootdir
PRODUCT_PACKAGES += \
init.device.rc
# Shipping API level
PRODUCT_SHIPPING_API_LEVEL := 29
# Soong namespaces
PRODUCT_SOONG_NAMESPACES += \
$(LOCAL_PATH)

View File

@ -1,9 +0,0 @@
//
// Copyright (C) 2022 The LineageOS Project
// SPDX-License-Identifier: Apache-2.0
//
runtime_resource_overlay {
name: "MiatollFrameworks",
vendor: true,
}

View File

@ -1,13 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2022 The LineageOS Project
SPDX-License-Identifier: Apache-2.0
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="android.miatoll">
<overlay
android:isStatic="true"
android:priority="300"
android:targetPackage="android" />
</manifest>

View File

@ -1,248 +0,0 @@
<?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>

View File

@ -1,22 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2022 The LineageOS Project
SPDX-License-Identifier: Apache-2.0
-->
<resources>
<!-- Height of the status bar in portrait -->
<dimen name="status_bar_height_portrait">102px</dimen>
<!-- Height of the status bar in landscape -->
<dimen name="status_bar_height_landscape">24dp</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">93px</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">93px</dimen>
</resources>

View File

@ -1,101 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<device name="Android">
<item name="battery.capacity">5020</item>
<array name="cpu.clusters.cores">
<value>6</value>
<value>2</value>
</array>
<item name="cpu.suspend">4.65</item>
<item name="cpu.idle">0.52</item>
<item name="cpu.active">1</item>
<item name="cpu.cluster_power.cluster0">12.10</item>
<item name="cpu.cluster_power.cluster1">16.43</item>
<array name="cpu.core_speeds.cluster0">
<value>300000</value>
<value>576000</value>
<value>768000</value>
<value>1017600</value>
<value>1248000</value>
<value>1324800</value>
<value>1516800</value>
<value>1612800</value>
<value>1708800</value>
<value>1804800</value>
</array>
<array name="cpu.core_speeds.cluster1">
<value>652800</value>
<value>825600</value>
<value>979200</value>
<value>1113600</value>
<value>1267200</value>
<value>1555200</value>
<value>1708800</value>
<value>1843200</value>
<value>1900800</value>
<value>1996800</value>
<value>2112000</value>
<value>2208000</value>
</array>
<array name="cpu.core_power.cluster0">
<value>4.2</value>
<value>8.28</value>
<value>11.99</value>
<value>15.06</value>
<value>23.81</value>
<value>27.99</value>
<value>38.22</value>
<value>51.99</value>
<value>62.37</value>
<value>71.82</value>
</array>
<array name="cpu.core_power.cluster1">
<value>11.06</value>
<value>23.81</value>
<value>35.09</value>
<value>44.08</value>
<value>73.08</value>
<value>87.18</value>
<value>134.31</value>
<value>192.47</value>
<value>216.45</value>
<value>257.83</value>
<value>289.78</value>
<value>337.24</value>
</array>
<item name="screen.on.display0">82.45</item>
<item name="screen.full.display0">242.93</item>
<item name="camera.flashlight">245.859</item>
<item name="camera.avg">500</item>
<item name="video">83.29</item>
<item name="audio">37.41</item>
<item name="wifi.controller.idle">2</item>
<item name="wifi.controller.rx">220</item>
<item name="wifi.controller.tx">150</item>
<item name="wifi.controller.voltage">3700</item>
<item name="modem.controller.sleep">1</item>
<item name="modem.controller.idle">1</item>
<item name="modem.controller.rx">100</item>
<array name="modem.controller.tx">
<value>90</value>
<value>100</value>
<value>110</value>
<value>120</value>
<value>130</value>
</array>
<item name="modem.controller.voltage">3700</item>
<array name="gps.signalqualitybased">
<value>100</value>
<value>110</value>
</array>
<item name="gps.voltage">3700</item>
<item name="bluetooth.controller.idle">1</item>
<item name="bluetooth.controller.rx">50</item>
<item name="bluetooth.controller.tx">50</item>
<item name="bluetooth.controller.voltage">3300</item>
<item name="radio.active">100</item>
<item name="radio.scanning">50</item>
<array name="radio.on">
<value>7</value>
<value>5</value>
</array>
</device>

View File

@ -1,9 +0,0 @@
//
// Copyright (C) 2022 The LineageOS Project
// SPDX-License-Identifier: Apache-2.0
//
runtime_resource_overlay {
name: "MiatollSystemUI",
vendor: true,
}

View File

@ -1,13 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2022 The LineageOS Project
SPDX-License-Identifier: Apache-2.0
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.android.systemui.miatoll">
<overlay
android:isStatic="true"
android:priority="300"
android:targetPackage="com.android.systemui" />
</manifest>

View File

@ -1,17 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2022 The LineageOS Project
SPDX-License-Identifier: Apache-2.0
-->
<resources>
<dimen name="rounded_corner_content_padding">16dp</dimen>
<!-- Location on the screen of the center of the physical power button. -->
<dimen name="physical_power_button_center_screen_location_y">760px</dimen>
<!-- Location on the screen of the center of the fingerprint sensor. -->
<dimen name="physical_fingerprint_sensor_center_screen_location_x">1080px</dimen>
<dimen name="physical_fingerprint_sensor_center_screen_location_y">760px</dimen>
</resources>