Commit ba7b53fd authored by Geoffrey Métais's avatar Geoffrey Métais

Fix Chromecast switch on Android P

parent 078a918f
......@@ -70,6 +70,8 @@ import org.videolan.vlc.widget.VLCAppWidgetProviderBlack
import org.videolan.vlc.widget.VLCAppWidgetProviderWhite
import java.util.*
private const val TAG = "VLC/PlaybackService"
class PlaybackService : MediaBrowserServiceCompat() {
lateinit var playlistManager: PlaylistManager
......@@ -1301,7 +1303,6 @@ class PlaybackService : MediaBrowserServiceCompat() {
companion object {
private const val TAG = "VLC/PlaybackService"
private const val SHOW_TOAST = 1
private const val END_MEDIASESSION = 2
......
......@@ -126,12 +126,12 @@ class RenderersDialog : DialogFragment(), PlaybackService.Client.Callback {
inner class RendererClickhandler {
fun connect(item: RendererItem?) {
RendererDelegate.selectRenderer(item)
mService?.setRenderer(item)
dismissAllowingStateLoss()
RendererDelegate.selectRenderer(item)
if (item !== null) activity?.window?.findViewById<View>(R.id.audio_player_container)?.let {
UiTools.snacker(it, getString(R.string.casting_connected_renderer, item.displayName))
}
dismiss()
}
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment