[Android] Prevent vlc options to be exported/restored
Nicolas Pomepuy
git at videolan.org
Mon Aug 5 09:34:59 UTC 2024
vlc-android | branch: master | Nicolas Pomepuy <nicolas at videolabs.io> | Tue Jul 30 11:26:45 2024 +0200| [ea23a14b734bb7a832da8929bd1c7d0a402a8f95] | committer: Nicolas Pomepuy
Prevent vlc options to be exported/restored
> https://code.videolan.org/videolan/vlc-android/commit/ea23a14b734bb7a832da8929bd1c7d0a402a8f95
---
.../src/org/videolan/vlc/gui/preferences/search/PreferenceParser.kt | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/application/vlc-android/src/org/videolan/vlc/gui/preferences/search/PreferenceParser.kt b/application/vlc-android/src/org/videolan/vlc/gui/preferences/search/PreferenceParser.kt
index 0fed427890..599fada8fa 100644
--- a/application/vlc-android/src/org/videolan/vlc/gui/preferences/search/PreferenceParser.kt
+++ b/application/vlc-android/src/org/videolan/vlc/gui/preferences/search/PreferenceParser.kt
@@ -86,7 +86,7 @@ object PreferenceParser {
val changedSettings = ArrayList<Pair<String, Any>>()
allPrefs.forEach { pref ->
allSettings.forEach { setting ->
- if (pref.key == setting.key) {
+ if (pref.key == setting.key && pref.key != "custom_libvlc_options") {
setting.value?.let {
if (!isSame(it, pref.defaultValue)) changedSettings.add(Pair(pref.key, it))
}
@@ -272,7 +272,7 @@ object PreferenceParser {
val allPrefs = parsePreferences(activity, parseUIPrefs = true)
savedSettings?.forEach { entry ->
allPrefs.forEach {
- if (it.key == entry.key) {
+ if (it.key == entry.key && it.key != "custom_libvlc_options") {
Log.i("PrefParser", "Restored: ${entry.key} -> ${entry.value}")
newPrefs.putSingle(entry.key, if (entry.value is Double) (entry.value as Double).toInt() else entry.value)
}
More information about the Android
mailing list