[Android] VideoPlayer: remove callbacks on stop

Thomas Guillem git at videolan.org
Mon Mar 16 18:22:05 CET 2015


vlc-ports/android | branch: master | Thomas Guillem <thomas at gllm.fr> | Mon Mar 16 18:17:51 2015 +0100| [fff6e15acb28408d94b0e4fcb9d539f2259ac7c2] | committer: Thomas Guillem

VideoPlayer: remove callbacks on stop

Indeed FADE_OUT_MSG was processed when the activity was destroyed.

> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=fff6e15acb28408d94b0e4fcb9d539f2259ac7c2
---

 vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java |    3 +++
 1 file changed, 3 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 6d8d8f7..0c00afa 100644
--- a/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
@@ -613,6 +613,9 @@ public class VideoPlayerActivity extends ActionBarActivity implements IVideoPlay
     protected void onStop() {
         super.onStop();
 
+        mHandler.removeCallbacksAndMessages(null);
+        eventHandler.removeCallbacksAndMessages(null);
+
         // Dismiss the presentation when the activity is not visible.
         if (mPresentation != null) {
             Log.i(TAG, "Dismissing presentation because the activity is no longer visible.");



More information about the Android mailing list