[Android] Setup resolvers/indexers for TV only

Geoffrey Métais git at videolan.org
Tue Mar 17 15:11:00 CET 2020


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Mon Mar 16 18:23:14 2020 +0100| [16c95e39151df7b2892b31fe7769673ad97c9c26] | committer: Geoffrey Métais

Setup resolvers/indexers for TV only

> https://code.videolan.org/videolan/vlc-android/commit/16c95e39151df7b2892b31fe7769673ad97c9c26
---

 .../src/main/java/org/videolan/mobile/app/AppSetupDelegate.kt | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/application/app/src/main/java/org/videolan/mobile/app/AppSetupDelegate.kt b/application/app/src/main/java/org/videolan/mobile/app/AppSetupDelegate.kt
index 6f3991463..4bf8fd7cc 100644
--- a/application/app/src/main/java/org/videolan/mobile/app/AppSetupDelegate.kt
+++ b/application/app/src/main/java/org/videolan/mobile/app/AppSetupDelegate.kt
@@ -69,11 +69,14 @@ class AppSetupDelegate : AppDelegate,
         FactoryManager.registerFactory(ILibVLCFactory.factoryId, LibVLCFactory())
 
         if (BuildConfig.DEBUG) {
-            // Register movipedia to resume tv shows/movies
-            setupContentResolvers()
+            Settings.getInstance(this)
+            if (Settings.showTvUi) {
+                // Register movipedia to resume tv shows/movies
+                setupContentResolvers()
 
-            // Setup Moviepedia indexing after Medialibrary scan
-            setupIndexers()
+                // Setup Moviepedia indexing after Medialibrary scan
+                setupIndexers()
+            }
         }
 
         //Initiate Kotlinx Dispatchers in a thread to prevent ANR



More information about the Android mailing list