[Android] Avoid relaunching scan on resume when alreday started
Nicolas Pomepuy
git at videolan.org
Wed Dec 15 07:08:55 UTC 2021
vlc-android | branch: 3.4.x | Nicolas Pomepuy <nicolas at videolabs.io> | Wed Dec 15 07:37:47 2021 +0100| [f38ffd99f459fadb3ffa79ea39ee1d6561768f21] | committer: Nicolas Pomepuy
Avoid relaunching scan on resume when alreday started
Fixes #2271
(cherry picked from commit 6203663d5ec7cbf72151c703c6d10198151457c8)
> https://code.videolan.org/videolan/vlc-android/commit/f38ffd99f459fadb3ffa79ea39ee1d6561768f21
---
application/vlc-android/src/org/videolan/vlc/gui/MainActivity.kt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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 3d607c3c0..623b09687 100644
--- a/application/vlc-android/src/org/videolan/vlc/gui/MainActivity.kt
+++ b/application/vlc-android/src/org/videolan/vlc/gui/MainActivity.kt
@@ -127,7 +127,7 @@ class MainActivity : ContentActivity(),
super.onStart()
if (mediaLibrary.isInitiated) {
/* Load media items from database and storage */
- if (scanNeeded && Permissions.canReadStorage(this)) this.reloadLibrary()
+ if (scanNeeded && Permissions.canReadStorage(this) && !mediaLibrary.isWorking) this.reloadLibrary()
}
}
More information about the Android
mailing list