[Android] Scan: Stop scan restart after exiting group
    Duncan McNamara 
    git at videolan.org
       
    Wed Nov 24 06:04:40 UTC 2021
    
    
  
vlc-android | branch: master | Duncan McNamara <dcn.mcnamara at gmail.com> | Tue Nov 23 18:26:59 2021 +0100| [c2f4c7d0f8ac79acc24d623184fc73ceb3d62ade] | committer: Nicolas Pomepuy
Scan: Stop scan restart after exiting group
If the user enters a group before the end of a medialibrary scan, the
boolean scanNeeded is set to true in onStop. To stop the scan from
happening when coming back from the group, scanNeeded is set to false in
onActivityResult.
Closes #2255
> https://code.videolan.org/videolan/vlc-android/commit/c2f4c7d0f8ac79acc24d623184fc73ceb3d62ade
---
 application/vlc-android/src/org/videolan/vlc/gui/MainActivity.kt | 2 ++
 1 file changed, 2 insertions(+)
diff --git a/application/vlc-android/src/org/videolan/vlc/gui/MainActivity.kt b/application/vlc-android/src/org/videolan/vlc/gui/MainActivity.kt
index 5afcec556..d1f29d75f 100644
--- a/application/vlc-android/src/org/videolan/vlc/gui/MainActivity.kt
+++ b/application/vlc-android/src/org/videolan/vlc/gui/MainActivity.kt
@@ -236,6 +236,8 @@ class MainActivity : ContentActivity(),
         } else if (requestCode == ACTIVITY_RESULT_SECONDARY) {
             if (resultCode == RESULT_RESCAN) {
                 forceRefresh(currentFragment)
+            } else {
+                scanNeeded = false
             }
         }
     }
    
    
More information about the Android
mailing list