[Android] Disconnect RenderersDialog from PlaybackService
Geoffrey Métais
git at videolan.org
Mon Jan 14 11:46:25 CET 2019
vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Mon Jan 14 11:26:40 2019 +0100| [ec7eeabbc01a0c4acc05a63f57a999ede88d28d0] | committer: Geoffrey Métais
Disconnect RenderersDialog from PlaybackService
> https://code.videolan.org/videolan/vlc-android/commit/ec7eeabbc01a0c4acc05a63f57a999ede88d28d0
---
.../videolan/vlc/gui/dialogs/RenderersDialog.kt | 24 +---------------------
1 file changed, 1 insertion(+), 23 deletions(-)
diff --git a/vlc-android/src/org/videolan/vlc/gui/dialogs/RenderersDialog.kt b/vlc-android/src/org/videolan/vlc/gui/dialogs/RenderersDialog.kt
index d8f6d1c0e..efe64d82c 100644
--- a/vlc-android/src/org/videolan/vlc/gui/dialogs/RenderersDialog.kt
+++ b/vlc-android/src/org/videolan/vlc/gui/dialogs/RenderersDialog.kt
@@ -36,7 +36,6 @@ import org.videolan.vlc.RendererDelegate
import org.videolan.vlc.databinding.DialogRenderersBinding
import org.videolan.vlc.databinding.ItemRendererBinding
import org.videolan.vlc.gui.DiffUtilAdapter
-import org.videolan.vlc.gui.PlaybackServiceActivity
import org.videolan.vlc.gui.helpers.SelectorViewHolder
import org.videolan.vlc.gui.helpers.UiTools
@@ -44,17 +43,14 @@ const private val TAG = "VLC/RenderersDialog"
@ObsoleteCoroutinesApi
@ExperimentalCoroutinesApi
-class RenderersDialog : androidx.fragment.app.DialogFragment(), PlaybackService.Client.Callback {
+class RenderersDialog : androidx.fragment.app.DialogFragment() {
private var renderers = RendererDelegate.renderers.value
private lateinit var mBinding: DialogRenderersBinding
private val mAdapter = RendererAdapter()
private val mClickHandler = RendererClickhandler()
- private lateinit var mHelper: PlaybackServiceActivity.Helper
- private var mService: PlaybackService? = null
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
- mHelper = PlaybackServiceActivity.Helper(activity, this)
RendererDelegate.renderers.observe(this, Observer {
if (it !== null) {
renderers = it
@@ -87,24 +83,6 @@ class RenderersDialog : androidx.fragment.app.DialogFragment(), PlaybackService.
mAdapter.update(renderers)
}
- override fun onStart() {
- super.onStart()
- mHelper.onStart()
- }
-
- override fun onStop() {
- super.onStop()
- mHelper.onStop()
- }
-
- override fun onConnected(service: PlaybackService) {
- mService = service
- }
-
- override fun onDisconnected() {
- mService = null
- }
-
private inner class RendererAdapter : DiffUtilAdapter<RendererItem, SelectorViewHolder<ItemRendererBinding>>() {
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): SelectorViewHolder<ItemRendererBinding> {
More information about the Android
mailing list