Skip to content

Commit bbd4123

Browse files
committed
Removed call to setRequiresUserConesnt when there is no value for PrivacyConsent in the manifest
1 parent 2e1fd4a commit bbd4123

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

OneSignalSDK/onesignal/src/main/java/com/onesignal/OneSignal.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -883,7 +883,8 @@ private static void setupPrivacyConsent(Context context) {
883883

884884
// Read the current privacy consent setting from AndroidManifest.xml
885885
String requireSetting = bundle.getString("com.onesignal.PrivacyConsent");
886-
setRequiresUserPrivacyConsent("ENABLE".equalsIgnoreCase(requireSetting));
886+
if (requireSetting!=null)
887+
setRequiresUserPrivacyConsent("ENABLE".equalsIgnoreCase(requireSetting));
887888
} catch (Throwable t) {
888889
t.printStackTrace();
889890
}

0 commit comments

Comments
 (0)