sm8550-common: overlay: Enable multiple vibration strength levels support

Change-Id: If17503f2dd4bd4d6e333891f9649a7db8d809852
This commit is contained in:
Michael Bestas
2022-11-07 17:49:42 +02:00
committed by chaptsand
parent 8d022b74b3
commit fbf53aae70
4 changed files with 50 additions and 0 deletions

View File

@@ -327,6 +327,7 @@ PRODUCT_PACKAGES += \
CarrierConfigResCommon \ CarrierConfigResCommon \
FrameworksResCommon \ FrameworksResCommon \
FrameworksResTarget \ FrameworksResTarget \
SettingsResSamsung \
SystemUIResCommon \ SystemUIResCommon \
TelecommResCommon \ TelecommResCommon \
TelephonyResCommon \ TelephonyResCommon \

View File

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

View File

@@ -0,0 +1,12 @@
<!--
Copyright (C) 2024 The LineageOS Project
SPDX-License-Identifier: Apache-2.0
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.android.settings.overlay.samsung">
<overlay
android:isStatic="true"
android:priority="600"
android:targetPackage="com.android.settings" />
</manifest>

View File

@@ -0,0 +1,27 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2024 The LineageOS Project
SPDX-License-Identifier: Apache-2.0
-->
<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>