[Android] BaseAudioBrowser: Sanity check

Geoffrey Métais git at videolan.org
Tue May 7 13:08:17 CEST 2019


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Tue May  7 13:08:08 2019 +0200| [43b6116a8f4a60f312efd786541dcf7af9e72883] | committer: Geoffrey Métais

BaseAudioBrowser: Sanity check

> https://code.videolan.org/videolan/vlc-android/commit/43b6116a8f4a60f312efd786541dcf7af9e72883
---

 vlc-android/src/org/videolan/vlc/gui/audio/BaseAudioBrowser.kt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/vlc-android/src/org/videolan/vlc/gui/audio/BaseAudioBrowser.kt b/vlc-android/src/org/videolan/vlc/gui/audio/BaseAudioBrowser.kt
index 3a3129da4..6db26e304 100644
--- a/vlc-android/src/org/videolan/vlc/gui/audio/BaseAudioBrowser.kt
+++ b/vlc-android/src/org/videolan/vlc/gui/audio/BaseAudioBrowser.kt
@@ -124,7 +124,7 @@ abstract class BaseAudioBrowser : MediaBrowserFragment<MLPagedModel<*>>(), IEven
 
     override fun onTabUnselected(tab: TabLayout.Tab) {
         stopActionMode()
-        (requireActivity() as ContentActivity).closeSearchView()
+        (activity as? ContentActivity)?.closeSearchView()
     }
 
     override fun onTabReselected(tab: TabLayout.Tab) {}



More information about the Android mailing list