Skip to content

Commit f032548

Browse files
GijsWeteringsfacebook-github-bot
authored andcommitted
Apply Nullsafe FIXMEs for xplat/js/react-native-github/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/fabric/mounting/SurfaceMountingManager.java (#50359)
Summary: Added nullsafe FIXMEs for easier reviewing of next diff, where we fix them Changelog: [Internal] Reviewed By: javache Differential Revision: D71979578
1 parent 9b30cdd commit f032548

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

Diff for: packages/react-native/ReactAndroid/src/main/java/com/facebook/react/fabric/mounting/SurfaceMountingManager.java

+10
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ public class SurfaceMountingManager {
9090
private final Set<Integer> mViewsToDeleteAfterTouchFinishes = new HashSet<>();
9191

9292
// This is null *until* StopSurface is called.
93+
// NULLSAFE_FIXME[Field Not Initialized]
9394
private SparseArrayCompat<Object> mTagSetForStoppedSurface;
9495

9596
private final int mSurfaceId;
@@ -315,9 +316,13 @@ public void stopSurface() {
315316

316317
// Evict all views from cache and memory
317318
// TODO: clear instead of nulling out to simplify null-safety in this class
319+
// NULLSAFE_FIXME[Field Not Nullable]
318320
mTagToViewState = null;
321+
// NULLSAFE_FIXME[Field Not Nullable]
319322
mJSResponderHandler = null;
323+
// NULLSAFE_FIXME[Field Not Nullable]
320324
mRootViewManager = null;
325+
// NULLSAFE_FIXME[Field Not Nullable]
321326
mMountItemExecutor = null;
322327
mThemedReactContext = null;
323328
mOnViewAttachMountItems.clear();
@@ -659,6 +664,7 @@ public void createViewUnsafe(
659664
Systrace.TRACE_TAG_REACT_JAVA_BRIDGE,
660665
"SurfaceMountingManager::createViewUnsafe(" + componentName + ")");
661666
try {
667+
// NULLSAFE_FIXME[Parameter Not Nullable]
662668
ReactStylesDiffMap propMap = new ReactStylesDiffMap(props);
663669

664670
ViewState viewState = new ViewState(reactTag);
@@ -672,6 +678,7 @@ public void createViewUnsafe(
672678
// View Managers are responsible for dealing with inital state and props.
673679
viewState.mView =
674680
viewManager.createView(
681+
// NULLSAFE_FIXME[Parameter Not Nullable]
675682
reactTag, mThemedReactContext, propMap, stateWrapper, mJSResponderHandler);
676683
viewState.mViewManager = viewManager;
677684
}
@@ -930,8 +937,10 @@ public void updateState(final int reactTag, @Nullable StateWrapper stateWrapper)
930937
throw new IllegalStateException("Unable to find ViewManager for tag: " + reactTag);
931938
}
932939
Object extraData =
940+
// NULLSAFE_FIXME[Parameter Not Nullable]
933941
viewManager.updateState(viewState.mView, viewState.mCurrentProps, stateWrapper);
934942
if (extraData != null) {
943+
// NULLSAFE_FIXME[Parameter Not Nullable]
935944
viewManager.updateExtraData(viewState.mView, extraData);
936945
}
937946

@@ -1026,6 +1035,7 @@ private void onViewStateDeleted(ViewState viewState) {
10261035
// For non-root views we notify viewmanager with {@link ViewManager#onDropInstance}
10271036
ViewManager viewManager = viewState.mViewManager;
10281037
if (!viewState.mIsRoot && viewManager != null) {
1038+
// NULLSAFE_FIXME[Parameter Not Nullable]
10291039
viewManager.onDropViewInstance(viewState.mView);
10301040
}
10311041
}

0 commit comments

Comments
 (0)