diff --git a/packages/react-native/ReactAndroid/api/ReactAndroid.api b/packages/react-native/ReactAndroid/api/ReactAndroid.api index 5d6870bc1e2..410ebdc0055 100644 --- a/packages/react-native/ReactAndroid/api/ReactAndroid.api +++ b/packages/react-native/ReactAndroid/api/ReactAndroid.api @@ -6720,9 +6720,9 @@ public class com/facebook/react/views/imagehelper/ImageSource { public final fun getSize ()D public final fun getSource ()Ljava/lang/String; public static final fun getTransparentBitmapImageSource (Landroid/content/Context;)Lcom/facebook/react/views/imagehelper/ImageSource; - public final fun getUri ()Landroid/net/Uri; + public fun getUri ()Landroid/net/Uri; public fun hashCode ()I - public final fun isResource ()Z + public fun isResource ()Z } public final class com/facebook/react/views/imagehelper/ImageSource$Companion { diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/imagehelper/ImageSource.kt b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/imagehelper/ImageSource.kt index 583b4a0eaaf..947044cf43e 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/imagehelper/ImageSource.kt +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/imagehelper/ImageSource.kt @@ -23,12 +23,14 @@ constructor( ) { /** Get the URI for this image - can be either a parsed network URI or a resource URI. */ - public val uri: Uri = computeUri(context) + public open val uri: Uri = computeUri(context) /** Get the area of this image. */ public val size: Double = width * height /** Get whether this image source represents an Android resource or a network URI. */ - public var isResource: Boolean = false - private set + public open val isResource: Boolean + get() = _isResource + + private var _isResource: Boolean = false override fun equals(other: Any?): Boolean { if (this === other) { @@ -58,7 +60,7 @@ constructor( } private fun computeLocalUri(context: Context): Uri { - isResource = true + _isResource = true return ResourceDrawableIdHelper.instance.getResourceDrawableUri(context, source) }