[Android] Avoid displaying non working options for audio played from other apps
Nicolas Pomepuy
git at videolan.org
Wed Jan 20 10:09:56 UTC 2021
vlc-android | branch: master | Nicolas Pomepuy <nicolas at videolabs.io> | Mon Jan 18 10:01:48 2021 +0100| [a68b28a74de7f72fef29fe9c7be4219ba7e0b1f6] | committer: Nicolas Pomepuy
Avoid displaying non working options for audio played from other apps
Fixes #1613
> https://code.videolan.org/videolan/vlc-android/commit/a68b28a74de7f72fef29fe9c7be4219ba7e0b1f6
---
application/vlc-android/src/org/videolan/vlc/gui/audio/AudioPlayer.kt | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/application/vlc-android/src/org/videolan/vlc/gui/audio/AudioPlayer.kt b/application/vlc-android/src/org/videolan/vlc/gui/audio/AudioPlayer.kt
index 34dd40b34..147d9474b 100644
--- a/application/vlc-android/src/org/videolan/vlc/gui/audio/AudioPlayer.kt
+++ b/application/vlc-android/src/org/videolan/vlc/gui/audio/AudioPlayer.kt
@@ -226,7 +226,8 @@ class AudioPlayer : Fragment(), PlaylistAdapter.IPlayer, TextWatcher, IAudioPlay
override fun onPopupMenu(view: View, position: Int, item: MediaWrapper?) {
val activity = activity
if (activity === null || position >= playlistAdapter.itemCount) return
- val flags = CTX_REMOVE_FROM_PLAYLIST or CTX_SET_RINGTONE or CTX_ADD_TO_PLAYLIST or CTX_STOP_AFTER_THIS or CTX_INFORMATION or CTX_SHARE
+ var flags = CTX_REMOVE_FROM_PLAYLIST or CTX_STOP_AFTER_THIS or CTX_INFORMATION
+ if (item?.uri?.scheme != "content") flags = flags or CTX_ADD_TO_PLAYLIST or CTX_SHARE or CTX_SET_RINGTONE
showContext(activity, ctxReceiver, position, item?.title ?: "", flags)
}
More information about the Android
mailing list