[Android] Audio: Fix duplicate names when ending with space character
Jean-Baptiste Kempf
git at videolan.org
Thu May 22 16:41:02 CEST 2014
vlc-ports/android | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Thu May 22 16:34:16 2014 +0200| [de27f9410404797aad397589e557e85ccb76d907] | committer: Jean-Baptiste Kempf
Audio: Fix duplicate names when ending with space character
> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=de27f9410404797aad397589e557e85ccb76d907
---
.../src/org/videolan/vlc/gui/audio/AudioBrowserListAdapter.java | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/vlc-android/src/org/videolan/vlc/gui/audio/AudioBrowserListAdapter.java b/vlc-android/src/org/videolan/vlc/gui/audio/AudioBrowserListAdapter.java
index e7f3f5c..226b88e 100644
--- a/vlc-android/src/org/videolan/vlc/gui/audio/AudioBrowserListAdapter.java
+++ b/vlc-android/src/org/videolan/vlc/gui/audio/AudioBrowserListAdapter.java
@@ -26,8 +26,8 @@ import java.util.List;
import java.util.Locale;
import java.util.Map;
-import org.videolan.vlc.BitmapCache;
import org.videolan.libvlc.Media;
+import org.videolan.vlc.BitmapCache;
import org.videolan.vlc.R;
import android.content.Context;
@@ -90,6 +90,9 @@ public class AudioBrowserListAdapter extends BaseAdapter {
}
public void add(String title, String subTitle, Media media) {
+ if(title == null) return;
+ title = title.trim();
+ if(subTitle != null) subTitle = subTitle.trim();
if (mMediaItemMap.containsKey(title))
mMediaItemMap.get(title).mMediaList.add(media);
else {
More information about the Android
mailing list