Skip to content

Commit

Permalink
fix: NullPointerException getTargetSdkVersion
Browse files Browse the repository at this point in the history
fix: change to lazy variable

lint

lint

fix: wrong lazy implement

fix: add check sdk back
  • Loading branch information
kyunkakata committed Sep 26, 2023
1 parent 2cbb251 commit 896ec50
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 896ec50

Please sign in to comment.