From a21ba3852c6316930d86d5031418d517ca8a6bc7 Mon Sep 17 00:00:00 2001 From: tibbi Date: Fri, 9 Mar 2018 23:12:20 +0100 Subject: [PATCH] calculate the vibration duration more dynamically --- .../com/simplemobiletools/clock/receivers/AlarmReceiver.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/clock/receivers/AlarmReceiver.kt b/app/src/main/kotlin/com/simplemobiletools/clock/receivers/AlarmReceiver.kt index 289d344..47f608a 100644 --- a/app/src/main/kotlin/com/simplemobiletools/clock/receivers/AlarmReceiver.kt +++ b/app/src/main/kotlin/com/simplemobiletools/clock/receivers/AlarmReceiver.kt @@ -73,7 +73,7 @@ class AlarmReceiver : BroadcastReceiver() { } if (alarm.vibrate) { - val vibrateArray = LongArray(1200) { 500 } + val vibrateArray = LongArray((NOTIFICATION_DISAPPEAR_MS / 500).toInt()) { 500 } builder.setVibrate(vibrateArray) }