[Android] Fix leak in SuspendDialogCallback

Nicolas Pomepuy git at videolan.org
Thu Sep 7 08:21:02 UTC 2023


vlc-android | branch: master | Nicolas Pomepuy <nicolas at videolabs.io> | Tue Jul 25 14:08:06 2023 +0200| [2126724aa2ffab53da8a0162d3f0cfa41b6a1d48] | committer: Nicolas Pomepuy

Fix leak in SuspendDialogCallback

> https://code.videolan.org/videolan/vlc-android/commit/2126724aa2ffab53da8a0162d3f0cfa41b6a1d48
---

 application/vlc-android/src/org/videolan/vlc/media/MediaUtils.kt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/application/vlc-android/src/org/videolan/vlc/media/MediaUtils.kt b/application/vlc-android/src/org/videolan/vlc/media/MediaUtils.kt
index 799a15b983..8d12f79f62 100644
--- a/application/vlc-android/src/org/videolan/vlc/media/MediaUtils.kt
+++ b/application/vlc-android/src/org/videolan/vlc/media/MediaUtils.kt
@@ -7,7 +7,6 @@ import android.content.Intent
 import android.net.Uri
 import android.provider.MediaStore
 import android.provider.OpenableColumns
-import android.util.Log
 import androidx.annotation.WorkerThread
 import androidx.appcompat.app.AppCompatActivity
 import androidx.collection.SimpleArrayMap
@@ -429,6 +428,7 @@ object MediaUtils {
         private fun dismiss() {
             try {
                 if (this::dialog.isInitialized && dialog.isShowing) dialog.dismiss()
+                actor.close()
             } catch (ignored: IllegalArgumentException) {}
         }
     }



More information about the Android mailing list