From c2d2f4631b57528244da665f8bf1bcd0cfd860a1 Mon Sep 17 00:00:00 2001 From: Arif Burak Demiray Date: Tue, 23 Jan 2024 11:18:21 +0300 Subject: [PATCH] feat: add log --- .../main/java/ly/count/sdk/java/internal/ModuleEvents.java | 5 +++-- .../main/java/ly/count/sdk/java/internal/ModuleViews.java | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/sdk-java/src/main/java/ly/count/sdk/java/internal/ModuleEvents.java b/sdk-java/src/main/java/ly/count/sdk/java/internal/ModuleEvents.java index ae016282..8f61f974 100644 --- a/sdk-java/src/main/java/ly/count/sdk/java/internal/ModuleEvents.java +++ b/sdk-java/src/main/java/ly/count/sdk/java/internal/ModuleEvents.java @@ -6,6 +6,7 @@ import java.util.stream.Collectors; import ly.count.sdk.java.Countly; import ly.count.sdk.java.Session; +import ly.count.sdk.java.View; public class ModuleEvents extends ModuleBase { protected EventQueue eventQueue = null; @@ -95,7 +96,7 @@ private synchronized void addEventsToRequestQ(String deviceId) { ModuleRequests.pushAsync(internalConfig, request); } - protected static void removeInvalidDataFromSegments(Map segments) { + protected static void removeInvalidDataFromSegments(Map segments, Log L) { if (segments == null || segments.isEmpty()) { return; @@ -125,7 +126,7 @@ protected void recordEventInternal(String key, int count, Double sum, Double dur L.d("[ModuleEvents] recordEventInternal, Recording event with key: [" + key + "] and provided event ID of:[" + eventIdOverride + "] and segmentation with:[" + (segmentation == null ? "null" : segmentation.size()) + "] keys"); - removeInvalidDataFromSegments(segmentation); + removeInvalidDataFromSegments(segmentation, L); String eventId, pvid = null, cvid = null; if (Utils.isEmptyOrNull(eventIdOverride)) { diff --git a/sdk-java/src/main/java/ly/count/sdk/java/internal/ModuleViews.java b/sdk-java/src/main/java/ly/count/sdk/java/internal/ModuleViews.java index 0595bc40..778638d9 100644 --- a/sdk-java/src/main/java/ly/count/sdk/java/internal/ModuleViews.java +++ b/sdk-java/src/main/java/ly/count/sdk/java/internal/ModuleViews.java @@ -92,14 +92,14 @@ void setGlobalViewSegmentationInternal(@Nullable Map segmentatio if (segmentation != null) { removeReservedKeysFromViewSegmentation(segmentation); - ModuleEvents.removeInvalidDataFromSegments(segmentation); + ModuleEvents.removeInvalidDataFromSegments(segmentation, L); globalViewSegmentation.putAll(segmentation); } } public void updateGlobalViewSegmentationInternal(@Nonnull Map segmentation) { removeReservedKeysFromViewSegmentation(segmentation); - ModuleEvents.removeInvalidDataFromSegments(segmentation); + ModuleEvents.removeInvalidDataFromSegments(segmentation, L); globalViewSegmentation.putAll(segmentation); }