Apply nullsafe FIXMEs for xplat/js/react-native-github/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/text/ReactTextView.java

Summary:
Added nullsafe FIXMEs for easier reviewing of next diff, where we fix them
Changelog: [Internal]

Reviewed By: javache

Differential Revision: D72460130

fbshipit-source-id: fbc073e7b644326e85a05227c1e2e72e3dd5b870
This commit is contained in:
Gijs Weterings
2025-04-09 09:07:30 -07:00
committed by Facebook GitHub Bot
parent 3857aa8baf
commit 2a330e0112
@@ -105,6 +105,7 @@ public class ReactTextView extends AppCompatTextView implements ReactCompoundVie
mMinimumFontSize = Float.NaN;
mLetterSpacing = 0.f;
mOverflow = Overflow.VISIBLE;
// NULLSAFE_FIXME[Field Not Nullable]
mSpanned = null;
}
@@ -263,6 +264,7 @@ public class ReactTextView extends AppCompatTextView implements ReactCompoundVie
// special casing the character truncation case.
child.setVisibility(View.GONE);
if (mNotifyOnInlineViewLayout) {
// NULLSAFE_FIXME[Nullable Dereference]
inlineViewInfoArray.add(inlineViewJson(View.GONE, start, -1, -1, -1, -1));
}
} else {
@@ -342,6 +344,7 @@ public class ReactTextView extends AppCompatTextView implements ReactCompoundVie
child.setVisibility(layoutVisibility);
child.layout(layoutLeft, layoutTop, layoutRight, layoutBottom);
if (mNotifyOnInlineViewLayout) {
// NULLSAFE_FIXME[Nullable Dereference]
inlineViewInfoArray.add(
inlineViewJson(
layoutVisibility, start, layoutLeft, layoutTop, layoutRight, layoutBottom));
@@ -361,6 +364,7 @@ public class ReactTextView extends AppCompatTextView implements ReactCompoundVie
}
});
WritableArray inlineViewInfoArray2 = Arguments.createArray();
// NULLSAFE_FIXME[Nullable Dereference]
for (Object item : inlineViewInfoArray) {
inlineViewInfoArray2.pushMap((WritableMap) item);
}
@@ -769,6 +773,7 @@ public class ReactTextView extends AppCompatTextView implements ReactCompoundVie
@Override
public final void onFocusChanged(
boolean gainFocus, int direction, @Nullable Rect previouslyFocusedRect) {
// NULLSAFE_FIXME[Parameter Not Nullable]
super.onFocusChanged(gainFocus, direction, previouslyFocusedRect);
AccessibilityDelegateCompat accessibilityDelegateCompat =
ViewCompat.getAccessibilityDelegate(this);