Android/overlay-haptics: Increase amplitude

This commit is contained in:
codokie
2026-04-09 12:15:12 +03:00
parent 4df53b5473
commit cc3a61a522

View File

@@ -87,10 +87,11 @@ class HapticsProvider(
): IntArray {
// Note: It is recommended that these values differ by a ratio of 1.4 or more,
// so the difference in the amplitude of the vibration can be easily perceived.
// Value range is between 0 and 255 (VibrationEffect.MAX_AMPLITUDE).
return when (effect) {
HapticEffect.QUICK_FALL -> intArrayOf(0, (180 * scale).toInt())
HapticEffect.QUICK_RISE -> intArrayOf(0, (128 * scale).toInt())
HapticEffect.LOW_TICK -> intArrayOf(0, (90 * scale).toInt())
HapticEffect.QUICK_FALL -> intArrayOf(0, (255f * scale).toInt())
HapticEffect.QUICK_RISE -> intArrayOf(0, (180f * scale).toInt())
HapticEffect.LOW_TICK -> intArrayOf(0, (128f * scale).toInt())
}
}