[Android] Video player: Start playback service later

Geoffrey Métais git at videolan.org
Wed Mar 27 15:14:56 CET 2019


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Tue Mar 26 18:32:17 2019 +0100| [42a66683121198ffdd8058127b764bf7691449eb] | committer: Geoffrey Métais

Video player: Start playback service later

Should reduce ANR

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

 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 e1bfec05d..7a35201d1 100644
--- a/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
@@ -288,7 +288,6 @@ public class VideoPlayerActivity extends AppCompatActivity implements IPlaybackS
     protected void onCreate(Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
 
-        PlaybackService.Companion.start(this);
         Util.checkCpuCompatibility(this);
 
         mSettings = Settings.INSTANCE.getInstance(this);
@@ -402,6 +401,7 @@ public class VideoPlayerActivity extends AppCompatActivity implements IPlaybackS
             mSavedTime = savedInstanceState.getLong(KEY_TIME);
             mUri = (Uri) savedInstanceState.getParcelable(KEY_URI);
         }
+        PlaybackService.Companion.start(this);
     }
 
     @Override



More information about the Android mailing list