[Android] Fix incorrect types conversion
Geoffrey Métais
git at videolan.org
Tue Jan 16 17:44:57 CET 2018
vlc-android | branch: chromecast | Geoffrey Métais <geoffrey.metais at gmail.com> | Wed Dec 20 14:42:26 2017 +0100| [da6a987a86bb82cdde10533f19ff41e17abe408b] | committer: Geoffrey Métais
Fix incorrect types conversion
> https://code.videolan.org/videolan/vlc-android/commit/da6a987a86bb82cdde10533f19ff41e17abe408b
---
.../src/org/videolan/vlc/gui/audio/AudioPlayer.kt | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/vlc-android/src/org/videolan/vlc/gui/audio/AudioPlayer.kt b/vlc-android/src/org/videolan/vlc/gui/audio/AudioPlayer.kt
index 89f6b20d9..77abed8cf 100644
--- a/vlc-android/src/org/videolan/vlc/gui/audio/AudioPlayer.kt
+++ b/vlc-android/src/org/videolan/vlc/gui/audio/AudioPlayer.kt
@@ -244,18 +244,18 @@ class AudioPlayer : PlaybackServiceFragment(), PlaybackService.Callback, Playlis
override fun updateProgress() {
if (mService === null) return
- val time = mService.time.toInt()
- val length = mService.length.toInt()
+ val time = mService.time
+ val length = mService.length
- mBinding.headerTime.text = Tools.millisToString(time.toLong())
- mBinding.length.text = Tools.millisToString(length.toLong())
- mBinding.timeline.max = length
- mBinding.progressBar.max = length
+ mBinding.headerTime.text = Tools.millisToString(time)
+ mBinding.length.text = Tools.millisToString(length)
+ mBinding.timeline.max = length.toInt()
+ mBinding.progressBar.max = length.toInt()
if (!mPreviewingSeek) {
- mBinding.time.text = Tools.millisToString((if (mShowRemainingTime) time - length else time).toLong())
- mBinding.timeline.progress = time
- mBinding.progressBar.progress = time
+ mBinding.time.text = Tools.millisToString((if (mShowRemainingTime) time - length else time))
+ mBinding.timeline.progress = time.toInt()
+ mBinding.progressBar.progress = time.toInt()
}
}
More information about the Android
mailing list