Remove useless code since CountUpTimer notify on pause and stop
This commit is contained in:
parent
ecc0cb5f0b
commit
3ce757ee4b
|
@ -248,31 +248,21 @@ class VoiceBroadcastRecorderQ(
|
|||
recordingTicker = CountUpTimer().apply {
|
||||
tickListener = CountUpTimer.TickListener { onTick(elapsedTime()) }
|
||||
resume()
|
||||
onTick(elapsedTime())
|
||||
}
|
||||
}
|
||||
|
||||
fun pause() {
|
||||
recordingTicker?.apply {
|
||||
pause()
|
||||
onTick(elapsedTime())
|
||||
}
|
||||
recordingTicker?.pause()
|
||||
}
|
||||
|
||||
fun resume() {
|
||||
recordingTicker?.apply {
|
||||
resume()
|
||||
onTick(elapsedTime())
|
||||
}
|
||||
recordingTicker?.resume()
|
||||
}
|
||||
|
||||
fun stop() {
|
||||
recordingTicker?.apply {
|
||||
stop()
|
||||
onTick(elapsedTime())
|
||||
recordingTicker?.stop()
|
||||
recordingTicker = null
|
||||
}
|
||||
}
|
||||
|
||||
private fun onTick(elapsedTimeMillis: Long) {
|
||||
onElapsedTimeUpdated(elapsedTimeMillis)
|
||||
|
|
Loading…
Reference in New Issue