mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-09 17:31:39 +08:00
don't run setupReactContext() on UI thread
Reviewed By: achen1 Differential Revision: D4816125 fbshipit-source-id: e1da5de166bc29d635ffa22e8747a5b61eaf1491
This commit is contained in:
committed by
Facebook Github Bot
parent
5fa33d4936
commit
350b6c6d7f
@@ -186,7 +186,6 @@ public class ReactContext extends ContextWrapper {
|
||||
* Should be called by the hosting Fragment in {@link Fragment#onResume}
|
||||
*/
|
||||
public void onHostResume(@Nullable Activity activity) {
|
||||
UiThreadUtil.assertOnUiThread();
|
||||
mLifecycleState = LifecycleState.RESUMED;
|
||||
mCurrentActivity = new WeakReference(activity);
|
||||
ReactMarker.logMarker(ReactMarkerConstants.ON_HOST_RESUME_START);
|
||||
@@ -216,7 +215,6 @@ public class ReactContext extends ContextWrapper {
|
||||
* Should be called by the hosting Fragment in {@link Fragment#onPause}
|
||||
*/
|
||||
public void onHostPause() {
|
||||
UiThreadUtil.assertOnUiThread();
|
||||
mLifecycleState = LifecycleState.BEFORE_RESUME;
|
||||
ReactMarker.logMarker(ReactMarkerConstants.ON_HOST_PAUSE_START);
|
||||
for (LifecycleEventListener listener : mLifecycleEventListeners) {
|
||||
|
||||
Reference in New Issue
Block a user