[Android] Restrict access to renderers when safe mode is activated
Nicolas Pomepuy
git at videolan.org
Wed Jul 12 08:30:36 UTC 2023
vlc-android | branch: master | Nicolas Pomepuy <nicolas at videolabs.io> | Wed Jul 5 13:40:01 2023 +0200| [c773c221ea3ad45e566d5ce4ea1d8df0ad223bd3] | committer: Duncan McNamara
Restrict access to renderers when safe mode is activated
> https://code.videolan.org/videolan/vlc-android/commit/c773c221ea3ad45e566d5ce4ea1d8df0ad223bd3
---
.../vlc-android/src/org/videolan/vlc/gui/dialogs/RenderersDialog.kt | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/application/vlc-android/src/org/videolan/vlc/gui/dialogs/RenderersDialog.kt b/application/vlc-android/src/org/videolan/vlc/gui/dialogs/RenderersDialog.kt
index 4fcba3865a..7a2bb6e95a 100644
--- a/application/vlc-android/src/org/videolan/vlc/gui/dialogs/RenderersDialog.kt
+++ b/application/vlc-android/src/org/videolan/vlc/gui/dialogs/RenderersDialog.kt
@@ -31,7 +31,9 @@ import android.view.Window
import androidx.core.content.ContextCompat
import androidx.core.widget.ImageViewCompat
import androidx.fragment.app.DialogFragment
+import androidx.lifecycle.lifecycleScope
import androidx.recyclerview.widget.LinearLayoutManager
+import kotlinx.coroutines.launch
import org.videolan.libvlc.RendererItem
import org.videolan.vlc.PlaybackService
import org.videolan.vlc.R
@@ -41,6 +43,7 @@ import org.videolan.vlc.databinding.ItemRendererBinding
import org.videolan.vlc.gui.DiffUtilAdapter
import org.videolan.vlc.gui.helpers.SelectorViewHolder
import org.videolan.vlc.gui.helpers.UiTools
+import org.videolan.vlc.gui.helpers.UiTools.showPinIfNeeded
class RenderersDialog : DialogFragment() {
private var renderers = RendererDelegate.renderers.value
@@ -50,6 +53,7 @@ class RenderersDialog : DialogFragment() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
+ lifecycleScope.launch { if (requireActivity().showPinIfNeeded()) dismiss() }
RendererDelegate.renderers.observe(this) {
if (it !== null) {
renderers = it
More information about the Android
mailing list