[Android] [PATCH 1/4] Do not check existence here, could be redundant

Jean-Baptiste Kempf jb at videolan.org
Fri May 1 17:13:30 CEST 2015


The set LGTM.

On 30 Apr, Geoffrey Métais wrote :
> ---
>  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);
>      }
>  
>      /**
> -- 
> 2.1.4
> 
> _______________________________________________
> Android mailing list
> Android at videolan.org
> https://mailman.videolan.org/listinfo/android

-- 
With my kindest regards,

-- 
Jean-Baptiste Kempf
http://www.jbkempf.com/ - +33 672 704 734
Sent from my Electronic Device


More information about the Android mailing list