lisa: add RROs for setting correct device name and hotspot ssid

Check device variant by using ro.boot.hwc and
ro.boot.proudct.hardware.sku and set the correct model based on
value of ro.product.marketname on stock ROM

Change-Id: Iae15a7d3558f3c4608546e42ed655a76a0fe8868
This commit is contained in:
AdarshGrewal 2021-06-09 14:09:31 +05:30 committed by Giovanni Ricca
parent 3bb5ce904b
commit 1f794129e0
19 changed files with 186 additions and 0 deletions

View File

@ -11,6 +11,15 @@ $(call inherit-product, device/xiaomi/sm8350-common/common.mk)
DEVICE_PACKAGE_OVERLAYS += \
$(LOCAL_PATH)/overlay
# Overlays-RRO
PRODUCT_PACKAGES += \
lisaCNSettingsProviderOverlay \
lisaCNWifiOverlay \
lisaGLSettingsProviderOverlay \
lisaGLWifiOverlay \
lisaINSettingsProviderOverlay \
lisaINWifiOverlay
# Soong namespaces
PRODUCT_SOONG_NAMESPACES += \
$(LOCAL_PATH)

View File

@ -0,0 +1,4 @@
runtime_resource_overlay {
name: "lisaCNSettingsProviderOverlay",
vendor: true
}

View File

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2021 The LineageOS Project
SPDX-License-Identifier: Apache-2.0
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.android.settingsproviders.lisacn">
<overlay
android:isStatic="true"
android:priority="850"
android:requiredSystemPropertyName="ro.boot.hwc"
android:requiredSystemPropertyValue="CN"
android:targetPackage="com.android.providers.settings" />
</manifest>

View File

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2021 The LineageOS Project
SPDX-License-Identifier: Apache-2.0
-->
<resources>
<!-- Default for Settings.Global.DEVICE_NAME $1=MODEL-->
<string name="def_device_name_simple" translatable="false">Mi 11 LE</string>
</resources>

View File

@ -0,0 +1,4 @@
runtime_resource_overlay {
name: "lisaCNWifiOverlay",
vendor: true
}

View File

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2021 The LineageOS Project
SPDX-License-Identifier: Apache-2.0
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.android.wifi.resources.lisacn"
android:versionCode="1"
android:versionName="1.0">
<application android:hasCode="false" />
<overlay
android:targetPackage="com.android.wifi.resources"
android:targetName="WifiCustomization"
android:isStatic="true"
android:requiredSystemPropertyName="ro.boot.hwc"
android:requiredSystemPropertyValue="CN"
android:priority="850"/>
</manifest>

View File

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2021 The LineageOS Project
SPDX-License-Identifier: Apache-2.0
-->
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<!-- Do not translate. Default access point SSID used for tethering -->
<string name="wifi_tether_configure_ssid_default" translatable="false">Mi 11 LE</string>
</resources>

View File

@ -0,0 +1,4 @@
runtime_resource_overlay {
name: "lisaGLSettingsProviderOverlay",
vendor: true
}

View File

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2021 The LineageOS Project
SPDX-License-Identifier: Apache-2.0
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.android.settingsproviders.lisagl">
<overlay
android:isStatic="true"
android:priority="850"
android:requiredSystemPropertyName="ro.boot.hwc"
android:requiredSystemPropertyValue="GL"
android:targetPackage="com.android.providers.settings" />
</manifest>

View File

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2021 The LineageOS Project
SPDX-License-Identifier: Apache-2.0
-->
<resources>
<!-- Default for Settings.Global.DEVICE_NAME $1=MODEL-->
<string name="def_device_name_simple" translatable="false">Xiaomi 11 Lite 5G NE</string>
</resources>

View File

@ -0,0 +1,4 @@
runtime_resource_overlay {
name: "lisaGLWifiOverlay",
vendor: true
}

View File

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2021 The LineageOS Project
SPDX-License-Identifier: Apache-2.0
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.android.wifi.resources.lisagl"
android:versionCode="1"
android:versionName="1.0">
<application android:hasCode="false" />
<overlay
android:targetPackage="com.android.wifi.resources"
android:targetName="WifiCustomization"
android:isStatic="true"
android:requiredSystemPropertyName="ro.boot.hwc"
android:requiredSystemPropertyValue="GL"
android:priority="850"/>
</manifest>

View File

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2021 The LineageOS Project
SPDX-License-Identifier: Apache-2.0
-->
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<!-- Do not translate. Default access point SSID used for tethering -->
<string name="wifi_tether_configure_ssid_default" translatable="false">Xiaomi 11 Lite 5G NE</string>
</resources>

View File

@ -0,0 +1,4 @@
runtime_resource_overlay {
name: "lisaINSettingsProviderOverlay",
vendor: true
}

View File

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2021 The LineageOS Project
SPDX-License-Identifier: Apache-2.0
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.android.settingsproviders.lisain">
<overlay
android:isStatic="true"
android:priority="850"
android:requiredSystemPropertyName="ro.boot.hwc"
android:requiredSystemPropertyValue="IN"
android:targetPackage="com.android.providers.settings" />
</manifest>

View File

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2021 The LineageOS Project
SPDX-License-Identifier: Apache-2.0
-->
<resources>
<!-- Default for Settings.Global.DEVICE_NAME $1=MODEL-->
<string name="def_device_name_simple" translatable="false">Xiaomi 11 Lite NE</string>
</resources>

View File

@ -0,0 +1,4 @@
runtime_resource_overlay {
name: "lisaINWifiOverlay",
vendor: true
}

View File

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2021 The LineageOS Project
SPDX-License-Identifier: Apache-2.0
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.android.wifi.resources.lisain"
android:versionCode="1"
android:versionName="1.0">
<application android:hasCode="false" />
<overlay
android:targetPackage="com.android.wifi.resources"
android:targetName="WifiCustomization"
android:isStatic="true"
android:requiredSystemPropertyName="ro.boot.hwc"
android:requiredSystemPropertyValue="IN"
android:priority="850"/>
</manifest>

View File

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2021 The LineageOS Project
SPDX-License-Identifier: Apache-2.0
-->
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<!-- Do not translate. Default access point SSID used for tethering -->
<string name="wifi_tether_configure_ssid_default" translatable="false">Xiaomi 11 Lite NE</string>
</resources>