[Android] PlaybackService: removed unused callbacks

Thomas Guillem git at videolan.org
Wed Jul 1 15:14:33 CEST 2015


vlc-ports/android | branch: master | Thomas Guillem <thomas at gllm.fr> | Wed Jul  1 11:18:16 2015 +0200| [6c47558a76962ddaf4f4d6ed46815f60f99912fe] | committer: Thomas Guillem

PlaybackService: removed unused callbacks

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

 vlc-android/src/org/videolan/vlc/PlaybackService.java    |   14 --------------
 .../src/org/videolan/vlc/gui/audio/AudioPlayer.java      |    8 --------
 .../org/videolan/vlc/gui/video/VideoPlayerActivity.java  |    8 --------
 3 files changed, 30 deletions(-)

diff --git a/vlc-android/src/org/videolan/vlc/PlaybackService.java b/vlc-android/src/org/videolan/vlc/PlaybackService.java
index 90f3d89..9df88a1 100644
--- a/vlc-android/src/org/videolan/vlc/PlaybackService.java
+++ b/vlc-android/src/org/videolan/vlc/PlaybackService.java
@@ -110,8 +110,6 @@ public class PlaybackService extends Service {
     public interface Callback {
         void update();
         void updateProgress();
-        void onMediaPlayedAdded(MediaWrapper media, int index);
-        void onMediaPlayedRemoved(int index);
         void onMediaEvent(Media.Event event);
         void onMediaPlayerEvent(MediaPlayer.Event event);
     }
@@ -663,7 +661,6 @@ public class PlaybackService extends Service {
                     next();
                 else if (mCurrentIndex != -1) {
                     playIndex(mCurrentIndex, 0);
-                    executeOnMediaPlayedAdded();
                 } else
                     stop();
             }
@@ -739,13 +736,6 @@ public class PlaybackService extends Service {
         }
     }
 
-    private void executeOnMediaPlayedAdded() {
-        final MediaWrapper media = getCurrentMedia();
-        for (Callback callback : mCallbacks) {
-            callback.onMediaPlayedAdded(media, 0);
-        }
-    }
-
     /**
      * Return the current media.
      *
@@ -1035,7 +1025,6 @@ public class PlaybackService extends Service {
         }
 
         playIndex(mCurrentIndex, 0);
-        executeOnMediaPlayedAdded();
 
         mHandler.sendEmptyMessage(SHOW_PROGRESS);
         showNotification();
@@ -1100,7 +1089,6 @@ public class PlaybackService extends Service {
         }
 
         playIndex(mCurrentIndex, 0);
-        executeOnMediaPlayedAdded();
         mHandler.sendEmptyMessage(SHOW_PROGRESS);
         showNotification();
         updateWidget();
@@ -1472,7 +1460,6 @@ public class PlaybackService extends Service {
 
         playIndex(mCurrentIndex, 0);
 
-        executeOnMediaPlayedAdded();
         mHandler.sendEmptyMessage(SHOW_PROGRESS);
         showNotification();
         updateWidget();
@@ -1528,7 +1515,6 @@ public class PlaybackService extends Service {
         mMediaPlayer.setEventListener(mMediaPlayerListener);
         mMediaPlayer.play();
 
-        executeOnMediaPlayedAdded();
         mHandler.sendEmptyMessage(SHOW_PROGRESS);
         showNotification();
         updateWidget();
diff --git a/vlc-android/src/org/videolan/vlc/gui/audio/AudioPlayer.java b/vlc-android/src/org/videolan/vlc/gui/audio/AudioPlayer.java
index 5b22b6a..aae3065 100644
--- a/vlc-android/src/org/videolan/vlc/gui/audio/AudioPlayer.java
+++ b/vlc-android/src/org/videolan/vlc/gui/audio/AudioPlayer.java
@@ -400,14 +400,6 @@ public class AudioPlayer extends PlaybackServiceFragment implements PlaybackServ
     }
 
     @Override
-    public void onMediaPlayedAdded(MediaWrapper media, int index) {
-    }
-
-    @Override
-    public void onMediaPlayedRemoved(int index) {
-    }
-
-    @Override
     public void onMediaEvent(Media.Event event) {
     }
 
diff --git a/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java b/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
index 3580898..ec168a5 100644
--- a/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
@@ -1301,14 +1301,6 @@ public class VideoPlayerActivity extends AppCompatActivity implements IVLCVout.C
     }
 
     @Override
-    public void onMediaPlayedAdded(MediaWrapper media, int index) {
-    }
-
-    @Override
-    public void onMediaPlayedRemoved(int index) {
-    }
-
-    @Override
     public void onMediaEvent(Media.Event event) {
         switch (event.type) {
             case Media.Event.ParsedChanged:



More information about the Android mailing list