don't run setupReactContext() on UI thread

Reviewed By: achen1

Differential Revision: D4816125

fbshipit-source-id: e1da5de166bc29d635ffa22e8747a5b61eaf1491
This commit is contained in:
Aaron Chiu
2017-04-20 01:18:36 -07:00
committed by Facebook Github Bot
parent 5fa33d4936
commit 350b6c6d7f
4 changed files with 47 additions and 20 deletions

View File

@@ -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) {