[Android] Remove unused context variable

Jean-Baptiste Kempf git at videolan.org
Sat May 23 17:04:44 CEST 2015


vlc-ports/android | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Sat May 23 17:02:05 2015 +0200| [e70c71816f2a93685acdb1c124ff7a5d158cd5dc] | committer: Jean-Baptiste Kempf

Remove unused context variable

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

 vlc-android/src/org/videolan/vlc/MediaDatabase.java                |    4 ++--
 vlc-android/src/org/videolan/vlc/gui/video/VideoGridFragment.java  |    2 +-
 vlc-android/src/org/videolan/vlc/util/BitmapUtil.java              |    2 +-
 vlc-android/tv/src/org/videolan/vlc/gui/tv/MainTvActivity.java     |    2 +-
 .../tv/src/org/videolan/vlc/gui/tv/RecommendationsService.java     |    2 +-
 5 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/vlc-android/src/org/videolan/vlc/MediaDatabase.java b/vlc-android/src/org/videolan/vlc/MediaDatabase.java
index 3936566..5daf7d4 100644
--- a/vlc-android/src/org/videolan/vlc/MediaDatabase.java
+++ b/vlc-android/src/org/videolan/vlc/MediaDatabase.java
@@ -715,7 +715,7 @@ public class MediaDatabase {
         return medias;
     }
 
-    public synchronized HashMap<String, Long> getVideoTimes(Context context) {
+    public synchronized HashMap<String, Long> getVideoTimes() {
 
         Cursor cursor;
         HashMap<String, Long> times = new HashMap<String, Long>();
@@ -807,7 +807,7 @@ public class MediaDatabase {
         return media;
     }
 
-    public synchronized Bitmap getPicture(Context context, String location) {
+    public synchronized Bitmap getPicture(String location) {
         /* Used for the lazy loading */
         Cursor cursor;
         Bitmap picture = null;
diff --git a/vlc-android/src/org/videolan/vlc/gui/video/VideoGridFragment.java b/vlc-android/src/org/videolan/vlc/gui/video/VideoGridFragment.java
index 740b41e..92206de 100644
--- a/vlc-android/src/org/videolan/vlc/gui/video/VideoGridFragment.java
+++ b/vlc-android/src/org/videolan/vlc/gui/video/VideoGridFragment.java
@@ -209,7 +209,7 @@ public class VideoGridFragment extends MediaBrowserFragment implements ISortable
             focusHelper(false);
         }
         //Get & set times
-        HashMap<String, Long> times = MediaDatabase.getInstance().getVideoTimes(getActivity());
+        HashMap<String, Long> times = MediaDatabase.getInstance().getVideoTimes();
         mVideoAdapter.setTimes(times);
         mGridView.setSelection(mGVFirstVisiblePos);
         updateViewMode();
diff --git a/vlc-android/src/org/videolan/vlc/util/BitmapUtil.java b/vlc-android/src/org/videolan/vlc/util/BitmapUtil.java
index f57dd6c..6879029 100644
--- a/vlc-android/src/org/videolan/vlc/util/BitmapUtil.java
+++ b/vlc-android/src/org/videolan/vlc/util/BitmapUtil.java
@@ -98,7 +98,7 @@ public class BitmapUtil {
                 Context c = VLCApplication.getAppContext();
                 picture = readCoverBitmap(media.getArtworkURL());
                 if (picture == null)
-                    picture = MediaDatabase.getInstance().getPicture(c, media.getLocation());
+                    picture = MediaDatabase.getInstance().getPicture(media.getLocation());
                 cache.addBitmapToMemCache(media.getLocation(), picture);
             }
             return picture;
diff --git a/vlc-android/tv/src/org/videolan/vlc/gui/tv/MainTvActivity.java b/vlc-android/tv/src/org/videolan/vlc/gui/tv/MainTvActivity.java
index 867037c..6496898 100644
--- a/vlc-android/tv/src/org/videolan/vlc/gui/tv/MainTvActivity.java
+++ b/vlc-android/tv/src/org/videolan/vlc/gui/tv/MainTvActivity.java
@@ -405,7 +405,7 @@ public class MainTvActivity extends Activity implements IVideoBrowser, OnItemVie
                 MediaDatabase mediaDatabase = MediaDatabase.getInstance();
                 if (sThumbnailer != null && videoList != null && !videoList.isEmpty()) {
                     for (MediaWrapper MediaWrapper : videoList){
-                        picture = mediaDatabase.getPicture(mContext, MediaWrapper.getLocation());
+                        picture = mediaDatabase.getPicture(MediaWrapper.getLocation());
                         if (picture== null)
                             sThumbnailer.addJob(MediaWrapper);
                     }
diff --git a/vlc-android/tv/src/org/videolan/vlc/gui/tv/RecommendationsService.java b/vlc-android/tv/src/org/videolan/vlc/gui/tv/RecommendationsService.java
index 73602ca..fae3e1e 100644
--- a/vlc-android/tv/src/org/videolan/vlc/gui/tv/RecommendationsService.java
+++ b/vlc-android/tv/src/org/videolan/vlc/gui/tv/RecommendationsService.java
@@ -144,7 +144,7 @@ public class RecommendationsService extends IntentService {
         for (MediaWrapper mediaWrapper : videoList){
             if (TextUtils.equals(mediaWrapper.getLocation(), last))
                 continue;
-            pic = mMediaDatabase.getPicture(mContext, mediaWrapper.getLocation());
+            pic = mMediaDatabase.getPicture(mediaWrapper.getLocation());
             if (pic != null && pic.getByteCount() > 4 && mediaWrapper.getTime() == 0) {
                 buildRecommendation(mediaWrapper, ++id, Notification.PRIORITY_DEFAULT);
             }



More information about the Android mailing list