From d5a3a5fdf76a1792f60be3baa57d9bd9da8a9b5c Mon Sep 17 00:00:00 2001 From: Miranda Wilson Date: Mon, 15 Apr 2024 11:07:58 +0100 Subject: [PATCH] Fix something that should be optional --- .../main/java/com/snowplowanalytics/core/tracker/Subject.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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)