[Android] Ensure backgroundmanager is initialized

Geoffrey Métais git at videolan.org
Tue Dec 18 14:55:50 CET 2018


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Tue Dec 18 11:39:46 2018 +0100| [984303ac0206435c3b0987949e104ae5349691fd] | committer: Geoffrey Métais

Ensure backgroundmanager is initialized

> https://code.videolan.org/videolan/vlc-android/commit/984303ac0206435c3b0987949e104ae5349691fd
---

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

diff --git a/vlc-android/src/org/videolan/vlc/gui/tv/browser/CategoriesFragment.kt b/vlc-android/src/org/videolan/vlc/gui/tv/browser/CategoriesFragment.kt
index 1bc2c0374..ab2bf16a4 100644
--- a/vlc-android/src/org/videolan/vlc/gui/tv/browser/CategoriesFragment.kt
+++ b/vlc-android/src/org/videolan/vlc/gui/tv/browser/CategoriesFragment.kt
@@ -60,7 +60,7 @@ open class CategoriesFragment<T : BaseModel<out MediaLibraryItem>> : BrowseSuppo
         // UI setting
         headersState = BrowseSupportFragment.HEADERS_DISABLED
         brandColor = ContextCompat.getColor(activity!!, R.color.orange800)
-        if (savedInstanceState == null) backgroundManager = BackgroundManager.getInstance(requireActivity())
+        if (!this::backgroundManager.isInitialized) backgroundManager = BackgroundManager.getInstance(requireActivity())
         setOnSearchClickedListener { sort(requireActivity().findViewById(R.id.title_orb)) }
     }
 



More information about the Android mailing list