mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Make constructor arg of ReactContextBaseJavaModule @Nullable
Summary: ExceptionManagers are created before the `ReactApplicationContext`. Once we make them all TurboModule-compatible, they'll also subclasses `ReactContextBaseJavaModule`. This means that they'll need to be created with `ReactApplicationContext`. Since one isn't available, we'll have to call `super(null)` in their constructor. Changelog: [Android][Changed] - Make ReactApplicationContext nullable as the constructor argument of ReactContextBaseJavaModule Reviewed By: PeteTheHeat Differential Revision: D18935950 fbshipit-source-id: a643a10a42cf36a2a2d6fde87795965f16295d43
This commit is contained in:
committed by
Facebook Github Bot
parent
a8fbc5b893
commit
f8d5c5bfd7
+1
-2
@@ -10,7 +10,6 @@ package com.facebook.react.bridge;
|
||||
import static com.facebook.infer.annotation.ThreadConfined.ANY;
|
||||
|
||||
import android.app.Activity;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import com.facebook.common.logging.FLog;
|
||||
import com.facebook.infer.annotation.Assertions;
|
||||
@@ -28,7 +27,7 @@ public abstract class ReactContextBaseJavaModule extends BaseJavaModule {
|
||||
mReactApplicationContext = null;
|
||||
}
|
||||
|
||||
public ReactContextBaseJavaModule(@NonNull ReactApplicationContext reactContext) {
|
||||
public ReactContextBaseJavaModule(@Nullable ReactApplicationContext reactContext) {
|
||||
mReactApplicationContext = reactContext;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user