Skip to content

Commit a1b97be

Browse files
authored
Merge pull request #2361 from DataDog/yl/merge-develop-into-release
Merge release 2.15.0 into develop
2 parents bcfc7e9 + b2c9bae commit a1b97be

File tree

16 files changed

+302
-122
lines changed

16 files changed

+302
-122
lines changed

CHANGELOG.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,49 @@
1+
# 2.15.0 / 2024-10-28
2+
3+
* [FEATURE] Add `TimeBank` in Session Replay recorder for dynamic optimisation See [#2247](https://github.com/DataDog/dd-sdk-android/pull/2247)
4+
* [FEATURE] Add Session Replay skipped frames count in `session ended` metrics. See [#2256](https://github.com/DataDog/dd-sdk-android/pull/2256)
5+
* [FEATURE] Add a touch privacy override. See [#2334](https://github.com/DataDog/dd-sdk-android/pull/2334)
6+
* [FEATURE] Add precheck conditions when registering the Session Replay feature. See [#2264](https://github.com/DataDog/dd-sdk-android/pull/2264)
7+
* [FEATURE] Add a privacy override for hidden views. See [#2291](https://github.com/DataDog/dd-sdk-android/pull/2291)
8+
* [FEATURE] Add image and textAndInput privacy overrides. See [#2312](https://github.com/DataDog/dd-sdk-android/pull/2312)
9+
* [IMPROVEMENT] Add a dynamic optimization configuration field in `SessionReplayConfiguration`. See [#2259](https://github.com/DataDog/dd-sdk-android/pull/2259)
10+
* [IMPROVEMENT] Use layout text to display `TextView` overflow correctly. See [#2279](https://github.com/DataDog/dd-sdk-android/pull/2279)
11+
* [IMPROVEMENT] Remove the Session Replay `ButtonMapper` border. See [#2280](https://github.com/DataDog/dd-sdk-android/pull/2280)
12+
* [IMPROVEMENT] Force single core for Session Replay. See [#2324](https://github.com/DataDog/dd-sdk-android/pull/2324)
13+
* [IMPROVEMENT] Add a `ViewGroups` Session Replay demo screen in sample app. See [#2285](https://github.com/DataDog/dd-sdk-android/pull/2285)
14+
* [IMPROVEMENT] Run integration tests on API 35 in the testing pyramid. See [#2272](https://github.com/DataDog/dd-sdk-android/pull/2272)
15+
* [IMPROVEMENT] Add `MaterialCardView` support in the Material Session Replay extension. See [#2290](https://github.com/DataDog/dd-sdk-android/pull/2290)
16+
* [IMPROVEMENT] Use an SDK source value in the Session Replay `MobileSegment.source` property. See [#2293](https://github.com/DataDog/dd-sdk-android/pull/2293)
17+
* [IMPROVEMENT] Update the Session Replay schema with a Kotlin Multiplatform source for Mobile segment. See [#2297](https://github.com/DataDog/dd-sdk-android/pull/2297)
18+
* [IMPROVEMENT] Improve test coverage of core unit tests. See [#2294](https://github.com/DataDog/dd-sdk-android/pull/2294)
19+
* [IMPROVEMENT] Improve unit test coverage for RUM, Logs and Trace features. See [#2299](https://github.com/DataDog/dd-sdk-android/pull/2299)
20+
* [IMPROVEMENT] Send retry information into RUM data upload requests. See [#2298](https://github.com/DataDog/dd-sdk-android/pull/2298)
21+
* [IMPROVEMENT] Make the `DataOkHttpUploader` state volatile. See [#2305](https://github.com/DataDog/dd-sdk-android/pull/2305)
22+
* [IMPROVEMENT] Read Session Replay system requirements synchronously with strict mode allowance. See [#2307](https://github.com/DataDog/dd-sdk-android/pull/2307)
23+
* [IMPROVEMENT] Override process importance for Session Replay integration tests. See [#2304](https://github.com/DataDog/dd-sdk-android/pull/2304)
24+
* [IMPROVEMENT] Detekt the api coverage in integration tests. See [#2300](https://github.com/DataDog/dd-sdk-android/pull/2300)
25+
* [IMPROVEMENT] Resolve `PorterDuffColorFilter` case in drawable to color mapper. See [#2319](https://github.com/DataDog/dd-sdk-android/pull/2319)
26+
* [IMPROVEMENT] Prevent obfuscation of Fine Grained Masking enums. See [#2321](https://github.com/DataDog/dd-sdk-android/pull/2321)
27+
* [IMPROVEMENT] Make sure `ConsentAwareFileOrchestrator` is thread safe. See [#2313](https://github.com/DataDog/dd-sdk-android/pull/2313)
28+
* [IMPROVEMENT] Improve RUM integration tests. See [#2317](https://github.com/DataDog/dd-sdk-android/pull/2317)
29+
* [IMPROVEMENT] Add a default sample rate for Session Replay. See [#2323](https://github.com/DataDog/dd-sdk-android/pull/2323)
30+
* [IMPROVEMENT] Remove batch metrics inner sampler to increase sample rate. See [#2328](https://github.com/DataDog/dd-sdk-android/pull/2328)
31+
* [IMPROVEMENT] Add missing integration test for Logs. See [#2330](https://github.com/DataDog/dd-sdk-android/pull/2330)
32+
* [IMPROVEMENT] Update Session Replay integration test payloads. See [#2318](https://github.com/DataDog/dd-sdk-android/pull/2318)
33+
* [MAINTENANCE] Update Datadog Agent to 1.41.0. See [#2331](https://github.com/DataDog/dd-sdk-android/pull/2331)
34+
* [MAINTENANCE] Fix the decompression in Session Replay instrumented tests for API 21. See [#2341](https://github.com/DataDog/dd-sdk-android/pull/2341)
35+
* [MAINTENANCE] Reactivate Session Replay instrumented test for API 21. See [#2342](https://github.com/DataDog/dd-sdk-android/pull/2342)
36+
* [MAINTENANCE] Fix some flaky tests. See [#2281](https://github.com/DataDog/dd-sdk-android/pull/2281)
37+
* [MAINTENANCE] Fix a StrictMode warning regarding I/O disk operation on the main thread. See [#2284](https://github.com/DataDog/dd-sdk-android/pull/2284)
38+
* [MAINTENANCE] Fix flaky feature context integration tests. See [#2295](https://github.com/DataDog/dd-sdk-android/pull/2295)
39+
* [MAINTENANCE] Fix `SeekBarWireframeMapper` flaky test. See [#2308](https://github.com/DataDog/dd-sdk-android/pull/2308)
40+
* [MAINTENANCE] Fix `SpanEventSerializerTest` flakiness. See [#2311](https://github.com/DataDog/dd-sdk-android/pull/2311)
41+
* [MAINTENANCE] Remove an unnecessary legacy privacy line from the sampleApplication. See [#2314](https://github.com/DataDog/dd-sdk-android/pull/2314)
42+
* [MAINTENANCE] Use Java 11 bytecode for public modules. See [#2315](https://github.com/DataDog/dd-sdk-android/pull/2315)
43+
* [MAINTENANCE] Fix RUM integration test `verifyViewEventsOnSwipe`. See [#2326](https://github.com/DataDog/dd-sdk-android/pull/2326)
44+
* [MAINTENANCE] Fix the regression for the `TelemetryErrorEvent` with throwable. See [#2325](https://github.com/DataDog/dd-sdk-android/pull/2325)
45+
* [MAINTENANCE] Fix the execution of legacy instrumentation tests in CI. See [#2329](https://github.com/DataDog/dd-sdk-android/pull/2329)
46+
147
# 2.14.0 / 2024-09-25
248

349
* [FEATURE] Add stop and start APIs for Session Replay. See [#2169](https://github.com/DataDog/dd-sdk-android/pull/2169)

features/dd-sdk-android-session-replay/api/apiSurface

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,10 @@ enum com.datadog.android.sessionreplay.TextAndInputPrivacy : PrivacyLevel
5151
enum com.datadog.android.sessionreplay.TouchPrivacy : PrivacyLevel
5252
- SHOW
5353
- HIDE
54+
class com.datadog.android.sessionreplay.internal.recorder.resources.DefaultDrawableCopier : DrawableCopier
55+
override fun copy(android.graphics.drawable.Drawable, android.content.res.Resources): android.graphics.drawable.Drawable?
56+
interface com.datadog.android.sessionreplay.internal.recorder.resources.DrawableCopier
57+
fun copy(android.graphics.drawable.Drawable, android.content.res.Resources): android.graphics.drawable.Drawable?
5458
data class com.datadog.android.sessionreplay.recorder.MappingContext
5559
constructor(SystemInformation, com.datadog.android.sessionreplay.utils.ImageWireframeHelper, com.datadog.android.sessionreplay.TextAndInputPrivacy, com.datadog.android.sessionreplay.ImagePrivacy, Boolean = false)
5660
interface com.datadog.android.sessionreplay.recorder.OptionSelectorDetector
@@ -109,7 +113,7 @@ interface com.datadog.android.sessionreplay.utils.DrawableToColorMapper
109113
data class com.datadog.android.sessionreplay.utils.GlobalBounds
110114
constructor(Long, Long, Long, Long)
111115
interface com.datadog.android.sessionreplay.utils.ImageWireframeHelper
112-
fun createImageWireframe(android.view.View, com.datadog.android.sessionreplay.ImagePrivacy, Int, Long, Long, Int, Int, Boolean, android.graphics.drawable.Drawable, AsyncJobStatusCallback, com.datadog.android.sessionreplay.model.MobileSegment.WireframeClip? = null, com.datadog.android.sessionreplay.model.MobileSegment.ShapeStyle? = null, com.datadog.android.sessionreplay.model.MobileSegment.ShapeBorder? = null, String? = DRAWABLE_CHILD_NAME): com.datadog.android.sessionreplay.model.MobileSegment.Wireframe?
116+
fun createImageWireframe(android.view.View, com.datadog.android.sessionreplay.ImagePrivacy, Int, Long, Long, Int, Int, Boolean, android.graphics.drawable.Drawable, com.datadog.android.sessionreplay.internal.recorder.resources.DrawableCopier = DefaultDrawableCopier(), AsyncJobStatusCallback, com.datadog.android.sessionreplay.model.MobileSegment.WireframeClip? = null, com.datadog.android.sessionreplay.model.MobileSegment.ShapeStyle? = null, com.datadog.android.sessionreplay.model.MobileSegment.ShapeBorder? = null, String? = DRAWABLE_CHILD_NAME): com.datadog.android.sessionreplay.model.MobileSegment.Wireframe?
113117
fun createCompoundDrawableWireframes(android.widget.TextView, com.datadog.android.sessionreplay.recorder.MappingContext, Int, AsyncJobStatusCallback): MutableList<com.datadog.android.sessionreplay.model.MobileSegment.Wireframe>
114118
companion object
115119
open class com.datadog.android.sessionreplay.utils.LegacyDrawableToColorMapper : DrawableToColorMapper

features/dd-sdk-android-session-replay/api/dd-sdk-android-session-replay.api

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,15 @@ public final class com/datadog/android/sessionreplay/TouchPrivacy : java/lang/En
107107
public static fun values ()[Lcom/datadog/android/sessionreplay/TouchPrivacy;
108108
}
109109

110+
public final class com/datadog/android/sessionreplay/internal/recorder/resources/DefaultDrawableCopier : com/datadog/android/sessionreplay/internal/recorder/resources/DrawableCopier {
111+
public fun <init> ()V
112+
public fun copy (Landroid/graphics/drawable/Drawable;Landroid/content/res/Resources;)Landroid/graphics/drawable/Drawable;
113+
}
114+
115+
public abstract interface class com/datadog/android/sessionreplay/internal/recorder/resources/DrawableCopier {
116+
public abstract fun copy (Landroid/graphics/drawable/Drawable;Landroid/content/res/Resources;)Landroid/graphics/drawable/Drawable;
117+
}
118+
110119
public final class com/datadog/android/sessionreplay/model/MobileSegment {
111120
public static final field Companion Lcom/datadog/android/sessionreplay/model/MobileSegment$Companion;
112121
public fun <init> (Lcom/datadog/android/sessionreplay/model/MobileSegment$Application;Lcom/datadog/android/sessionreplay/model/MobileSegment$Session;Lcom/datadog/android/sessionreplay/model/MobileSegment$View;JJJLjava/lang/Long;Ljava/lang/Boolean;Lcom/datadog/android/sessionreplay/model/MobileSegment$Source;Ljava/util/List;)V
@@ -1559,14 +1568,14 @@ public final class com/datadog/android/sessionreplay/utils/GlobalBounds {
15591568
public abstract interface class com/datadog/android/sessionreplay/utils/ImageWireframeHelper {
15601569
public static final field Companion Lcom/datadog/android/sessionreplay/utils/ImageWireframeHelper$Companion;
15611570
public abstract fun createCompoundDrawableWireframes (Landroid/widget/TextView;Lcom/datadog/android/sessionreplay/recorder/MappingContext;ILcom/datadog/android/sessionreplay/utils/AsyncJobStatusCallback;)Ljava/util/List;
1562-
public abstract fun createImageWireframe (Landroid/view/View;Lcom/datadog/android/sessionreplay/ImagePrivacy;IJJIIZLandroid/graphics/drawable/Drawable;Lcom/datadog/android/sessionreplay/utils/AsyncJobStatusCallback;Lcom/datadog/android/sessionreplay/model/MobileSegment$WireframeClip;Lcom/datadog/android/sessionreplay/model/MobileSegment$ShapeStyle;Lcom/datadog/android/sessionreplay/model/MobileSegment$ShapeBorder;Ljava/lang/String;)Lcom/datadog/android/sessionreplay/model/MobileSegment$Wireframe;
1571+
public abstract fun createImageWireframe (Landroid/view/View;Lcom/datadog/android/sessionreplay/ImagePrivacy;IJJIIZLandroid/graphics/drawable/Drawable;Lcom/datadog/android/sessionreplay/internal/recorder/resources/DrawableCopier;Lcom/datadog/android/sessionreplay/utils/AsyncJobStatusCallback;Lcom/datadog/android/sessionreplay/model/MobileSegment$WireframeClip;Lcom/datadog/android/sessionreplay/model/MobileSegment$ShapeStyle;Lcom/datadog/android/sessionreplay/model/MobileSegment$ShapeBorder;Ljava/lang/String;)Lcom/datadog/android/sessionreplay/model/MobileSegment$Wireframe;
15631572
}
15641573

15651574
public final class com/datadog/android/sessionreplay/utils/ImageWireframeHelper$Companion {
15661575
}
15671576

15681577
public final class com/datadog/android/sessionreplay/utils/ImageWireframeHelper$DefaultImpls {
1569-
public static synthetic fun createImageWireframe$default (Lcom/datadog/android/sessionreplay/utils/ImageWireframeHelper;Landroid/view/View;Lcom/datadog/android/sessionreplay/ImagePrivacy;IJJIIZLandroid/graphics/drawable/Drawable;Lcom/datadog/android/sessionreplay/utils/AsyncJobStatusCallback;Lcom/datadog/android/sessionreplay/model/MobileSegment$WireframeClip;Lcom/datadog/android/sessionreplay/model/MobileSegment$ShapeStyle;Lcom/datadog/android/sessionreplay/model/MobileSegment$ShapeBorder;Ljava/lang/String;ILjava/lang/Object;)Lcom/datadog/android/sessionreplay/model/MobileSegment$Wireframe;
1578+
public static synthetic fun createImageWireframe$default (Lcom/datadog/android/sessionreplay/utils/ImageWireframeHelper;Landroid/view/View;Lcom/datadog/android/sessionreplay/ImagePrivacy;IJJIIZLandroid/graphics/drawable/Drawable;Lcom/datadog/android/sessionreplay/internal/recorder/resources/DrawableCopier;Lcom/datadog/android/sessionreplay/utils/AsyncJobStatusCallback;Lcom/datadog/android/sessionreplay/model/MobileSegment$WireframeClip;Lcom/datadog/android/sessionreplay/model/MobileSegment$ShapeStyle;Lcom/datadog/android/sessionreplay/model/MobileSegment$ShapeBorder;Ljava/lang/String;ILjava/lang/Object;)Lcom/datadog/android/sessionreplay/model/MobileSegment$Wireframe;
15701579
}
15711580

15721581
public class com/datadog/android/sessionreplay/utils/LegacyDrawableToColorMapper : com/datadog/android/sessionreplay/utils/DrawableToColorMapper {

features/dd-sdk-android-session-replay/src/main/kotlin/com/datadog/android/sessionreplay/internal/recorder/mapper/ImageViewMapper.kt

Lines changed: 18 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -57,28 +57,25 @@ internal class ImageViewMapper(
5757
val contentYPosInDp = contentRect.top.densityNormalized(density).toLong()
5858
val contentWidthPx = contentRect.width()
5959
val contentHeightPx = contentRect.height()
60-
val contentDrawable = drawable.constantState?.newDrawable(resources)
6160

62-
if (contentDrawable != null) {
63-
// resolve foreground
64-
mappingContext.imageWireframeHelper.createImageWireframe(
65-
view = view,
66-
imagePrivacy = mappingContext.imagePrivacy,
67-
currentWireframeIndex = wireframes.size,
68-
x = contentXPosInDp,
69-
y = contentYPosInDp,
70-
width = contentWidthPx,
71-
height = contentHeightPx,
72-
usePIIPlaceholder = true,
73-
drawable = contentDrawable,
74-
asyncJobStatusCallback = asyncJobStatusCallback,
75-
clipping = clipping,
76-
shapeStyle = null,
77-
border = null,
78-
prefix = ImageWireframeHelper.DRAWABLE_CHILD_NAME
79-
)?.let {
80-
wireframes.add(it)
81-
}
61+
// resolve foreground
62+
mappingContext.imageWireframeHelper.createImageWireframe(
63+
view = view,
64+
imagePrivacy = mappingContext.imagePrivacy,
65+
currentWireframeIndex = wireframes.size,
66+
x = contentXPosInDp,
67+
y = contentYPosInDp,
68+
width = contentWidthPx,
69+
height = contentHeightPx,
70+
usePIIPlaceholder = true,
71+
drawable = drawable,
72+
asyncJobStatusCallback = asyncJobStatusCallback,
73+
clipping = clipping,
74+
shapeStyle = null,
75+
border = null,
76+
prefix = ImageWireframeHelper.DRAWABLE_CHILD_NAME
77+
)?.let {
78+
wireframes.add(it)
8279
}
8380

8481
return wireframes

0 commit comments

Comments
 (0)