[Android] Video: Do not override service repeat behavior

Geoffrey Métais git at videolan.org
Fri May 11 12:03:38 CEST 2018


vlc-android | branch: 3.0.x | Geoffrey Métais <geoffrey.metais at gmail.com> | Fri May 11 12:02:03 2018 +0200| [ae7ef700563cd14f0ab6b64d90d03e3ccdfb5adb] | committer: Geoffrey Métais

Video: Do not override service repeat behavior

> https://code.videolan.org/videolan/vlc-android/commit/ae7ef700563cd14f0ab6b64d90d03e3ccdfb5adb
---

 .../vlc/gui/video/VideoPlayerActivity.java         | 28 ----------------------
 1 file changed, 28 deletions(-)

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 2c6b03225..0e75681d3 100644
--- a/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
@@ -1605,11 +1605,6 @@ public class VideoPlayerActivity extends AppCompatActivity implements IVLCVout.C
             case MediaPlayer.Event.Stopped:
                 exitOK();
                 break;
-            case MediaPlayer.Event.EndReached:
-                /* Don't end the activity if the media has subitems since the next child will be
-                 * loaded by the PlaybackService */
-                if (!mHasSubItems) endReached();
-                break;
             case MediaPlayer.Event.EncounteredError:
                 encounteredError();
                 break;
@@ -1748,29 +1743,6 @@ public class VideoPlayerActivity extends AppCompatActivity implements IVLCVout.C
             mTitle.setText(mw.getTitle());
     }
 
-    private void endReached() {
-        if (mService == null)
-            return;
-        if (mService.getRepeatType() == Constants.REPEAT_ONE){
-            seek(0);
-            return;
-        }
-//        if (mService.expand(false) == 0) {
-//            mHandler.removeMessages(LOADING_ANIMATION);
-//            mHandler.sendEmptyMessageDelayed(LOADING_ANIMATION, LOADING_ANIMATION_DELAY);
-//            Log.d(TAG, "Found a video playlist, expanding it");
-//            mHandler.post(new Runnable() {
-//                @Override
-//                public void run() {
-//                    loadMedia();
-//                }
-//            });
-//        }
-        //Ignore repeat 
-        if (mService.getRepeatType() == Constants.REPEAT_ALL && mService.getMediaListSize() == 1)
-            exitOK();
-    }
-
     private void encounteredError() {
         if (isFinishing() || mService.hasNext()) return;
         /* Encountered Error, exit player with a message */



More information about the Android mailing list