[Android] Video Player: Fix service KO after multitasking

Geoffrey Métais git at videolan.org
Thu Apr 25 16:52:13 CEST 2019


vlc-android | branch: 3.1.x | Geoffrey Métais <geoffrey.metais at gmail.com> | Thu Apr 25 16:50:20 2019 +0200| [65a7c33ead0d8fbdaea01701dfaed7546fffef23] | committer: Geoffrey Métais

Video Player: Fix service KO after multitasking

Fix #839

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

 vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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 3fd80a01b..0f24ddd24 100644
--- a/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
@@ -401,7 +401,6 @@ public class VideoPlayerActivity extends AppCompatActivity implements IPlaybackS
             mSavedTime = savedInstanceState.getLong(KEY_TIME);
             mUri = (Uri) savedInstanceState.getParcelable(KEY_URI);
         }
-        PlaybackService.Companion.start(this);
     }
 
     @Override
@@ -575,6 +574,7 @@ public class VideoPlayerActivity extends AppCompatActivity implements IPlaybackS
     @Override
     protected void onStart() {
         super.onStart();
+        PlaybackService.Companion.start(this);
         PlaybackService.Companion.getService().observe(this, this);
         restoreBrightness();
         final IntentFilter filter = new IntentFilter(Constants.PLAY_FROM_SERVICE);



More information about the Android mailing list