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

[MM-62491] Removing exported receivers. #8466

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
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 @@ -23,15 +23,15 @@ diff --git a/node_modules/@voximplant/react-native-foreground-service/android/sr
index afc578c..c8c32e3 100644
--- a/node_modules/@voximplant/react-native-foreground-service/android/src/main/java/com/voximplant/foregroundservice/VIForegroundServiceModule.java
+++ b/node_modules/@voximplant/react-native-foreground-service/android/src/main/java/com/voximplant/foregroundservice/VIForegroundServiceModule.java
@@ -110,7 +110,11 @@ public class VIForegroundServiceModule extends ReactContextBaseJavaModule {
@@ -110,7 +110,11 @@ public class VIForegroundServiceModule extends ReactContextBaseJavaModul

IntentFilter filter = new IntentFilter();
filter.addAction(FOREGROUND_SERVICE_BUTTON_PRESSED);
- getReactApplicationContext().registerReceiver(foregroundReceiver, filter);
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
+ getReactApplicationContext().registerReceiver(foregroundReceiver, filter, Context.RECEIVER_EXPORTED);
+ getReactApplicationContext().registerReceiver(foregroundReceiver, filter, Context.RECEIVER_NOT_EXPORTED);
+ } else {
+ getReactApplicationContext().registerReceiver(foregroundReceiver, filter);
+ getReactApplicationContext().registerReceiver(foregroundReceiver, filter, null, null, ContextCompat.RECEIVER_NOT_EXPORTED);
+ }

if (componentName != null) {
Expand Down
Loading