From 182769bcd35882ff1a050e6cbf4c2b7c89479561 Mon Sep 17 00:00:00 2001 From: Marco Saia Date: Wed, 9 Apr 2025 11:30:40 +0200 Subject: [PATCH] SR: fix Android build error for RN 0.75 --- .../sessionreplay/utils/ReactViewBackgroundDrawableUtils.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/react-native-session-replay/android/src/rn75/kotlin/com/datadog/reactnative/sessionreplay/utils/ReactViewBackgroundDrawableUtils.kt b/packages/react-native-session-replay/android/src/rn75/kotlin/com/datadog/reactnative/sessionreplay/utils/ReactViewBackgroundDrawableUtils.kt index aedd8b5f8..b7a328504 100644 --- a/packages/react-native-session-replay/android/src/rn75/kotlin/com/datadog/reactnative/sessionreplay/utils/ReactViewBackgroundDrawableUtils.kt +++ b/packages/react-native-session-replay/android/src/rn75/kotlin/com/datadog/reactnative/sessionreplay/utils/ReactViewBackgroundDrawableUtils.kt @@ -43,7 +43,7 @@ internal class ReactViewBackgroundDrawableUtils : DrawableUtils() { @OptIn(UnstableReactNativeAPI::class) override fun getReactBackgroundFromDrawable(drawable: Drawable?): Drawable? { return when(drawable) { - is ReactViewBackgroundDrawable -> drawable + is CSSBackgroundDrawable -> drawable is InsetDrawable -> getReactBackgroundFromDrawable(drawable.drawable) is LayerDrawable -> getDrawableFromLayerDrawable(drawable) else -> null @@ -54,7 +54,7 @@ internal class ReactViewBackgroundDrawableUtils : DrawableUtils() { private fun getDrawableFromLayerDrawable(layerDrawable: LayerDrawable): Drawable? { for (layerNumber in 0 until layerDrawable.numberOfLayers) { val layer = layerDrawable.getDrawable(layerNumber) - if (layer is ReactViewBackgroundDrawable) { + if (layer is CSSBackgroundDrawable) { return layer } }