mirror of
https://github.com/facebook/react-native.git
synced 2026-11-18 20:19:07 +00:00
Fix BlobProvider not working in newarch (#56369)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/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
This commit is contained in:
1 parent
b20d7fccc8
commit
05ea94c441
1 file changed
+1
-2
+1
-2
@@ -53,9 +53,8 @@ public class BlobProvider : ContentProvider() {
|
||||
var blobModule: BlobModule? = null
|
||||
val context = context?.applicationContext
|
||||
if (context is ReactApplication) {
|
||||
@Suppress("DEPRECATION") val host = (context as ReactApplication).reactNativeHost
|
||||
val reactContext =
|
||||
host.reactInstanceManager.currentReactContext
|
||||
context.reactHost?.currentReactContext
|
||||
?: throw RuntimeException("No ReactContext associated with BlobProvider")
|
||||
blobModule = reactContext.getNativeModule(BlobModule::class.java)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user