Skip to content

Commit

Permalink
restore: Runtime-registered broadcasts receivers must specify export …
Browse files Browse the repository at this point in the history
…behavior

See: https://developer.android.com/about/versions/14/behavior-changes-14#runtime-receivers-exported
Change-Id: I6f80a060370a0b202c277924ea8cbf565bc29d6e
  • Loading branch information
chirayudesai committed Oct 9, 2023
1 parent 3938549 commit aa78238
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ internal class ApkInstaller(private val context: Context) {
cont.resume(onBroadcastReceived(i, packageName, cachedApks, installResult))
}
}
context.registerReceiver(broadcastReceiver, IntentFilter(BROADCAST_ACTION))
context.registerReceiver(broadcastReceiver, IntentFilter(BROADCAST_ACTION),
Context.RECEIVER_NOT_EXPORTED)
cont.invokeOnCancellation { context.unregisterReceiver(broadcastReceiver) }

install(cachedApks, installerPackageName)
Expand Down

0 comments on commit aa78238

Please sign in to comment.