[Android] Benchmark: fix exported requirement for broadcasts

Duncan McNamara git at videolan.org
Tue Mar 12 11:00:13 UTC 2024


vlc-android | branch: master | Duncan McNamara <dcn.mcnamara at gmail.com> | Mon Mar 11 17:00:46 2024 +0100| [7b104641b0ca8ddf37d0fa03c302c8f5e0567760] | committer: Duncan McNamara

Benchmark: fix exported requirement for broadcasts

This is required from Android 14 and on.

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

 .../src/org/videolan/vlc/gui/video/benchmark/BenchActivity.kt          | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/application/vlc-android/src/org/videolan/vlc/gui/video/benchmark/BenchActivity.kt b/application/vlc-android/src/org/videolan/vlc/gui/video/benchmark/BenchActivity.kt
index 7ad1285f80..d66e12b523 100644
--- a/application/vlc-android/src/org/videolan/vlc/gui/video/benchmark/BenchActivity.kt
+++ b/application/vlc-android/src/org/videolan/vlc/gui/video/benchmark/BenchActivity.kt
@@ -39,6 +39,7 @@ import kotlinx.coroutines.Dispatchers
 import kotlinx.coroutines.launch
 import org.videolan.libvlc.MediaPlayer
 import org.videolan.resources.VLCInstance
+import org.videolan.resources.util.registerReceiverCompat
 import org.videolan.tools.AppScope
 import org.videolan.tools.Settings
 import org.videolan.vlc.PlaybackService
@@ -210,7 +211,7 @@ class BenchActivity : ShallowVideoPlayer() {
         // Minimum apk for benchmark is 21, so this warning is a non-issue
         requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_LOCKED
 
-        registerReceiver(broadcastReceiver, IntentFilter(ACTION_CONTINUE_BENCHMARK))
+        this.registerReceiverCompat(broadcastReceiver, IntentFilter(ACTION_CONTINUE_BENCHMARK), true)
     }
 
     override fun onResume() {



More information about the Android mailing list