- Made stoping of ringing simpler and more reliable.
This commit is contained in:
@@ -837,15 +837,11 @@ class BaresipService: Service() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fun stopRinging() {
|
private fun stopRinging() {
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {
|
if ((Build.VERSION.SDK_INT < Build.VERSION_CODES.P) && (rtTimer != null)) {
|
||||||
if (rt.isPlaying) rt.stop()
|
|
||||||
} else {
|
|
||||||
if (rtTimer != null) {
|
|
||||||
rtTimer!!.cancel()
|
rtTimer!!.cancel()
|
||||||
rtTimer = null
|
rtTimer = null
|
||||||
if (rt.isPlaying) rt.stop()
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
rt.stop()
|
||||||
abandonAudioFocus()
|
abandonAudioFocus()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user