Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RUM-1189 fix duplicate views in MixedViewTrackingStrategy #1639

Merged
merged 1 commit into from
Sep 26, 2023

Conversation

xgouchet
Copy link
Member

What does this PR do?

Fix #1614

Because the inner Activity and Fragment ViewTrackingStrategies used by the MixedViewTrackingStrategy also listen to activity lifecycle callbacks, RUM start view events are called twice, resulting in duplicated events.

@xgouchet xgouchet requested a review from a team as a code owner September 25, 2023 14:03
@xgouchet xgouchet force-pushed the xgouchet/RUM-1189/duplicate_views branch from fae9dd4 to 3653664 Compare September 25, 2023 15:40
@codecov-commenter
Copy link

codecov-commenter commented Sep 25, 2023

Codecov Report

Merging #1639 (3653664) into develop (99c47fb) will decrease coverage by 0.07%.
The diff coverage is n/a.

@@             Coverage Diff             @@
##           develop    #1639      +/-   ##
===========================================
- Coverage    83.72%   83.64%   -0.07%     
===========================================
  Files          456      456              
  Lines        15716    15695      -21     
  Branches      2340     2339       -1     
===========================================
- Hits         13157    13128      -29     
- Misses        1927     1941      +14     
+ Partials       632      626       -6     
Files Coverage Δ
.../android/rum/tracking/MixedViewTrackingStrategy.kt 81.48% <ø> (-7.41%) ⬇️

... and 24 files with indirect coverage changes

@@ -50,6 +48,8 @@ class MixedViewTrackingStrategy internal constructor(
)
)

// region ActivityLifecycleTrackingStrategy

override fun register(sdkCore: SdkCore, context: Context) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this was brought with the sdk v2 as before we did not register the strategies.

@xgouchet xgouchet merged commit 2d15670 into develop Sep 26, 2023
@xgouchet xgouchet deleted the xgouchet/RUM-1189/duplicate_views branch September 26, 2023 09:37
@xgouchet xgouchet added this to the 2.2.0 milestone Dec 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

View's duplicated when using version 2.x
3 participants