Skip to content

Commit 59fa734

Browse files
committed
Return early if extras for PermissionsActivity is null
* This should never happen as the SDK does send extras for this Activity, and no other entity should be creating PermissionsActivity. * However, we have seen crash reports from our users that primarily seems to affect Nexus 5 and Pixel 3, in low numbers. * One theory is that automatic testing done by the google play store is explicitly driving the PermissionsActivity.
1 parent c324f43 commit 59fa734

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

OneSignalSDK/onesignal/core/src/main/java/com/onesignal/core/activities/PermissionsActivity.kt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,11 @@ class PermissionsActivity : Activity() {
2626
return
2727
}
2828

29+
if (intent.extras == null) {
30+
// This should never happen, but extras is null in rare crash reports
31+
return
32+
}
33+
2934
requestPermissionService = OneSignal.getService()
3035
preferenceService = OneSignal.getService()
3136

0 commit comments

Comments
 (0)