Skip to content

Commit

Permalink
Merge pull request #1848 from kyunkakata/main
Browse files Browse the repository at this point in the history
fix: NullPointerException getTargetSdkVersion
  • Loading branch information
jkasten2 authored Sep 26, 2023
2 parents 2cbb251 + 896ec50 commit 08b951c
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,10 @@ object NotificationPermissionController : PermissionsActivity.PermissionCallback
}

@ChecksSdkIntAtLeast(api = 33)
val supportsNativePrompt =
val supportsNativePrompt: Boolean by lazy = {
Build.VERSION.SDK_INT > 32 &&
OSUtils.getTargetSdkVersion(OneSignal.appContext) > 32
}

fun prompt(
fallbackToSettings: Boolean,
Expand Down

0 comments on commit 08b951c

Please sign in to comment.