fixes beeping to 3.2.1 cycle
This commit is contained in:
@@ -61,14 +61,10 @@ class CountdownDialog(
|
||||
val progress = millisUntilFinished.toFloat() / durationMillis
|
||||
cvCountdown.setProgress(progress)
|
||||
|
||||
if (millisUntilFinished >= durationMillis) {
|
||||
cvCountdown.setText(context.getString(R.string.countdown_text))
|
||||
} else {
|
||||
val secondsLeft = (millisUntilFinished / 1000).toInt() + 1
|
||||
cvCountdown.setText(secondsLeft.toString())
|
||||
}
|
||||
|
||||
if (millisUntilFinished <= 3000 && millisUntilFinished > 1000) {
|
||||
if (secondsLeft >= 1 && secondsLeft <= 3) {
|
||||
playTone(ToneGenerator.TONE_PROP_BEEP)
|
||||
if (prefs.getBoolean("vibration", true)) {
|
||||
vibrator?.vibrate(50)
|
||||
|
||||
Reference in New Issue
Block a user