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