diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/Subject.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/Subject.kt index 9c6025ffa..8af9aca43 100755 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/Subject.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/Subject.kt @@ -229,8 +229,8 @@ class Subject(context: Context, config: SubjectConfigurationInterface?) { * @param context the Android context * @param useContextResourcesScreenResolution whether to get the size from the context resources or not */ - private fun setDefaultScreenResolution(context: Context, useContextResourcesScreenResolution: Boolean) { - if (useContextResourcesScreenResolution) { + private fun setDefaultScreenResolution(context: Context, useContextResourcesScreenResolution: Boolean?) { + if (useContextResourcesScreenResolution == true) { val width = context.resources.displayMetrics.widthPixels val height = context.resources.displayMetrics.heightPixels screenResolution = Size(width, height)