mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Back out "Revert D58459930: [react-native][PR] Add ReactMarkerConstants.CONTENT_APPEARED support on Android"
Summary: Changelog: [ANDROID] [ADDED] - Add the ReactMarkerConstants.CONTENT_APPEARED support on Android in bridgeless mode. This re-applies https://github.com/facebook/react-native/pull/43620 which was reverted because a CI job started failing because we forgot to update `packages/react-native/ReactAndroid/api/ReactAndroid.api`. Reviewed By: cortinico Differential Revision: D58535868 fbshipit-source-id: 9eec33c5e798850a7434a6c391abf2fc3fc9d0a6
This commit is contained in:
committed by
Thibault Malbranche
parent
bdf6583c7e
commit
3c4d7618f0
+2
-4
@@ -432,10 +432,8 @@ public class ReactRootView extends FrameLayout implements RootView, ReactRoot {
|
||||
|
||||
if (mShouldLogContentAppeared) {
|
||||
mShouldLogContentAppeared = false;
|
||||
|
||||
if (mJSModuleName != null) {
|
||||
ReactMarker.logMarker(ReactMarkerConstants.CONTENT_APPEARED, mJSModuleName, mRootViewTag);
|
||||
}
|
||||
String jsModuleName = getJSModuleName();
|
||||
ReactMarker.logMarker(ReactMarkerConstants.CONTENT_APPEARED, jsModuleName, mRootViewTag);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+3
-1
@@ -378,7 +378,9 @@ public class ReactHostImpl implements ReactHost {
|
||||
public ReactSurface createSurface(
|
||||
Context context, String moduleName, @Nullable Bundle initialProps) {
|
||||
ReactSurfaceImpl surface = new ReactSurfaceImpl(context, moduleName, initialProps);
|
||||
surface.attachView(new ReactSurfaceView(context, surface));
|
||||
ReactSurfaceView surfaceView = new ReactSurfaceView(context, surface);
|
||||
surfaceView.setShouldLogContentAppeared(true);
|
||||
surface.attachView(surfaceView);
|
||||
surface.attach(this);
|
||||
return surface;
|
||||
}
|
||||
|
||||
+5
@@ -189,6 +189,11 @@ public class ReactSurfaceView extends ReactRootView {
|
||||
return UIManagerType.FABRIC;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getJSModuleName() {
|
||||
return mSurface.moduleName;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void dispatchJSTouchEvent(MotionEvent event) {
|
||||
if (mJSTouchDispatcher == null) {
|
||||
|
||||
Reference in New Issue
Block a user