From 66737c6ec92df58d6ec713e6f933bc30e437b537 Mon Sep 17 00:00:00 2001 From: Adam Brown Date: Mon, 1 Nov 2021 14:41:25 +0000 Subject: [PATCH] looping the call ringtones instead of relying on the ringtone to contain looping metadata --- .../main/java/im/vector/app/core/services/CallRingPlayer.kt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/vector/src/main/java/im/vector/app/core/services/CallRingPlayer.kt b/vector/src/main/java/im/vector/app/core/services/CallRingPlayer.kt index faa921b99e..524ff37914 100644 --- a/vector/src/main/java/im/vector/app/core/services/CallRingPlayer.kt +++ b/vector/src/main/java/im/vector/app/core/services/CallRingPlayer.kt @@ -62,6 +62,10 @@ class CallRingPlayerIncoming( val ringtoneUri = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_RINGTONE) ringtone = RingtoneManager.getRingtone(applicationContext, ringtoneUri) Timber.v("Play ringtone for incoming call") + + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) { + ringtone?.isLooping = true + } ringtone?.play() }