Skip to content

Commit c73603c

Browse files
javachefacebook-github-bot
authored andcommitted
Fix BlobProvider not working in newarch
Summary: Blob images in RNTester work Changelog: [Android] Fixed Blob content provider not working new arch Reviewed By: alanleedev Differential Revision: D99836114
1 parent fd9bb0b commit c73603c

File tree

1 file changed

+1
-2
lines changed
  • packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/blob

1 file changed

+1
-2
lines changed

packages/react-native/ReactAndroid/src/main/java/com/facebook/react/modules/blob/BlobProvider.kt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,8 @@ public class BlobProvider : ContentProvider() {
5353
var blobModule: BlobModule? = null
5454
val context = context?.applicationContext
5555
if (context is ReactApplication) {
56-
@Suppress("DEPRECATION") val host = (context as ReactApplication).reactNativeHost
5756
val reactContext =
58-
host.reactInstanceManager.currentReactContext
57+
context.reactHost?.currentReactContext
5958
?: throw RuntimeException("No ReactContext associated with BlobProvider")
6059
blobModule = reactContext.getNativeModule(BlobModule::class.java)
6160
}

0 commit comments

Comments
 (0)