From 3aa5901ddf081a90d30a0760faaa67fce279c903 Mon Sep 17 00:00:00 2001 From: Sawyer Blatz Date: Wed, 30 Oct 2019 10:13:03 -0700 Subject: [PATCH] [fenix] Fixes https://github.com/mozilla-mobile/fenix/issues/6344: Adds null check for adjust campaign (https://github.com/mozilla-mobile/fenix/pull/6348) --- .../mozilla/fenix/components/metrics/AdjustMetricsService.kt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/org/mozilla/fenix/components/metrics/AdjustMetricsService.kt b/app/src/main/java/org/mozilla/fenix/components/metrics/AdjustMetricsService.kt index f2868a28c7..4cb1691e5c 100644 --- a/app/src/main/java/org/mozilla/fenix/components/metrics/AdjustMetricsService.kt +++ b/app/src/main/java/org/mozilla/fenix/components/metrics/AdjustMetricsService.kt @@ -35,7 +35,9 @@ class AdjustMetricsService(private val application: Application) : MetricsServic ) config.setOnAttributionChangedListener { - application.applicationContext.settings().adjustCampaignId = it.campaign + it.campaign?.let { campaign -> + application.applicationContext.settings().adjustCampaignId = campaign + } } config.setLogLevel(LogLevel.SUPRESS)