Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CP Staging] fix: add missing parameter when registering broadcast receiver #55513

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import android.content.ComponentName
import android.content.Context
import android.content.Intent
import android.content.IntentFilter
import android.os.Build
import android.os.PersistableBundle
import android.util.Log

Expand All @@ -27,7 +28,13 @@ class ReactNativeBackgroundTaskModule internal constructor(context: ReactApplica

init {
val filter = IntentFilter("com.expensify.reactnativebackgroundtask.TASK_ACTION")
reactApplicationContext.registerReceiver(taskReceiver, filter)
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
reactApplicationContext.registerReceiver(
taskReceiver,
filter,
Context.RECEIVER_EXPORTED
)
}
}

override fun getName(): String {
Expand Down
Loading