[Android] Fix Chromecast switch on Android P

Geoffrey Métais git at videolan.org
Fri May 18 16:47:21 CEST 2018


vlc-android | branch: 3.0.x | Geoffrey Métais <geoffrey.metais at gmail.com> | Fri May 18 15:49:26 2018 +0200| [2582aa41d75999ecec79f3954ad71041b565dd09] | committer: Geoffrey Métais

Fix Chromecast switch on Android P

(cherry picked from commit ba7b53fd593164ee5e278ec931f445dd01a5ca74)

> https://code.videolan.org/videolan/vlc-android/commit/2582aa41d75999ecec79f3954ad71041b565dd09
---

 vlc-android/src/org/videolan/vlc/gui/dialogs/RenderersDialog.kt | 4 ++--
 1 file changed, 2 insertions(+), 2 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 2469c4e86..b757a915f 100644
--- a/vlc-android/src/org/videolan/vlc/gui/dialogs/RenderersDialog.kt
+++ b/vlc-android/src/org/videolan/vlc/gui/dialogs/RenderersDialog.kt
@@ -128,12 +128,12 @@ class RenderersDialog : DialogFragment(), RendererDelegate.RendererListener, Pla
 
     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()
         }
     }
 }



More information about the Android mailing list