[Android] No need to trim anymore, fixes NPE
Geoffrey Métais
git at videolan.org
Wed Jan 14 13:51:06 CET 2015
vlc-ports/android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Wed Jan 14 12:56:50 2015 +0100| [fc9a728cf3574ec001a4002e8df272d440e406e6] | committer: Geoffrey Métais
No need to trim anymore, fixes NPE
> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=fc9a728cf3574ec001a4002e8df272d440e406e6
---
vlc-android/tv/src/org/videolan/vlc/gui/tv/GridFragment.java | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/vlc-android/tv/src/org/videolan/vlc/gui/tv/GridFragment.java b/vlc-android/tv/src/org/videolan/vlc/gui/tv/GridFragment.java
index 4781482..556fc36 100644
--- a/vlc-android/tv/src/org/videolan/vlc/gui/tv/GridFragment.java
+++ b/vlc-android/tv/src/org/videolan/vlc/gui/tv/GridFragment.java
@@ -277,8 +277,8 @@ public class GridFragment extends VerticalGridFragment implements VideoBrowserIn
Collections.sort(audioList, MediaComparators.byAlbum);
for (Media media : audioList){
if (mFilter == null
- || (mType == FILTER_ARTIST && mFilter.equals(media.getArtist().trim()))
- || (mType == FILTER_GENRE && mFilter.equals(media.getGenre().trim()))) {
+ || (mType == FILTER_ARTIST && mFilter.equals(media.getArtist()))
+ || (mType == FILTER_GENRE && mFilter.equals(media.getGenre()))) {
item = add(media.getAlbum(), media.getArtist(), media);
if (item != null)
publishProgress(item);
@@ -331,12 +331,12 @@ public class GridFragment extends VerticalGridFragment implements VideoBrowserIn
intent = new Intent(mContext, VerticalGridActivity.class);
intent.putExtra(AUDIO_CATEGORY, CATEGORY_ALBUMS);
intent.putExtra(MEDIA_SECTION, FILTER_ARTIST);
- intent.putExtra(AUDIO_FILTER, listItem.mMediaList.get(0).getArtist().trim());
+ intent.putExtra(AUDIO_FILTER, listItem.mMediaList.get(0).getArtist());
} else if (CATEGORY_GENRES == mCategory) {
intent = new Intent(mContext, VerticalGridActivity.class);
intent.putExtra(AUDIO_CATEGORY, CATEGORY_ALBUMS);
intent.putExtra(MEDIA_SECTION, FILTER_GENRE);
- intent.putExtra(AUDIO_FILTER, listItem.mMediaList.get(0).getGenre().trim());
+ intent.putExtra(AUDIO_FILTER, listItem.mMediaList.get(0).getGenre());
} else {
ArrayList<String> locations = new ArrayList<String>();
if (CATEGORY_ALBUMS == mCategory)
More information about the Android
mailing list