[Android] Revert "Prevent loading last playlist when history is disabled"
Nicolas Pomepuy
git at videolan.org
Mon Sep 5 11:31:34 UTC 2022
vlc-android | branch: master | Nicolas Pomepuy <nicolas at videolabs.io> | Wed Aug 31 09:06:53 2022 +0200| [b4afa4edac3a34142298949393d18fd9852df08a] | committer: Nicolas Pomepuy
Revert "Prevent loading last playlist when history is disabled"
This reverts commit 4d50e0c46ae6a449f886eecc718bf7850f8a4506.
> https://code.videolan.org/videolan/vlc-android/commit/b4afa4edac3a34142298949393d18fd9852df08a
---
application/vlc-android/src/org/videolan/vlc/MediaSessionCallback.kt | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/application/vlc-android/src/org/videolan/vlc/MediaSessionCallback.kt b/application/vlc-android/src/org/videolan/vlc/MediaSessionCallback.kt
index f0a4fcc84..b5d4dec0a 100644
--- a/application/vlc-android/src/org/videolan/vlc/MediaSessionCallback.kt
+++ b/application/vlc-android/src/org/videolan/vlc/MediaSessionCallback.kt
@@ -41,7 +41,6 @@ import org.videolan.medialibrary.interfaces.Medialibrary
import org.videolan.medialibrary.interfaces.media.MediaWrapper
import org.videolan.resources.*
import org.videolan.resources.util.getFromMl
-import org.videolan.tools.PLAYBACK_HISTORY
import org.videolan.tools.Settings
import org.videolan.tools.removeQuery
import org.videolan.tools.retrieveParent
@@ -62,14 +61,14 @@ internal class MediaSessionCallback(private val playbackService: PlaybackService
override fun onPlay() {
if (playbackService.hasMedia()) playbackService.play()
- else if (!AndroidDevices.isAndroidTv && Settings.getInstance(playbackService).getBoolean(PLAYBACK_HISTORY, true)) PlaybackService.loadLastAudio(playbackService)
+ else if (!AndroidDevices.isAndroidTv) PlaybackService.loadLastAudio(playbackService)
}
override fun onMediaButtonEvent(mediaButtonEvent: Intent): Boolean {
val keyEvent = mediaButtonEvent.getParcelableExtra(Intent.EXTRA_KEY_EVENT) as KeyEvent? ?: return false
if (!playbackService.hasMedia()
&& (keyEvent.keyCode == KeyEvent.KEYCODE_MEDIA_PLAY || keyEvent.keyCode == KeyEvent.KEYCODE_MEDIA_PLAY_PAUSE)) {
- return if (keyEvent.action == KeyEvent.ACTION_DOWN && Settings.getInstance(playbackService).getBoolean(PLAYBACK_HISTORY, true)) {
+ return if (keyEvent.action == KeyEvent.ACTION_DOWN) {
PlaybackService.loadLastAudio(playbackService)
true
} else false
More information about the Android
mailing list