mirror of
https://github.com/yuzu-emu/yuzu-android.git
synced 2025-09-05 12:33:27 +00:00
Merge pull request #24 from MNCHL/MNCHL-patch-25
Update DownloadCompleteReceiver.kt
This commit is contained in:
commit
e595baf861
|
@ -6,15 +6,16 @@ import android.content.Context
|
|||
import android.content.Intent
|
||||
import android.database.Cursor
|
||||
import android.net.Uri
|
||||
import android.os.Environment
|
||||
import androidx.core.content.FileProvider
|
||||
import java.io.File
|
||||
|
||||
class DownloadCompleteReceiver(private val downloadId: Long, private val onDownloadComplete: (Uri?) -> Unit) : BroadcastReceiver() {
|
||||
|
||||
class DownloadCompleteReceiver(
|
||||
private val downloadId: Long,
|
||||
private val onDownloadComplete: (Uri?) -> Unit
|
||||
) : BroadcastReceiver() {
|
||||
override fun onReceive(context: Context?, intent: Intent?) {
|
||||
if (DownloadManager.ACTION_DOWNLOAD_COMPLETE == intent?.action) {
|
||||
val downloadManager = context?.getSystemService(Context.DOWNLOAD_SERVICE) as DownloadManager
|
||||
val downloadManager =
|
||||
context?.getSystemService(Context.DOWNLOAD_SERVICE) as DownloadManager
|
||||
val query = DownloadManager.Query().setFilterById(downloadId)
|
||||
val cursor: Cursor = downloadManager.query(query)
|
||||
|
||||
|
|
Loading…
Reference in a new issue