f62: Set correct device default name for m62

* Set priority to 100 so it overrides f62 one

Change-Id: I3474f75613e0d3bb4828477c51a9cb9c0745855f
diff --git a/configs/init/init.m62.rc b/configs/init/init.m62.rc
new file mode 100644
index 0000000..76211d9
--- /dev/null
+++ b/configs/init/init.m62.rc
@@ -0,0 +1,2 @@
+on property:ro.boot.em.model=SM-M625F
+    setprop bluetooth.device.default_name "Galaxy M62"
diff --git a/device.mk b/device.mk
index 4ad611e..1259825 100644
--- a/device.mk
+++ b/device.mk
@@ -27,5 +27,12 @@
 PRODUCT_COPY_FILES += \
     $(LOCAL_PATH)/configs/keylayout/uinput-sec-fp.kl:$(TARGET_COPY_OUT_VENDOR)/usr/keylayout/uinput-sec-fp.kl
 
+# init
+PRODUCT_COPY_FILES += \
+    $(LOCAL_PATH)/configs/init/init.m62.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/init.m62.rc
+
 # Overlays
 DEVICE_PACKAGE_OVERLAYS += $(LOCAL_PATH)/overlay
+
+PRODUCT_PACKAGES += \
+    SettingsProviderOverlayM62
diff --git a/rro_overlays/SettingsProviderOverlayM62/Android.bp b/rro_overlays/SettingsProviderOverlayM62/Android.bp
new file mode 100644
index 0000000..c69ddb6
--- /dev/null
+++ b/rro_overlays/SettingsProviderOverlayM62/Android.bp
@@ -0,0 +1,21 @@
+//
+// Copyright (C) 2023 The LineageOS 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.
+
+runtime_resource_overlay {
+    name: "SettingsProviderOverlayM62",
+    theme: "SettingsProviderOverlayM62",
+    sdk_version: "current",
+    vendor: true
+}
diff --git a/rro_overlays/SettingsProviderOverlayM62/AndroidManifest.xml b/rro_overlays/SettingsProviderOverlayM62/AndroidManifest.xml
new file mode 100644
index 0000000..b4662a0
--- /dev/null
+++ b/rro_overlays/SettingsProviderOverlayM62/AndroidManifest.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2023 The LineageOS 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.providers.settings.overlay.m62"
+    android:versionCode="1"
+    android:versionName="1.0">
+    <application android:hasCode="false" />
+    <overlay
+      android:targetPackage="com.android.providers.settings"
+      android:requiredSystemPropertyName="ro.boot.em.model"
+      android:requiredSystemPropertyValue="SM-M625F"
+      android:isStatic="true"
+      android:priority="100"/>
+</manifest>
diff --git a/rro_overlays/SettingsProviderOverlayM62/res/values/config.xml b/rro_overlays/SettingsProviderOverlayM62/res/values/config.xml
new file mode 100644
index 0000000..b7da901
--- /dev/null
+++ b/rro_overlays/SettingsProviderOverlayM62/res/values/config.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/**
+ * Copyright (c) 2016, 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">Galaxy M62</string>
+</resources>