コード例 #1
0
 private void tearDownReactContext(ReactContext reactContext) {
   UiThreadUtil.assertOnUiThread();
   if (mLifecycleState == LifecycleState.RESUMED) {
     reactContext.onPause();
   }
   for (ReactRootView rootView : mAttachedRootViews) {
     detachViewFromInstance(rootView, reactContext.getCatalystInstance());
   }
   reactContext.onDestroy();
   mDevSupportManager.onReactInstanceDestroyed(reactContext);
   mMemoryPressureRouter.onReactInstanceDestroyed();
 }
コード例 #2
0
  @Override
  public void onPause() {
    UiThreadUtil.assertOnUiThread();

    mLifecycleState = LifecycleState.BEFORE_RESUME;

    mDefaultBackButtonImpl = null;
    if (mUseDeveloperSupport) {
      mDevSupportManager.setDevSupportEnabled(false);
    }

    mCurrentActivity = null;
    if (mCurrentReactContext != null) {
      mCurrentReactContext.onPause();
    }
  }