Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
VLC-Android
Manage
Activity
Members
Labels
Plan
Issues
528
Issue boards
Milestones
Wiki
Code
Merge requests
14
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
VideoLAN
VLC-Android
Commits
b610eb7f
Commit
b610eb7f
authored
1 year ago
by
Nicolas Pomepuy
Committed by
Duncan McNamara
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
Remove useless Handler in AudioPlayerActivity
parent
20b2ac28
No related branches found
No related tags found
1 merge request
!1769
Handlers
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
application/television/src/main/java/org/videolan/television/ui/audioplayer/AudioPlayerActivity.kt
+3
-6
3 additions, 6 deletions
...videolan/television/ui/audioplayer/AudioPlayerActivity.kt
with
3 additions
and
6 deletions
application/television/src/main/java/org/videolan/television/ui/audioplayer/AudioPlayerActivity.kt
+
3
−
6
View file @
b610eb7f
...
...
@@ -25,8 +25,6 @@ import android.content.SharedPreferences
import
android.net.Uri
import
android.os.Build
import
android.os.Bundle
import
android.os.Handler
import
android.os.Looper
import
android.support.v4.media.session.PlaybackStateCompat
import
android.text.format.DateFormat
import
android.view.*
...
...
@@ -68,7 +66,6 @@ class AudioPlayerActivity : BaseTvActivity(),KeycodeListener {
private
lateinit
var
binding
:
TvAudioPlayerBinding
private
lateinit
var
adapter
:
PlaylistAdapter
private
val
handler
=
Handler
(
Looper
.
getMainLooper
())
private
var
lastMove
:
Long
=
0
private
var
shuffling
=
false
private
var
currentCoverArt
:
String
?
=
null
...
...
@@ -393,14 +390,14 @@ class AudioPlayerActivity : BaseTvActivity(),KeycodeListener {
}
fun
onUpdateFinished
()
{
handler
.
post
(
Runnable
{
binding
.
root
.
post
{
val
position
=
model
.
currentMediaPosition
if
(
position
<
0
)
return
@
Runnable
if
(
position
<
0
)
return
@
post
adapter
.
setSelection
(
position
)
val
first
=
(
binding
.
playlist
.
layoutManager
as
LinearLayoutManager
).
findFirstCompletelyVisibleItemPosition
()
val
last
=
(
binding
.
playlist
.
layoutManager
as
LinearLayoutManager
).
findLastCompletelyVisibleItemPosition
()
if
(
position
<
first
||
position
>
last
)
binding
.
playlist
.
smoothScrollToPosition
(
position
)
}
)
}
}
companion
object
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment