[Android] [PATCH 08/12] code factorization
Geoffrey Métais
geoffrey.metais at gmail.com
Mon Nov 17 17:06:46 CET 2014
---
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;
--
1.9.1
More information about the Android
mailing list