Skip to content

Commit 05ea94c

Browse files
javachemeta-codesync[bot]
authored andcommitted
Fix BlobProvider not working in newarch (#56369)
Summary: Pull Request resolved: #56369 Blob images in RNTester work Changelog: [Android][Fixed] Blob content provider did not work in new arch Reviewed By: alanleedev Differential Revision: D99836114 fbshipit-source-id: e672a920c2327dfe18edaae5291dd8bb8642cdd1
1 parent b20d7fc commit 05ea94c

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)