File tree Expand file tree Collapse file tree 1 file changed +7
-12
lines changed
app/src/main/java/com/secure/privacyfirst/utils Expand file tree Collapse file tree 1 file changed +7
-12
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ import android.os.Build
1111import android.os.Environment
1212import android.util.Log
1313import android.webkit.URLUtil
14+ import androidx.core.content.ContextCompat
1415import androidx.core.content.FileProvider
1516import com.secure.privacyfirst.data.DownloadItem
1617import com.secure.privacyfirst.data.DownloadStatus
@@ -47,18 +48,12 @@ class DownloadManagerHelper(private val context: Context) {
4748 }
4849 }
4950
50- if (Build .VERSION .SDK_INT >= Build .VERSION_CODES .TIRAMISU ) {
51- context.registerReceiver(
52- receiver,
53- IntentFilter (DownloadManager .ACTION_DOWNLOAD_COMPLETE ),
54- Context .RECEIVER_NOT_EXPORTED
55- )
56- } else {
57- context.registerReceiver(
58- receiver,
59- IntentFilter (DownloadManager .ACTION_DOWNLOAD_COMPLETE )
60- )
61- }
51+ ContextCompat .registerReceiver(
52+ context,
53+ receiver,
54+ IntentFilter (DownloadManager .ACTION_DOWNLOAD_COMPLETE ),
55+ ContextCompat .RECEIVER_NOT_EXPORTED
56+ )
6257 }
6358
6459 fun startDownload (
You can’t perform that action at this time.
0 commit comments