[Android] Video Player: Fix service KO after multitasking

Geoffrey Métais git at videolan.org
Mon Apr 29 10:31:20 CEST 2019


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Mon Apr 29 09:46:17 2019 +0200| [bae29f8c3dac02dd00c5d466d7240ad105586a0e] | committer: Geoffrey Métais

Video Player: Fix service KO after multitasking

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

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

diff --git a/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.kt b/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.kt
index 10cbfdf2a..24b6d57d5 100644
--- a/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.kt
+++ b/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.kt
@@ -501,7 +501,6 @@ open class VideoPlayerActivity : AppCompatActivity(), IPlaybackSettingsControlle
             mSavedTime = savedInstanceState.getLong(KEY_TIME)
             videoUri = savedInstanceState.getParcelable<Parcelable>(KEY_URI) as Uri?
         }
-        PlaybackService.start(this)
     }
 
     override fun onResume() {
@@ -670,6 +669,7 @@ open class VideoPlayerActivity : AppCompatActivity(), IPlaybackSettingsControlle
     @TargetApi(Build.VERSION_CODES.HONEYCOMB)
     override fun onStart() {
         super.onStart()
+        PlaybackService.start(this)
         PlaybackService.service.observe(this, this)
         restoreBrightness()
         val filter = IntentFilter(PLAY_FROM_SERVICE)



More information about the Android mailing list