[Android] Do not check existence here, could be redundant

Geoffrey Métais git at videolan.org
Mon May 4 14:31:22 CEST 2015


vlc-ports/android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Wed Apr 29 18:50:06 2015 +0200| [d1e9af718d4b9bbeeb34d563b6cfdaf641856866] | committer: Geoffrey Métais

Do not check existence here, could be redundant

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

 vlc-android/src/org/videolan/vlc/MediaDatabase.java |    8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/vlc-android/src/org/videolan/vlc/MediaDatabase.java b/vlc-android/src/org/videolan/vlc/MediaDatabase.java
index 2a9e2b6..0deabdb 100644
--- a/vlc-android/src/org/videolan/vlc/MediaDatabase.java
+++ b/vlc-android/src/org/videolan/vlc/MediaDatabase.java
@@ -895,11 +895,9 @@ public class MediaDatabase {
      * @param path
      */
     public synchronized void addDir(String path) {
-        if (!mediaDirExists(path)) {
-            ContentValues values = new ContentValues();
-            values.put(DIR_ROW_PATH, path);
-            mDb.insert(DIR_TABLE_NAME, null, values);
-        }
+        ContentValues values = new ContentValues();
+        values.put(DIR_ROW_PATH, path);
+        mDb.insert(DIR_TABLE_NAME, null, values);
     }
 
     /**



More information about the Android mailing list