File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
lib/src/main/java/com/segment/analytics/kotlin/consent/onetrust Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ import android.content.Context
5
5
import android.content.Intent
6
6
import android.content.IntentFilter
7
7
import android.util.Log
8
+ import androidx.core.content.ContextCompat
8
9
import com.onetrust.otpublishers.headless.Public.Keys.OTBroadcastServiceKeys
9
10
import com.segment.analytics.kotlin.consent.ConsentManager
10
11
import java.lang.ref.WeakReference
@@ -26,9 +27,11 @@ class OneTrustConsentChangedNotifier(
26
27
categories.forEach {
27
28
28
29
if (context != null ) {
29
- context.registerReceiver(
30
+ ContextCompat .registerReceiver(
31
+ context,
30
32
OneTrustConsentChangedReceiver (consentPlugin),
31
- IntentFilter (OTBroadcastServiceKeys .OT_CONSENT_UPDATED )
33
+ IntentFilter (OTBroadcastServiceKeys .OT_CONSENT_UPDATED ),
34
+ ContextCompat .RECEIVER_NOT_EXPORTED
32
35
)
33
36
}
34
37
}
You can’t perform that action at this time.
0 commit comments