[Android] Video player: fix subtitles lost on multitasking

Geoffrey Métais git at videolan.org
Thu Jun 13 16:33:20 CEST 2019


vlc-android | branch: 3.1.x | Geoffrey Métais <geoffrey.metais at gmail.com> | Thu Jun 13 16:32:51 2019 +0200| [73ee527b8c858aea641da88f3f8e95503db34787] | committer: Geoffrey Métais

Video player: fix subtitles lost on multitasking

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

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

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 30c2dc2cc..cdd45007a 100644
--- a/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
@@ -619,6 +619,9 @@ public class VideoPlayerActivity extends AppCompatActivity implements IPlaybackS
         // Clear Intent to restore playlist on activity restart
         setIntent(new Intent());
         mHandler.removeCallbacksAndMessages(null);
+        removeDownloadedSubtitlesObserver();
+        previousMediaPath = null;
+        addedExternalSubs.clear();
     }
 
     private void saveBrightness() {
@@ -2954,6 +2957,9 @@ public class VideoPlayerActivity extends AppCompatActivity implements IPlaybackS
             mService.removeCallback(this);
             mService = null;
             mHandler.sendEmptyMessage(AUDIO_SERVICE_CONNECTION_FAILED);
+            removeDownloadedSubtitlesObserver();
+            previousMediaPath = null;
+            addedExternalSubs.clear();
         }
     }
 



More information about the Android mailing list