From e1ec8c5623fec8c739737c7f85cde72a28065a42 Mon Sep 17 00:00:00 2001 From: tibbi Date: Thu, 9 Nov 2017 17:04:10 +0100 Subject: [PATCH] clean up some more things after usage at videofragment --- .../com/simplemobiletools/gallery/fragments/VideoFragment.kt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/fragments/VideoFragment.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/fragments/VideoFragment.kt index 228ac1fc8..bf0765466 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/fragments/VideoFragment.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/fragments/VideoFragment.kt @@ -458,10 +458,12 @@ class VideoFragment : ViewPagerFragment(), SurfaceHolder.Callback, SeekBar.OnSee mSeekBar?.progress = 0 mTimerHandler?.removeCallbacksAndMessages(null) mSurfaceView = null + mSurfaceHolder?.removeCallback(this) mSurfaceHolder = null } private fun releaseMediaPlayer() { + mMediaPlayer?.setSurface(null) mMediaPlayer?.release() mMediaPlayer = null }