[Android] Audioplayer: mitigate ANR in playlist
Geoffrey Métais
git at videolan.org
Tue Apr 7 11:27:16 CEST 2020
vlc-android | branch: 3.2.x | Geoffrey Métais <geoffrey.metais at gmail.com> | Tue Apr 7 11:21:51 2020 +0200| [af4538bbbabcef743c7d191f6fbd994e6ec79f1d] | committer: Geoffrey Métais
Audioplayer: mitigate ANR in playlist
> https://code.videolan.org/videolan/vlc-android/commit/af4538bbbabcef743c7d191f6fbd994e6ec79f1d
---
vlc-android/src/org/videolan/vlc/gui/audio/AudioPlayer.kt | 2 ++
1 file changed, 2 insertions(+)
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 db50fdfbb..e48d9dbae 100644
--- a/vlc-android/src/org/videolan/vlc/gui/audio/AudioPlayer.kt
+++ b/vlc-android/src/org/videolan/vlc/gui/audio/AudioPlayer.kt
@@ -56,6 +56,7 @@ import com.google.android.material.snackbar.Snackbar
import kotlinx.coroutines.*
import kotlinx.coroutines.channels.Channel
import kotlinx.coroutines.channels.actor
+import org.videolan.libvlc.util.AndroidUtil
import org.videolan.medialibrary.Tools
import org.videolan.medialibrary.interfaces.media.AbstractMediaWrapper
import org.videolan.tools.isStarted
@@ -140,6 +141,7 @@ class AudioPlayer : Fragment(), PlaylistAdapter.IPlayer, TextWatcher, CoroutineS
binding.audioMediaSwitcher.setAudioMediaSwitcherListener(headerMediaSwitcherListener)
binding.coverMediaSwitcher.setAudioMediaSwitcherListener(mCoverMediaSwitcherListener)
binding.playlistSearchText.editText?.addTextChangedListener(this)
+ if (!AndroidUtil.isLolliPopOrLater) binding.songsList.itemAnimator = null
val callback = SwipeDragItemTouchHelperCallback(playlistAdapter, true)
val touchHelper = ItemTouchHelper(callback)
More information about the Android
mailing list