zenfon9: Add multiple vibration strength levels

replace our previous config_vibration_supports_multiple_intensities change

https://github.com/omnirom/android_packages_apps_Settings/commit/eaaf5331d64ab54ce55a857fc73a186d5f256fc5

Change-Id: Id39d94710826e5125431aee0f365247a741c32bc
diff --git a/device.mk b/device.mk
index 60d9593..f3e255c 100755
--- a/device.mk
+++ b/device.mk
@@ -46,6 +46,7 @@
 PRODUCT_PACKAGES += \
     FrameworksResOverlay \
     FrameworksResVendor \
+    SettingsOverlay \
     SettingsProviderOverlay \
     SystemUIOverlay \
     TeleServiceOverlay \
diff --git a/overlay/packages/apps/Settings/res/values/config.xml b/overlay/packages/apps/Settings/res/values/config.xml
deleted file mode 100644
index cc97b86..0000000
--- a/overlay/packages/apps/Settings/res/values/config.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<!-- Copyright (C) 2007 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">
-
-    <!-- Whether or not the device is capable of multiple levels of vibration intensity.
-         Note that this is different from whether it can control the vibration amplitude as some
-         devices will be able to vary their amplitude but do not possess enough dynamic range to
-         have distinct intensity levels -->
-    <bool name="config_vibration_supports_multiple_intensities">true</bool>
-
-</resources>
\ No newline at end of file
diff --git a/rro_overlays/SettingsOverlay/Android.bp b/rro_overlays/SettingsOverlay/Android.bp
new file mode 100644
index 0000000..66ab786
--- /dev/null
+++ b/rro_overlays/SettingsOverlay/Android.bp
@@ -0,0 +1,5 @@
+runtime_resource_overlay {
+    name: "SettingsOverlay",
+    sdk_version: "current",
+    product_specific: true,
+}
diff --git a/rro_overlays/SettingsOverlay/AndroidManifest.xml b/rro_overlays/SettingsOverlay/AndroidManifest.xml
new file mode 100644
index 0000000..70cc591
--- /dev/null
+++ b/rro_overlays/SettingsOverlay/AndroidManifest.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+    package="com.android.settings.overlay">
+
+    <overlay
+        android:isStatic="true"
+        android:priority="800"
+        android:targetPackage="com.android.settings" />
+</manifest>
+
diff --git a/rro_overlays/SettingsOverlay/res/values/config.xml b/rro_overlays/SettingsOverlay/res/values/config.xml
new file mode 100644
index 0000000..d6776af
--- /dev/null
+++ b/rro_overlays/SettingsOverlay/res/values/config.xml
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** Copyright 2023, The OmniRom 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">
+
+    <!-- The number of vibration intensity levels supported by the device.
+         Note that this should correspond to the ability to vary the vibration amplitude, with
+         enough dynamic range to have at least as many distinct intensity levels as defined here.
+         Supported values are 1, 2, 3. If '1', the settings app will use a toggle for the settings,
+         otherwise a slider. If '3', the settings app maps intensities directly to the levels
+         supported by the Vibrator HAL APIs. If '2', then the levels will be mapped to
+         VIBRATION_INTENSITY_LOW and VIBRATION_INTENSITY_HIGH, which gives the most range for
+         scaling vibrations. The medium intensity will be skipped.
+         The default intensity values are configured at
+         frameworks/base/core/res/res/values/config.xml's config_default[type]VibrationIntensity.
+         Make sure that each default intensity value is consistent with the supported levels set
+         here. If this settings supports only 2 levels, for example, then the default intensity
+         should be either LOW (1) or HIGH (3).
+    -->
+    <integer name="config_vibration_supported_intensity_levels">3</integer>
+
+</resources>