From 62c15e850991026d30a639ccfc1ce4894e480304 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B1=A4=E8=B6=85?= Date: Tue, 26 Apr 2016 17:20:35 +0800 Subject: [PATCH] remove all message and callback when destroy --- .../java/tcking/github/com/giraffeplayer/GiraffePlayer.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/giraffeplayer/src/main/java/tcking/github/com/giraffeplayer/GiraffePlayer.java b/giraffeplayer/src/main/java/tcking/github/com/giraffeplayer/GiraffePlayer.java index 05df8a2..d81c17e 100644 --- a/giraffeplayer/src/main/java/tcking/github/com/giraffeplayer/GiraffePlayer.java +++ b/giraffeplayer/src/main/java/tcking/github/com/giraffeplayer/GiraffePlayer.java @@ -528,9 +528,7 @@ private void setFullScreen(boolean fullScreen) { public void onDestroy() { orientationEventListener.disable(); - handler.removeMessages(MESSAGE_RESTART_PLAY); - handler.removeMessages(MESSAGE_FADE_OUT); - handler.removeMessages(MESSAGE_SEEK_NEW_POSITION); + handler.removeCallbacksAndMessages(null); videoView.stopPlayback(); }