Remove previous fix in D26581756

Summary:
D26581756 (https://github.com/facebook/react-native/commit/86321a35c03df340b6c1ea740ea7f29e2659b0ab) was hacked for fixing T85822390, which was later properly fixed in D27369721, so I removed it in this diff.

Changelog:
[Android][Fixed] -  Remove previous fix for "Fix text in ReactTextView sometimes being vertically displayed"

Reviewed By: mdvacca

Differential Revision: D27501405

fbshipit-source-id: 81417069d355936721868ce659b3fe8ce916302e
This commit is contained in:
Lulu Wu
2021-04-01 09:37:17 -07:00
committed by Facebook GitHub Bot
parent be397882a2
commit 5a793cee77
2 changed files with 1 additions and 13 deletions
@@ -60,9 +60,6 @@ public class ReactFeatureFlags {
/** Enables a more aggressive cleanup during destruction of ReactContext */
public static boolean enableReactContextCleanupFix = false;
/** Enables setting layout params to empty to fix a crash */
public static boolean enableSettingEmptyLayoutParams = false;
/** Enables JS Responder in Fabric */
public static boolean enableJSResponder = false;
@@ -31,7 +31,6 @@ import com.facebook.react.bridge.ReactContext;
import com.facebook.react.bridge.WritableArray;
import com.facebook.react.bridge.WritableMap;
import com.facebook.react.common.ReactConstants;
import com.facebook.react.config.ReactFeatureFlags;
import com.facebook.react.uimanager.PixelUtil;
import com.facebook.react.uimanager.ReactCompoundView;
import com.facebook.react.uimanager.UIManagerModule;
@@ -48,10 +47,6 @@ public class ReactTextView extends AppCompatTextView implements ReactCompoundVie
private static final ViewGroup.LayoutParams EMPTY_LAYOUT_PARAMS =
new ViewGroup.LayoutParams(0, 0);
private static final ViewGroup.LayoutParams WRAP_CONTENT_LAYOUT_PARAMS =
new ViewGroup.LayoutParams(
ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);
private boolean mContainsImages;
private int mDefaultGravityHorizontal;
private int mDefaultGravityVertical;
@@ -274,11 +269,7 @@ public class ReactTextView extends AppCompatTextView implements ReactCompoundVie
// null; explicitly set the LayoutParams to prevent this crash. See:
// https://github.com/facebook/react-native/pull/7011
if (getLayoutParams() == null) {
if (ReactFeatureFlags.enableSettingEmptyLayoutParams) {
setLayoutParams(EMPTY_LAYOUT_PARAMS);
} else {
setLayoutParams(WRAP_CONTENT_LAYOUT_PARAMS);
}
setLayoutParams(EMPTY_LAYOUT_PARAMS);
}
Spannable spannable = update.getText();
if (mLinkifyMaskType > 0) {