[Android] Fix the force_play_all migration
Nicolas Pomepuy
git at videolan.org
Tue Aug 30 06:07:33 UTC 2022
vlc-android | branch: master | Nicolas Pomepuy <nicolas at videolabs.io> | Tue Aug 30 07:54:03 2022 +0200| [9ca7c3ea663e02311ceaa8d6dc076ca22192ae8e] | committer: Nicolas Pomepuy
Fix the force_play_all migration
> https://code.videolan.org/videolan/vlc-android/commit/9ca7c3ea663e02311ceaa8d6dc076ca22192ae8e
---
.../vlc-android/src/org/videolan/vlc/util/VersionMigration.kt | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/application/vlc-android/src/org/videolan/vlc/util/VersionMigration.kt b/application/vlc-android/src/org/videolan/vlc/util/VersionMigration.kt
index 0969f329b..25e5351fc 100644
--- a/application/vlc-android/src/org/videolan/vlc/util/VersionMigration.kt
+++ b/application/vlc-android/src/org/videolan/vlc/util/VersionMigration.kt
@@ -190,6 +190,12 @@ object VersionMigration {
private fun migrateToVersion8(settings: SharedPreferences) {
Log.i(this::class.java.simpleName, "Migration to Version 8: split force_play_all " +
"and add force_play_all_audio to separately handle video and audio")
- settings.putSingle("force_play_all", settings.getBoolean("force_play_all", false))
+ if (settings.contains("force_play_all"))
+ settings.edit {
+ val oldSetting = settings.getBoolean("force_play_all", false)
+ putBoolean(FORCE_PLAY_ALL_VIDEO, oldSetting)
+ putBoolean(FORCE_PLAY_ALL_AUDIO, oldSetting)
+ remove("force_play_all")
+ }
}
}
\ No newline at end of file
More information about the Android
mailing list