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-7005: updating dependencies, adjusting detekt rules, fix tests #2463

Merged
Merged
1 change: 1 addition & 0 deletions LICENSE-3rdparty.csv
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ import,androidx.multidex,Apache-2.0,Copyright 2018 The Android Open Source Proje
import,androidx.navigation,Apache-2.0,Copyright 2018 The Android Open Source Project
import,androidx.print,Apache-2.0,Copyright 2018 The Android Open Source Project
import,androidx.recyclerview,Apache-2.0,Copyright 2018 The Android Open Source Project
import,androidx.resourceinspection,Apache-2.0,Copyright 2018 The Android Open Source Project
import,androidx.room,Apache-2.0,Copyright 2018 The Android Open Source Project
import,androidx.savedstate,Apache-2.0,Copyright 2018 The Android Open Source Project
import,androidx.slidingpanelayout,Apache-2.0,Copyright 2018 The Android Open Source Project
Expand Down
6 changes: 3 additions & 3 deletions dd-sdk-android-core/transitiveDependencies
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
Dependencies List

androidx.annotation:annotation-experimental:1.1.0 : 16 Kb
androidx.annotation:annotation:1.3.0 : 30 Kb
androidx.annotation:annotation-jvm:1.9.1 : 59 Kb
androidx.arch.core:core-common:2.1.0 : 10 Kb
androidx.arch.core:core-runtime:2.1.0 : 5 Kb
androidx.collection:collection:1.1.0 : 41 Kb
androidx.collection:collection-jvm:1.4.5 : 770 Kb
androidx.lifecycle:lifecycle-common:2.1.0 : 21 Kb
androidx.lifecycle:lifecycle-livedata-core:2.1.0 : 8 Kb
androidx.lifecycle:lifecycle-livedata:2.1.0 : 10 Kb
Expand All @@ -21,5 +21,5 @@ org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.9.10 : 965 b
org.jetbrains.kotlin:kotlin-stdlib:1.9.24 : 1678 Kb
org.jetbrains:annotations:13.0 : 17 Kb

Total transitive dependencies size : 4 Mb
Total transitive dependencies size : 5 Mb

7 changes: 5 additions & 2 deletions detekt_custom.yml
Original file line number Diff line number Diff line change
Expand Up @@ -412,6 +412,8 @@ datadog:
- "android.view.Choreographer.postFrameCallback(android.view.Choreographer.FrameCallback)"
- "android.view.Display.getSize(android.graphics.Point?)"
- "android.view.FrameMetrics.getMetric(kotlin.Int)"
- "android.view.GestureDetector.constructor(android.content.Context?, android.view.GestureDetector.OnGestureListener)"
- "android.view.GestureDetector.onTouchEvent(android.view.MotionEvent)"
- "android.view.MotionEvent.PointerCoords.constructor()"
- "android.view.MotionEvent.getPointerCoords(kotlin.Int, android.view.MotionEvent.PointerCoords)"
- "android.view.MotionEvent.getPointerId(kotlin.Int)"
Expand Down Expand Up @@ -537,15 +539,16 @@ datadog:
- "androidx.compose.ui.semantics.SemanticsConfiguration.firstOrNull(kotlin.Function1)"
- "androidx.compose.ui.semantics.SemanticsConfiguration.getOrNull(androidx.compose.ui.semantics.SemanticsPropertyKey)"
- "androidx.compose.ui.text.AnnotatedString.getStringAnnotations(kotlin.Int, kotlin.Int)"
- "androidx.core.view.GestureDetectorCompat.constructor(android.content.Context?, android.view.GestureDetector.OnGestureListener?)"
- "androidx.core.view.GestureDetectorCompat.onTouchEvent(android.view.MotionEvent?)"
- "androidx.core.view.GestureDetectorCompat.constructor(android.content.Context, android.view.GestureDetector.OnGestureListener)"
- "androidx.core.view.GestureDetectorCompat.onTouchEvent(android.view.MotionEvent)"
- "androidx.fragment.app.FragmentManager.FragmentLifecycleCallbacks.onFragmentActivityCreated(androidx.fragment.app.FragmentManager, androidx.fragment.app.Fragment, android.os.Bundle?)"
- "androidx.fragment.app.FragmentManager.FragmentLifecycleCallbacks.onFragmentAttached(androidx.fragment.app.FragmentManager, androidx.fragment.app.Fragment, android.content.Context)"
- "androidx.fragment.app.FragmentManager.FragmentLifecycleCallbacks.onFragmentDestroyed(androidx.fragment.app.FragmentManager, androidx.fragment.app.Fragment)"
- "androidx.fragment.app.FragmentManager.FragmentLifecycleCallbacks.onFragmentPaused(androidx.fragment.app.FragmentManager, androidx.fragment.app.Fragment)"
- "androidx.fragment.app.FragmentManager.FragmentLifecycleCallbacks.onFragmentResumed(androidx.fragment.app.FragmentManager, androidx.fragment.app.Fragment)"
- "androidx.fragment.app.FragmentManager.FragmentLifecycleCallbacks.onFragmentStarted(androidx.fragment.app.FragmentManager, androidx.fragment.app.Fragment)"
- "androidx.fragment.app.FragmentManager.FragmentLifecycleCallbacks.onFragmentStopped(androidx.fragment.app.FragmentManager, androidx.fragment.app.Fragment)"
- "androidx.fragment.app.FragmentManager.FragmentLifecycleCallbacks.onFragmentViewCreated(androidx.fragment.app.FragmentManager, androidx.fragment.app.Fragment, android.view.View, android.os.Bundle?)"
- "androidx.fragment.app.FragmentManager.findFragmentById(kotlin.Int)"
- "androidx.fragment.app.FragmentManager.registerFragmentLifecycleCallbacks(androidx.fragment.app.FragmentManager.FragmentLifecycleCallbacks, kotlin.Boolean)"
- "androidx.fragment.app.FragmentManager.unregisterFragmentLifecycleCallbacks(androidx.fragment.app.FragmentManager.FragmentLifecycleCallbacks)"
Expand Down
4 changes: 2 additions & 2 deletions features/dd-sdk-android-logs/transitiveDependencies
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
Dependencies List

androidx.annotation:annotation:1.3.0 : 30 Kb
androidx.annotation:annotation-jvm:1.9.1 : 59 Kb
com.google.code.gson:gson:2.10.1 : 276 Kb
org.jetbrains.kotlin:kotlin-stdlib:1.9.24 : 1678 Kb
org.jetbrains:annotations:13.0 : 17 Kb

Total transitive dependencies size : 2003 Kb
Total transitive dependencies size : 2031 Kb

Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
package com.datadog.android.rum.internal.tracking

import android.os.Bundle
import android.view.View
import androidx.annotation.MainThread
import androidx.fragment.app.DialogFragment
import androidx.fragment.app.Fragment
Expand Down Expand Up @@ -57,23 +58,17 @@ internal open class AndroidXFragmentLifecycleCallbacks(
}

// endregion
override fun onFragmentViewCreated(fm: FragmentManager, f: Fragment, v: View, savedInstanceState: Bundle?) {
super.onFragmentViewCreated(fm, f, v, savedInstanceState)
startGesturesTracking(f)
}

// TODO RUM-3793 Update Androidx packages and handle deprecated APIs
@MainThread
override fun onFragmentActivityCreated(
fm: FragmentManager,
f: Fragment,
savedInstanceState: Bundle?
) {
super.onFragmentActivityCreated(fm, f, savedInstanceState)

val context = f.context

if (f is DialogFragment && context != null && this::sdkCore.isInitialized) {
val window = f.dialog?.window
val gesturesTracker = rumFeature.actionTrackingStrategy.getGesturesTracker()
gesturesTracker.startTracking(window, context, sdkCore)
}
private fun startGesturesTracking(f: Fragment) {
val context = f.context ?: return
if (f !is DialogFragment || !this::sdkCore.isInitialized) return

rumFeature.actionTrackingStrategy.getGesturesTracker()
.startTracking(f.dialog?.window, context, sdkCore)
}

@MainThread
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -281,23 +281,23 @@ internal class AndroidXFragmentLifecycleCallbacksTest {
// endregion

@Test
fun `when fragment activity created on DialogFragment, it will register a Window Callback`() {
fun `when fragment view created on DialogFragment, it will register a Window Callback`() {
val mockDialogFragment: DialogFragment = mock()
whenever(mockDialogFragment.context) doReturn mockContext
whenever(mockDialogFragment.dialog) doReturn mockDialog
whenever(mockDialog.window) doReturn mockWindow
testedLifecycleCallbacks.register(mockFragmentActivity, mockSdkCore)

testedLifecycleCallbacks.onFragmentActivityCreated(mock(), mockDialogFragment, null)
testedLifecycleCallbacks.onFragmentViewCreated(mock(), mockDialogFragment, mock(), null)

verify(mockGesturesTracker).startTracking(mockWindow, mockContext, mockSdkCore)
}

@Test
fun `when fragment activity created on Fragment, registers nothing`() {
fun `when fragment view created on Fragment, registers nothing`() {
whenever(mockFragment.context) doReturn mockContext

testedLifecycleCallbacks.onFragmentActivityCreated(mock(), mockFragment, null)
testedLifecycleCallbacks.onFragmentViewCreated(mock(), mockFragment, mock(), null)

verifyNoInteractions(mockGesturesTracker)
}
Expand Down
53 changes: 32 additions & 21 deletions features/dd-sdk-android-rum/transitiveDependencies
Original file line number Diff line number Diff line change
@@ -1,27 +1,36 @@
Dependencies List

androidx.activity:activity:1.1.0 : 13 Kb
androidx.activity:activity-ktx:1.7.2 : 25 Kb
androidx.activity:activity:1.7.2 : 139 Kb
androidx.annotation:annotation-experimental:1.1.0 : 16 Kb
androidx.annotation:annotation:1.3.0 : 30 Kb
androidx.arch.core:core-common:2.1.0 : 10 Kb
androidx.arch.core:core-runtime:2.1.0 : 5 Kb
androidx.collection:collection:1.1.0 : 41 Kb
androidx.core:core:1.6.0 : 905 Kb
androidx.customview:customview:1.0.0 : 32 Kb
androidx.fragment:fragment:1.2.4 : 221 Kb
androidx.lifecycle:lifecycle-common:2.2.0 : 21 Kb
androidx.lifecycle:lifecycle-livedata-core:2.2.0 : 8 Kb
androidx.lifecycle:lifecycle-livedata:2.1.0 : 10 Kb
androidx.lifecycle:lifecycle-runtime:2.2.0 : 10 Kb
androidx.lifecycle:lifecycle-viewmodel-savedstate:2.2.0 : 13 Kb
androidx.lifecycle:lifecycle-viewmodel:2.2.0 : 9 Kb
androidx.annotation:annotation-jvm:1.9.1 : 59 Kb
androidx.arch.core:core-common:2.2.0 : 11 Kb
androidx.arch.core:core-runtime:2.2.0 : 7 Kb
androidx.collection:collection-jvm:1.4.5 : 770 Kb
androidx.collection:collection-ktx:1.4.5 : 261 b
androidx.core:core-ktx:1.5.0 : 160 Kb
androidx.core:core:1.8.0 : 1052 Kb
androidx.customview:customview:1.1.0 : 32 Kb
androidx.fragment:fragment-ktx:1.6.2 : 29 Kb
androidx.fragment:fragment:1.6.2 : 345 Kb
androidx.lifecycle:lifecycle-common:2.6.2 : 51 Kb
androidx.lifecycle:lifecycle-livedata-core-ktx:2.6.2 : 20 Kb
androidx.lifecycle:lifecycle-livedata-core:2.6.2 : 11 Kb
androidx.lifecycle:lifecycle-livedata:2.6.2 : 18 Kb
androidx.lifecycle:lifecycle-runtime-ktx:2.6.2 : 60 Kb
androidx.lifecycle:lifecycle-runtime:2.6.2 : 21 Kb
androidx.lifecycle:lifecycle-viewmodel-ktx:2.6.2 : 4 Kb
androidx.lifecycle:lifecycle-viewmodel-savedstate:2.6.2 : 38 Kb
androidx.lifecycle:lifecycle-viewmodel:2.6.2 : 38 Kb
androidx.loader:loader:1.0.0 : 32 Kb
androidx.metrics:metrics-performance:1.0.0-alpha04 : 47 Kb
androidx.navigation:navigation-common:2.3.0 : 54 Kb
androidx.navigation:navigation-fragment:2.3.0 : 18 Kb
androidx.navigation:navigation-runtime:2.3.0 : 46 Kb
androidx.recyclerview:recyclerview:1.1.0 : 349 Kb
androidx.savedstate:savedstate:1.0.0 : 9 Kb
androidx.metrics:metrics-performance:1.0.0-beta01 : 46 Kb
androidx.navigation:navigation-common:2.7.7 : 180 Kb
androidx.navigation:navigation-fragment:2.7.7 : 92 Kb
androidx.navigation:navigation-runtime:2.7.7 : 126 Kb
androidx.recyclerview:recyclerview:1.3.2 : 399 Kb
androidx.savedstate:savedstate-ktx:1.2.1 : 3 Kb
androidx.savedstate:savedstate:1.2.1 : 19 Kb
androidx.slidingpanelayout:slidingpanelayout:1.2.0 : 37 Kb
androidx.versionedparcelable:versionedparcelable:1.1.1 : 30 Kb
androidx.viewpager:viewpager:1.0.0 : 52 Kb
com.google.code.gson:gson:2.10.1 : 276 Kb
Expand All @@ -30,7 +39,9 @@ com.squareup.okio:okio-jvm:3.6.0 : 351 Kb
org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.9.10 : 959 b
org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.9.10 : 965 b
org.jetbrains.kotlin:kotlin-stdlib:1.9.24 : 1678 Kb
org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.4 : 19 Kb
org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.6.4 : 1442 Kb
org.jetbrains:annotations:13.0 : 17 Kb

Total transitive dependencies size : 4 Mb
Total transitive dependencies size : 8 Mb

Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ androidx.activity:activity-compose:1.7.0 : 1082 Kb
androidx.activity:activity-ktx:1.7.0 : 25 Kb
androidx.activity:activity:1.7.0 : 139 Kb
androidx.annotation:annotation-experimental:1.3.0 : 35 Kb
androidx.annotation:annotation-jvm:1.6.0 : 53 Kb
androidx.annotation:annotation-jvm:1.9.1 : 59 Kb
androidx.arch.core:core-common:2.2.0 : 11 Kb
androidx.collection:collection:1.1.0 : 41 Kb
androidx.collection:collection-jvm:1.4.5 : 770 Kb
androidx.compose.animation:animation-android:1.5.4 : 1309 Kb
androidx.compose.animation:animation-core-android:1.5.4 : 1338 Kb
androidx.compose.foundation:foundation-android:1.5.4 : 3 Mb
Expand Down Expand Up @@ -51,5 +51,5 @@ org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.4 : 19 Kb
org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.6.4 : 1442 Kb
org.jetbrains:annotations:13.0 : 17 Kb

Total transitive dependencies size : 27 Mb
Total transitive dependencies size : 28 Mb

Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
Dependencies List

androidx.activity:activity:1.2.3 : 65 Kb
androidx.activity:activity:1.2.4 : 67 Kb
androidx.annotation:annotation-experimental:1.1.0 : 16 Kb
androidx.annotation:annotation:1.3.0 : 30 Kb
androidx.appcompat:appcompat-resources:1.3.0 : 63 Kb
androidx.appcompat:appcompat:1.3.0 : 1058 Kb
androidx.annotation:annotation-jvm:1.9.1 : 59 Kb
androidx.appcompat:appcompat-resources:1.4.2 : 65 Kb
androidx.appcompat:appcompat:1.4.2 : 1092 Kb
androidx.arch.core:core-common:2.1.0 : 10 Kb
androidx.arch.core:core-runtime:2.1.0 : 5 Kb
androidx.cardview:cardview:1.0.0 : 21 Kb
androidx.collection:collection:1.1.0 : 41 Kb
androidx.collection:collection-jvm:1.4.5 : 770 Kb
androidx.constraintlayout:constraintlayout-solver:2.0.1 : 197 Kb
androidx.constraintlayout:constraintlayout:2.0.1 : 373 Kb
androidx.coordinatorlayout:coordinatorlayout:1.1.0 : 43 Kb
androidx.core:core:1.6.0 : 905 Kb
androidx.core:core:1.7.0 : 957 Kb
androidx.cursoradapter:cursoradapter:1.0.0 : 10 Kb
androidx.customview:customview:1.0.0 : 32 Kb
androidx.documentfile:documentfile:1.0.0 : 10 Kb
androidx.drawerlayout:drawerlayout:1.0.0 : 31 Kb
androidx.dynamicanimation:dynamicanimation:1.0.0 : 31 Kb
androidx.fragment:fragment:1.3.4 : 291 Kb
androidx.fragment:fragment:1.3.6 : 291 Kb
androidx.interpolator:interpolator:1.0.0 : 7 Kb
androidx.legacy:legacy-support-core-utils:1.0.0 : 4 Kb
androidx.lifecycle:lifecycle-common:2.3.1 : 22 Kb
androidx.lifecycle:lifecycle-common:2.4.0 : 23 Kb
androidx.lifecycle:lifecycle-livedata-core:2.3.1 : 8 Kb
androidx.lifecycle:lifecycle-livedata:2.1.0 : 10 Kb
androidx.lifecycle:lifecycle-runtime:2.3.1 : 10 Kb
androidx.lifecycle:lifecycle-runtime:2.4.0 : 11 Kb
androidx.lifecycle:lifecycle-viewmodel-savedstate:2.3.1 : 15 Kb
androidx.lifecycle:lifecycle-viewmodel:2.3.1 : 10 Kb
androidx.loader:loader:1.0.0 : 32 Kb
Expand All @@ -43,5 +43,5 @@ com.google.code.gson:gson:2.10.1 : 276 Kb
org.jetbrains.kotlin:kotlin-stdlib:1.9.24 : 1678 Kb
org.jetbrains:annotations:13.0 : 17 Kb

Total transitive dependencies size : 7 Mb
Total transitive dependencies size : 8 Mb

Loading