|
@@ -61,6 +61,7 @@ class MediaControlView(context: Context, attrs: AttributeSet?) :
|
|
|
super.onFinishInflate()
|
|
|
}
|
|
|
|
|
|
+ @Suppress("MagicNumber")
|
|
|
fun setMediaPlayer(player: MediaPlayerControl?) {
|
|
|
playerControl = player
|
|
|
handler.sendEmptyMessage(SHOW_PROGRESS)
|
|
@@ -75,6 +76,7 @@ class MediaControlView(context: Context, attrs: AttributeSet?) :
|
|
|
handler.removeMessages(SHOW_PROGRESS)
|
|
|
}
|
|
|
|
|
|
+ @Suppress("MagicNumber")
|
|
|
private fun initControllerView() {
|
|
|
binding.playBtn.requestFocus()
|
|
|
|
|
@@ -161,7 +163,7 @@ class MediaControlView(context: Context, attrs: AttributeSet?) :
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- @Suppress("MagicNumber")
|
|
|
+ @Suppress("MagicNumber", "ReturnCount")
|
|
|
private fun setProgress(): Int {
|
|
|
var position = 0
|
|
|
if (playerControl == null || isDragging) {
|