Skip to content

Commit

Permalink
fix: use RECEIVER_NOT_EXPORTED on API 33 and up (#663)
Browse files Browse the repository at this point in the history
  • Loading branch information
edusperoni authored Nov 11, 2024
1 parent 447a839 commit 1587e0e
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ inline fun <reified T : Parcelable> Intent.parcelableCompat(key: String): T? = w

@SuppressLint("UnspecifiedRegisterReceiverFlag")
fun Context.registerReceiverCompat(receiver: BroadcastReceiver, filter: IntentFilter) {
if (SDK_INT >= 34) {
if (SDK_INT >= 33) {
registerReceiver(receiver, filter, RECEIVER_NOT_EXPORTED)
} else {
registerReceiver(receiver, filter)
Expand Down

0 comments on commit 1587e0e

Please sign in to comment.