[Android] [PATCH 3/3] VideoPlayer: remove callbacks on stop

Thomas Guillem thomas at gllm.fr
Mon Mar 16 18:20:06 CET 2015


Indeed FADE_OUT_MSG was processed when the activity was destroyed.
---
 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.");
-- 
2.1.3



More information about the Android mailing list