[Android] Rename databaseManager into mediaDatabase

Geoffrey Métais git at videolan.org
Tue Mar 10 11:53:42 CET 2015


vlc-ports/android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Tue Mar 10 11:47:10 2015 +0100| [836ef27ace51077d8240de3c6d940b15b6a1da38] | committer: Geoffrey Métais

Rename databaseManager into mediaDatabase

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

 vlc-android/src/org/videolan/vlc/MediaLibrary.java |   12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/vlc-android/src/org/videolan/vlc/MediaLibrary.java b/vlc-android/src/org/videolan/vlc/MediaLibrary.java
index 6a7948c..9035ee5 100644
--- a/vlc-android/src/org/videolan/vlc/MediaLibrary.java
+++ b/vlc-android/src/org/videolan/vlc/MediaLibrary.java
@@ -216,12 +216,12 @@ public class MediaLibrary {
             }
 
             // Initialize variables
-            final MediaDatabase DBManager = MediaDatabase.getInstance();
+            final MediaDatabase mediaDatabase = MediaDatabase.getInstance();
 
             // show progressbar in footer
             MainActivity.showProgressBar();
 
-            List<File> mediaDirs = DBManager.getMediaDirs();
+            List<File> mediaDirs = mediaDatabase.getMediaDirs();
             if (mediaDirs.size() == 0) {
                 // Use all available storage directories as our default
                 String storageDirs[] = AndroidDevices.getMediaDirectories();
@@ -234,7 +234,7 @@ public class MediaLibrary {
             directories.addAll(mediaDirs);
 
             // get all existing media items
-            HashMap<String, MediaWrapper> existingMedias = DBManager.getMedias();
+            HashMap<String, MediaWrapper> existingMedias = mediaDatabase.getMedias();
 
             // list of all added files
             HashSet<String> addedLocations = new HashSet<String>();
@@ -347,14 +347,14 @@ public class MediaLibrary {
                     for (String fileURI : addedLocations) {
                         existingMedias.remove(fileURI);
                     }
-                    DBManager.removeMedias(existingMedias.keySet());
+                    mediaDatabase.removeMedias(existingMedias.keySet());
 
                     /*
                      * In case of file matching path of a folder from another removable storage
                      */
-                    for (File file : DBManager.getMediaDirs())
+                    for (File file : mediaDatabase.getMediaDirs())
                         if (!file.isDirectory())
-                            DBManager.removeDir(file.getAbsolutePath());
+                            mediaDatabase.removeDir(file.getAbsolutePath());
                 }
 
                 // hide progressbar in footer



More information about the Android mailing list