sweet: 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
This commit is contained in:
AdarshGrewal 2021-06-09 14:09:31 +05:30 committed by AdarshGrewal
parent 0b3b0b648a
commit 5eac8a1e4b
7 changed files with 116 additions and 0 deletions

View File

@ -46,6 +46,8 @@ DEVICE_PACKAGE_OVERLAYS += \
# Overlay-RRO
PRODUCT_PACKAGES += \
SweetinproSettingsProvider \
SweetinproWifiOverlay \
SweetWifiOverlay
# Partitions

View File

@ -0,0 +1,5 @@
runtime_resource_overlay {
name: "SweetinproSettingsProvider",
sdk_version: "current",
product_specific: true,
}

View File

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2019 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.
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.android.settingsproviders.sweetinpro">
<overlay
android:isStatic="true"
android:priority="1"
android:requiredSystemPropertyName="ro.boot.hwc,ro.boot.product.hardware.sku"
android:requiredSystemPropertyValue="INDIA,pro"
android:targetPackage="com.android.providers.settings" />
</manifest>

View File

@ -0,0 +1,22 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
/**
* Copyright (c) 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.
*/
-->
<resources>
<!-- Default for Settings.Global.DEVICE_NAME $1=MODEL-->
<string name="def_device_name_simple">Redmi Note 10 Pro Max</string>
</resources>

View File

@ -0,0 +1,7 @@
runtime_resource_overlay {
name: "SweetinproWifiOverlay",
theme: "SweetinproWifiOverlay",
certificate: "platform",
sdk_version: "current",
product_specific: true
}

View File

@ -0,0 +1,29 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2019 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.
-->
<!-- Device specific wifi overlays -->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.android.wifi.resources.sweetinpro"
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,ro.boot.product.hardware.sku"
android:requiredSystemPropertyValue="INDIA,pro"
android:priority="1"/>
</manifest>

View File

@ -0,0 +1,26 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2019 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">
<!-- Do not translate. Default access point SSID used for tethering -->
<string name="wifi_tether_configure_ssid_default" translatable="false">Redmi Note 10 Pro Max</string>
</resources>