[Android] MediaInfoFragment: simplify, since update() was called only once

Jean-Baptiste Kempf git at videolan.org
Sun Jul 6 08:24:10 CEST 2014


vlc-ports/android | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Sun Jul  6 05:23:26 2014 +0200| [c7c630621f25c8fd4538e2ac15bdc2c57735bf7c] | committer: Jean-Baptiste Kempf

MediaInfoFragment: simplify, since update() was called only once

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

 .../org/videolan/vlc/gui/video/MediaInfoFragment.java   |   15 ++++++---------
 1 file changed, 6 insertions(+), 9 deletions(-)

diff --git a/vlc-android/src/org/videolan/vlc/gui/video/MediaInfoFragment.java b/vlc-android/src/org/videolan/vlc/gui/video/MediaInfoFragment.java
index c9bf6c0..13846b9 100644
--- a/vlc-android/src/org/videolan/vlc/gui/video/MediaInfoFragment.java
+++ b/vlc-android/src/org/videolan/vlc/gui/video/MediaInfoFragment.java
@@ -85,16 +85,7 @@ public class MediaInfoFragment extends ListFragment {
     @Override
     public void onActivityCreated(Bundle savedInstanceState) {
         super.onActivityCreated(savedInstanceState);
-        update();
-    }
-
-    public void setMediaLocation(String MRL) {
-        if (MRL == null)
-            return;
-        mItem = MediaLibrary.getInstance(getActivity()).getMediaItem(MRL);
-    }
 
-    private void update() {
         if (mItem == null) {
             // Shouldn't happen, maybe user opened it faster than Media Library could index it
             return;
@@ -107,6 +98,12 @@ public class MediaInfoFragment extends ListFragment {
         new Thread(mLoadImage).start();
     }
 
+    public void setMediaLocation(String MRL) {
+        if (MRL == null)
+            return;
+        mItem = MediaLibrary.getInstance(getActivity()).getMediaItem(MRL);
+    }
+
     Runnable mLoadImage = new Runnable() {
         @Override
         public void run() {



More information about the Android mailing list