mirror of
https://github.com/vector-im/element-android.git
synced 2024-11-16 02:05:06 +08:00
Merge pull request #4381 from vector-im/feature/adm/looping-call-ringtones
Force call ringtones to loop
This commit is contained in:
commit
23a8ac6231
1
changelog.d/4047.bugfix
Normal file
1
changelog.d/4047.bugfix
Normal file
@ -0,0 +1 @@
|
||||
Fixing call ringtones only playing once when the ringtone doesn't contain looping metadata (android 9.0 and above)
|
@ -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()
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user