[Android] Remove network indexing feature flag as it's now considered stable

Nicolas Pomepuy git at videolan.org
Mon Mar 14 13:18:46 UTC 2022


vlc-android | branch: master | Nicolas Pomepuy <nicolas at videolabs.io> | Thu Mar 10 09:10:29 2022 +0100| [9f6e599ddfe9f5e613c1951e5f71b81a1742a3c4] | committer: Nicolas Pomepuy

Remove network indexing feature flag as it's now considered stable

> https://code.videolan.org/videolan/vlc-android/commit/9f6e599ddfe9f5e613c1951e5f71b81a1742a3c4
---

 .../org/videolan/vlc/gui/browser/MLStorageBrowserFragment.kt  | 11 ++++++-----
 .../org/videolan/vlc/gui/browser/NetworkBrowserFragment.kt    |  6 ++++--
 .../src/org/videolan/vlc/util/FeatureFlagManager.kt           |  4 ++--
 3 files changed, 12 insertions(+), 9 deletions(-)

diff --git a/application/vlc-android/src/org/videolan/vlc/gui/browser/MLStorageBrowserFragment.kt b/application/vlc-android/src/org/videolan/vlc/gui/browser/MLStorageBrowserFragment.kt
index d6757167f..f49ae87b5 100644
--- a/application/vlc-android/src/org/videolan/vlc/gui/browser/MLStorageBrowserFragment.kt
+++ b/application/vlc-android/src/org/videolan/vlc/gui/browser/MLStorageBrowserFragment.kt
@@ -42,7 +42,8 @@ import org.videolan.medialibrary.MLServiceLocator
 import org.videolan.medialibrary.interfaces.media.MediaWrapper
 import org.videolan.medialibrary.media.MediaLibraryItem
 import org.videolan.medialibrary.media.Storage
-import org.videolan.tools.*
+import org.videolan.tools.NetworkMonitor
+import org.videolan.tools.setGone
 import org.videolan.vlc.R
 import org.videolan.vlc.databinding.BrowserItemBinding
 import org.videolan.vlc.gui.BaseFragment
@@ -51,9 +52,10 @@ import org.videolan.vlc.gui.helpers.UiTools
 import org.videolan.vlc.gui.view.EmptyLoadingState
 import org.videolan.vlc.gui.view.EmptyLoadingStateView
 import org.videolan.vlc.gui.view.TitleListView
-import org.videolan.vlc.util.FeatureFlag
-import org.videolan.vlc.util.FeatureFlagManager
-import org.videolan.vlc.viewmodels.browser.*
+import org.videolan.vlc.viewmodels.browser.BrowserModel
+import org.videolan.vlc.viewmodels.browser.TYPE_NETWORK
+import org.videolan.vlc.viewmodels.browser.TYPE_STORAGE
+import org.videolan.vlc.viewmodels.browser.getBrowserModel
 import java.io.File
 
 private const val FROM_ONBOARDING = "from_onboarding"
@@ -128,7 +130,6 @@ class MLStorageBrowserFragment : BaseFragment(), IStorageFragmentDelegate by Sto
         }
 
         networkEntry = view.findViewById(R.id.network_browser_entry)
-        networkEntry.visibility = if (FeatureFlagManager.isEnabled(requireActivity(), FeatureFlag.NETWORK_INDEXING)) View.VISIBLE else View.GONE
         networkEntry.loading.showNoMedia = false
         networkEntry.loading.emptyText = R.string.nomedia
         val networkAdapter = StorageBrowserAdapter(getBrowserContainer(true))
diff --git a/application/vlc-android/src/org/videolan/vlc/gui/browser/NetworkBrowserFragment.kt b/application/vlc-android/src/org/videolan/vlc/gui/browser/NetworkBrowserFragment.kt
index b8841094e..136e64980 100644
--- a/application/vlc-android/src/org/videolan/vlc/gui/browser/NetworkBrowserFragment.kt
+++ b/application/vlc-android/src/org/videolan/vlc/gui/browser/NetworkBrowserFragment.kt
@@ -39,7 +39,9 @@ import org.videolan.vlc.R
 import org.videolan.vlc.gui.SecondaryActivity
 import org.videolan.vlc.gui.helpers.MedialibraryUtils
 import org.videolan.vlc.gui.view.EmptyLoadingState
-import org.videolan.vlc.util.*
+import org.videolan.vlc.util.DialogDelegate
+import org.videolan.vlc.util.IDialogManager
+import org.videolan.vlc.util.showVlcDialog
 import org.videolan.vlc.viewmodels.browser.TYPE_NETWORK
 import org.videolan.vlc.viewmodels.browser.getBrowserModel
 
@@ -89,7 +91,7 @@ class NetworkBrowserFragment : BaseBrowserFragment(), IDialogManager {
             item.setTitle(if (isFavorite) R.string.favorites_remove else R.string.favorites_add)
             mrl?.let {
                 val isScanned = withContext(Dispatchers.IO) { MedialibraryUtils.isScanned(it) }
-                menu.findItem(R.id.ml_menu_scan)?.isVisible = !isRootDirectory && it.startsWith("smb") && !isScanned && FeatureFlagManager.isEnabled(requireActivity(), FeatureFlag.NETWORK_INDEXING)
+                menu.findItem(R.id.ml_menu_scan)?.isVisible = !isRootDirectory && it.startsWith("smb") && !isScanned
             }
         }
 
diff --git a/application/vlc-android/src/org/videolan/vlc/util/FeatureFlagManager.kt b/application/vlc-android/src/org/videolan/vlc/util/FeatureFlagManager.kt
index a58023e18..633d87435 100644
--- a/application/vlc-android/src/org/videolan/vlc/util/FeatureFlagManager.kt
+++ b/application/vlc-android/src/org/videolan/vlc/util/FeatureFlagManager.kt
@@ -31,7 +31,6 @@ import kotlinx.coroutines.ExperimentalCoroutinesApi
 import kotlinx.coroutines.ObsoleteCoroutinesApi
 import org.videolan.tools.Settings
 import org.videolan.tools.putSingle
-import org.videolan.vlc.R
 
 /**
  * This manager allows the user to enable / disable experimental features
@@ -53,7 +52,8 @@ object FeatureFlagManager {
  * @param title: a string reference for this feature's title
  */
 enum class FeatureFlag(var dependsOn:FeatureFlag?, @StringRes var title:Int, @StringRes var warning:Int?) {
-    NETWORK_INDEXING(null, R.string.network_indexing, R.string.network_indexing_warning);
+
+    ;
 
     @SuppressLint("DefaultLocale")
     fun getKey() = "ff_${name.toLowerCase()}"



More information about the Android mailing list