[Android] Fix SecurityException

Nicolas Pomepuy git at videolan.org
Fri Oct 11 05:19:38 UTC 2024


vlc-android | branch: 3.5.x | Nicolas Pomepuy <nicolas at videolabs.io> | Wed Oct  9 07:26:59 2024 +0200| [a68578be852045d3e3c911a89dc3b326cca515c3] | committer: Nicolas Pomepuy

Fix SecurityException

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

 .../vlc-android/src/org/videolan/vlc/util/VLCDownloadManager.kt        | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/application/vlc-android/src/org/videolan/vlc/util/VLCDownloadManager.kt b/application/vlc-android/src/org/videolan/vlc/util/VLCDownloadManager.kt
index 2bf96ba090..9b5271deba 100644
--- a/application/vlc-android/src/org/videolan/vlc/util/VLCDownloadManager.kt
+++ b/application/vlc-android/src/org/videolan/vlc/util/VLCDownloadManager.kt
@@ -17,6 +17,7 @@ import kotlinx.coroutines.Dispatchers
 import kotlinx.coroutines.withContext
 import org.videolan.libvlc.util.Extensions
 import org.videolan.resources.AppContextProvider
+import org.videolan.resources.util.registerReceiverCompat
 import org.videolan.tools.isStarted
 import org.videolan.vlc.R
 import org.videolan.vlc.gui.dialogs.SubtitleItem
@@ -48,7 +49,7 @@ object VLCDownloadManager: BroadcastReceiver(), DefaultLifecycleObserver {
     }
 
     override fun onStart(owner: LifecycleOwner) {
-        AppContextProvider.appContext.applicationContext.registerReceiver(this, IntentFilter(DownloadManager.ACTION_DOWNLOAD_COMPLETE))
+        AppContextProvider.appContext.applicationContext.registerReceiverCompat(this, IntentFilter(DownloadManager.ACTION_DOWNLOAD_COMPLETE), true)
     }
 
     override fun onDestroy(owner: LifecycleOwner) {



More information about the Android mailing list