[Android] MediaLibrary: Do not empty the DB if we are stopping

Sébastien Toque git at videolan.org
Thu Oct 25 21:25:51 CEST 2012


vlc-ports/android | branch: master | Sébastien Toque <xilasz at gmail.com> | Thu Oct 25 21:25:45 2012 +0200| [1668c6343e9d42c668c2a8962c589e9e6b692905] | committer: Sébastien Toque

MediaLibrary: Do not empty the DB if we are stopping

> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=1668c6343e9d42c668c2a8962c589e9e6b692905
---

 vlc-android/src/org/videolan/vlc/MediaLibrary.java |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/vlc-android/src/org/videolan/vlc/MediaLibrary.java b/vlc-android/src/org/videolan/vlc/MediaLibrary.java
index 7a6e3fc..2834d8a 100644
--- a/vlc-android/src/org/videolan/vlc/MediaLibrary.java
+++ b/vlc-android/src/org/videolan/vlc/MediaLibrary.java
@@ -315,7 +315,7 @@ public class MediaLibrary {
                 }
 
                 // remove old files & folders from database if storage is mounted
-                if (Environment.getExternalStorageState().equals(Environment.MEDIA_MOUNTED)) {
+                if (!isStopping && Environment.getExternalStorageState().equals(Environment.MEDIA_MOUNTED)) {
                     for (String fileURI : addedLocations) {
                         existingMedias.remove(fileURI);
                     }



More information about the Android mailing list