looping the call ringtones instead of relying on the ringtone to contain looping metadata

This commit is contained in:
Adam Brown 2021-11-01 14:41:25 +00:00
parent 0d6e8bdeb3
commit 66737c6ec9

View file

@ -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()
}