TP-82827 | fix | receiver flag updated to type exported for downloadi… (#12454)

This commit is contained in:
Soumya Ranjan Patra
2024-09-10 19:37:39 +05:30
committed by GitHub
parent 3f7281fcbf
commit 153c303f9e
7 changed files with 10 additions and 7 deletions

View File

@@ -167,7 +167,7 @@ class NaviDownloadManager(private val activityRef: WeakReference<Activity>) {
activityRef,
onDownloadComplete,
IntentFilter(DownloadManager.ACTION_DOWNLOAD_COMPLETE),
false
true
)
}
isRegistered.set(true)

View File

@@ -61,7 +61,7 @@ constructor(
context,
downloadStatusReceiver,
downloadCompleteIntentFilter,
false
true
)
}

View File

@@ -57,7 +57,7 @@ constructor(
context,
downloadStatusReceiver,
downloadCompleteIntentFilter,
false
true
)
}
}

View File

@@ -481,12 +481,15 @@ fun DestinationsNavigator.navigateUp(activity: Activity) {
}
}
/**
* @param listenToBroadcastsFromOtherApps is false only for broadcast received from inside the app.
*/
@SuppressLint("UnspecifiedRegisterReceiverFlag")
fun registerReceiverWithVersionCheck(
context: Context,
broadcastReceiver: BroadcastReceiver?,
intentFilter: IntentFilter,
listenToBroadcastsFromOtherApps: Boolean = false,
listenToBroadcastsFromOtherApps: Boolean = true,
) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
val receiverFlags =

View File

@@ -100,7 +100,7 @@ class NetworkVM : BaseVM(false) {
AppServiceManager.application.applicationContext,
downloadCompleteReceiver,
IntentFilter(DownloadManager.ACTION_DOWNLOAD_COMPLETE),
false
true
)
downloadManager?.enqueue(request)
}

View File

@@ -236,7 +236,7 @@ class WebViewFragment : BaseFragment() {
it,
onDownloadingCompleteListener,
IntentFilter(DownloadManager.ACTION_DOWNLOAD_COMPLETE),
false
true
)
}
}

View File

@@ -194,7 +194,7 @@ class NaviPolicyDocumentDownloadManager(
activityRef,
onDownloadComplete,
IntentFilter(DownloadManager.ACTION_DOWNLOAD_COMPLETE),
false
true
)
}
isRegistered.set(true)