[Android] code factorization
Geoffrey Métais
git at videolan.org
Thu Oct 16 12:13:36 CEST 2014
vlc-ports/android | branch: tv | Geoffrey Métais <geoffrey.metais at gmail.com> | Thu Oct 2 15:51:24 2014 +0200| [fde102b9e3bae97eb9ce3ef2633b254975f76cc3] | committer: Geoffrey Métais
code factorization
> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=fde102b9e3bae97eb9ce3ef2633b254975f76cc3
---
vlc-android/src/org/videolan/vlc/gui/tv/GridFragment.java | 4 +++-
vlc-android/src/org/videolan/vlc/gui/tv/MainTvActivity.java | 1 +
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/vlc-android/src/org/videolan/vlc/gui/tv/GridFragment.java b/vlc-android/src/org/videolan/vlc/gui/tv/GridFragment.java
index c74affa..373370b 100644
--- a/vlc-android/src/org/videolan/vlc/gui/tv/GridFragment.java
+++ b/vlc-android/src/org/videolan/vlc/gui/tv/GridFragment.java
@@ -18,6 +18,7 @@ import org.videolan.vlc.gui.audio.MediaComparators;
import org.videolan.vlc.gui.tv.audioplayer.AudioPlayerActivity;
import org.videolan.vlc.gui.video.VideoBrowserInterface;
import org.videolan.vlc.gui.video.VideoListHandler;
+import org.videolan.vlc.gui.video.VideoPlayerActivity;
import org.videolan.vlc.util.Util;
import android.content.Context;
@@ -64,6 +65,7 @@ public class GridFragment extends VerticalGridFragment implements VideoBrowserIn
mMediaLibrary = MediaLibrary.getInstance();
+
if (mType == HEADER_VIDEO) {
mThumbnailer = new Thumbnailer(mContext, getActivity().getWindowManager().getDefaultDisplay());
setupFragment();
@@ -213,7 +215,7 @@ public class GridFragment extends VerticalGridFragment implements VideoBrowserIn
ArrayList<Media> mediaList = null;
if (mType == HEADER_VIDEO)
mediaList = mMediaLibrary.getVideoItems();
- else
+ else if (mType == HEADER_MUSIC)
mediaList = mMediaLibrary.getAudioItems();
size = mediaList == null ? 0 : mediaList.size();
mMediaIndex = new HashMap<String, Integer>(size);
diff --git a/vlc-android/src/org/videolan/vlc/gui/tv/MainTvActivity.java b/vlc-android/src/org/videolan/vlc/gui/tv/MainTvActivity.java
index ea2b077..ee6f685 100644
--- a/vlc-android/src/org/videolan/vlc/gui/tv/MainTvActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/tv/MainTvActivity.java
@@ -24,6 +24,7 @@ import android.graphics.drawable.Drawable;
import android.os.AsyncTask;
import android.os.Bundle;
import android.os.Handler;
+import android.os.Parcelable;
import android.support.v17.leanback.app.BackgroundManager;
import android.support.v17.leanback.app.BrowseFragment;
import android.support.v17.leanback.widget.ArrayObjectAdapter;
More information about the Android
mailing list