When the function annotated with @NeedsPermission has a nullable parameter, the generated function in the dispatcher have a non nullable one instead.
The **WithPermissionCheck generated method should use a nullable parameter too
The **WithPermissionCheck use a non-nullable parameter
//Function in Activity
@NeedsPermission(Manifest.permission.ACCESS_COARSE_LOCATION)
internal fun functionWithNullableParameter(string: String?) {
//...
}
//Generated function in the PermissionsDispatcher
fun HomeActivity.functionWithNullableParameterWithPermissionCheck(string: String) {
//...
}
Thanks for reporting! Yeah, we should obey the nullability of parameters given to permission-protected methods.
Most helpful comment
Thanks for reporting! Yeah, we should obey the nullability of parameters given to permission-protected methods.