Skip to content

Commit

Permalink
fix: add null check for extras
Browse files Browse the repository at this point in the history
  • Loading branch information
jinliu9508 committed Dec 2, 2024
1 parent 7c15a59 commit 752b53d
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ class PermissionsActivity : Activity() {

private fun handleBundleParams(extras: Bundle?) {
// https://github.com/OneSignal/OneSignal-Android-SDK/issues/30
// Activity maybe invoked directly through automated testing, omit prompting on old Android versions.
if (Build.VERSION.SDK_INT < 23) {
// Activity maybe invoked directly through automated testing, omit prompting on old Android versions or extra being null.
if (Build.VERSION.SDK_INT < 23 || extras == null) {
finish()
overridePendingTransition(R.anim.onesignal_fade_in, R.anim.onesignal_fade_out)
return
Expand Down

0 comments on commit 752b53d

Please sign in to comment.