From a0c00cb3b47317fc77808ee789cdcfa7f1e1fe35 Mon Sep 17 00:00:00 2001 From: Stefan Arentz Date: Wed, 30 Sep 2020 13:05:28 -0400 Subject: [PATCH] [fenix] For https://github.com/mozilla-mobile/fenix/issues/15537 - Be more verbose about leanplum identifiers (https://github.com/mozilla-mobile/fenix/pull/15538) --- .../fenix/components/metrics/LeanplumMetricsService.kt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/app/src/main/java/org/mozilla/fenix/components/metrics/LeanplumMetricsService.kt b/app/src/main/java/org/mozilla/fenix/components/metrics/LeanplumMetricsService.kt index 3012e1aa19..fab3b956c9 100644 --- a/app/src/main/java/org/mozilla/fenix/components/metrics/LeanplumMetricsService.kt +++ b/app/src/main/java/org/mozilla/fenix/components/metrics/LeanplumMetricsService.kt @@ -105,6 +105,8 @@ class LeanplumMetricsService( if (!application.settings().isMarketingTelemetryEnabled) return + Log.i(LOGTAG, "Starting Leanplum with device id: $deviceId") + Leanplum.setIsTestModeEnabled(false) Leanplum.setApplicationContext(application) Leanplum.setDeviceId(deviceId) @@ -171,6 +173,8 @@ class LeanplumMetricsService( LeanplumInternal.setCalledStart(true) LeanplumInternal.setHasStarted(true) LeanplumInternal.setStartedInBackground(true) + Log.i(LOGTAG, "Started Leanplum with deviceId ${Leanplum.getDeviceId()}" + + " and userId ${Leanplum.getUserId()}") } } } @@ -185,6 +189,9 @@ class LeanplumMetricsService( // We compare the local Leanplum device ID against the "uid" query parameter and only // accept deep links where both values match. val uid = deepLink.getQueryParameter("uid") + if (uid != deviceId) { + Log.i(LOGTAG, "Rejecting Leanplum deep link because uid $uid does not match $deviceId") + } return uid == deviceId }