[Android] MediaMultiSelection: fix restoration oom

Duncan McNamara git at videolan.org
Thu Feb 24 13:18:01 UTC 2022


vlc-android | branch: master | Duncan McNamara <dcn.mcnamara at gmail.com> | Tue Feb 22 16:48:04 2022 +0100| [e5901413a4815fba0de9c9a2211bd5e5c12471ff] | committer: Nicolas Pomepuy

MediaMultiSelection: fix restoration oom

Fixes #2407

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

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

diff --git a/application/vlc-android/src/org/videolan/vlc/gui/browser/MediaBrowserFragment.kt b/application/vlc-android/src/org/videolan/vlc/gui/browser/MediaBrowserFragment.kt
index 2c25a73a2..c1bb0a95c 100644
--- a/application/vlc-android/src/org/videolan/vlc/gui/browser/MediaBrowserFragment.kt
+++ b/application/vlc-android/src/org/videolan/vlc/gui/browser/MediaBrowserFragment.kt
@@ -202,7 +202,7 @@ abstract class MediaBrowserFragment<T : SortableModel> : BaseFragment(), Filtera
                 var hasOneSelected = false
                 for (i in 0 until savedSelection.size) {
 
-                    it.selectionMap.addAll(savedSelection)
+                    it.selectionMap.add(savedSelection[i])
                     hasOneSelected = savedSelection.isNotEmpty()
                 }
                 if (hasOneSelected) startActionMode()



More information about the Android mailing list