From 1f09ca8f4bdec8a7c6a5f0d804159180d43e0035 Mon Sep 17 00:00:00 2001 From: Sergio Villar Senin Date: Mon, 3 Feb 2025 16:26:14 +0100 Subject: [PATCH] DownloadManager: process intents from external apps That's required in Pico4Ultra to receive intents from the Android's DownloadManager. Without that, things like downloading environments don't work because we don't get notified when the download is finished. Fixes #1740 --- .../shared/com/igalia/wolvic/downloads/DownloadsManager.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/common/shared/com/igalia/wolvic/downloads/DownloadsManager.java b/app/src/common/shared/com/igalia/wolvic/downloads/DownloadsManager.java index d1d91bc0c4..f14411bed9 100644 --- a/app/src/common/shared/com/igalia/wolvic/downloads/DownloadsManager.java +++ b/app/src/common/shared/com/igalia/wolvic/downloads/DownloadsManager.java @@ -70,8 +70,8 @@ private void removeDownloadOnDiskIO(long id) { public void init() { IntentFilter filter = new IntentFilter(DownloadManager.ACTION_DOWNLOAD_COMPLETE); - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) { - mContext.registerReceiver(mDownloadReceiver, filter, null, mMainHandler, Context.RECEIVER_NOT_EXPORTED); + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) { + mContext.registerReceiver(mDownloadReceiver, filter, null, mMainHandler, Context.RECEIVER_EXPORTED); } else { mContext.registerReceiver(mDownloadReceiver, filter, null, mMainHandler); }