[Android] AudioBrowser: don't duplicate separators in the same way

Jean-Baptiste Kempf git at videolan.org
Thu May 22 16:47:20 CEST 2014


vlc-ports/android | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Thu May 22 16:44:17 2014 +0200| [226b1da43d5ed1d099654579f83f012011dafef9] | committer: Jean-Baptiste Kempf

AudioBrowser: don't duplicate separators in the same way

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

 .../src/org/videolan/vlc/gui/audio/AudioBrowserListAdapter.java      |    2 ++
 1 file changed, 2 insertions(+)

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 226b88e..62a1631 100644
--- a/vlc-android/src/org/videolan/vlc/gui/audio/AudioBrowserListAdapter.java
+++ b/vlc-android/src/org/videolan/vlc/gui/audio/AudioBrowserListAdapter.java
@@ -132,6 +132,8 @@ public class AudioBrowserListAdapter extends BaseAdapter {
     }
 
     public void addSeparator(String title, Media media) {
+        if(title == null) return;
+        title = title.trim();
         if (mSeparatorItemMap.containsKey(title))
             mSeparatorItemMap.get(title).mMediaList.add(media);
         else {



More information about the Android mailing list