Java 类com.facebook.react.common.LifecycleState 实例源码

项目:react-native-image-intent    文件:MainActivity.java   
private void initializePage() {
    mReactRootView = new ReactRootView(this);
    mReactInstanceManager = ReactInstanceManager.builder()
            .setApplication(getApplication())
            .setBundleAssetName("index.android.bundle")
            .setJSMainModuleName("index.android")
            .addPackage(new MainReactPackage())
            .addPackage(new ImageIntentPackage())
            .setUseDeveloperSupport(BuildConfig.DEBUG)
            .setInitialLifecycleState(LifecycleState.RESUMED)
            .build();
    mReactRootView.startReactApplication(mReactInstanceManager, "Clarifai", null);

    setContentView(com.sonnylab.imageintent.R.layout.activity_main);
    ((RelativeLayout) findViewById(com.sonnylab.imageintent.R.id.view_container)).addView(mReactRootView);
}
项目:RNLearn_Project1    文件:MainApplication.java   
@Override
protected ReactInstanceManager createReactInstanceManager() {
    ReactInstanceManagerBuilder builder = ReactInstanceManager.builder()
            .setApplication(getApplication())
            .setJSMainModuleName(getJSMainModuleName())
            .setUseDeveloperSupport(getUseDeveloperSupport())
            .setRedBoxHandler(getRedBoxHandler())
            .setUIImplementationProvider(getUIImplementationProvider())
            .setInitialLifecycleState(LifecycleState.BEFORE_CREATE)
            .setNativeModuleCallExceptionHandler(
                    new ReadingNativeModuleCallExceptionHandler());

    for (ReactPackage reactPackage : getPackages()) {
        builder.addPackage(reactPackage);
    }

    String jsBundleFile = getJSBundleFile();
    if (jsBundleFile != null) {
        builder.setJSBundleFile(jsBundleFile);
    } else {
        builder.setBundleAssetName(Assertions.assertNotNull(getBundleAssetName()));
    }
    return builder.build();
}
项目:RNLearn_Project1    文件:ReactNativeHost.java   
protected ReactInstanceManager createReactInstanceManager() {
  ReactInstanceManagerBuilder builder = ReactInstanceManager.builder()
    .setApplication(mApplication)
    .setJSMainModuleName(getJSMainModuleName())
    .setUseDeveloperSupport(getUseDeveloperSupport())
    .setRedBoxHandler(getRedBoxHandler())
    .setUIImplementationProvider(getUIImplementationProvider())
    .setInitialLifecycleState(LifecycleState.BEFORE_CREATE);

  for (ReactPackage reactPackage : getPackages()) {
    builder.addPackage(reactPackage);
  }

  String jsBundleFile = getJSBundleFile();
  if (jsBundleFile != null) {
    builder.setJSBundleFile(jsBundleFile);
  } else {
    builder.setBundleAssetName(Assertions.assertNotNull(getBundleAssetName()));
  }
  return builder.build();
}
项目:RNLearn_Project1    文件:HeadlessJsTaskContext.java   
/**
 * Start a JS task. Handles invoking {@link AppRegistry#startHeadlessTask} and notifying
 * listeners.
 *
 * @return a unique id representing this task instance.
 */
public synchronized int startTask(final HeadlessJsTaskConfig taskConfig) {
  UiThreadUtil.assertOnUiThread();
  ReactContext reactContext = Assertions.assertNotNull(
    mReactContext.get(),
    "Tried to start a task on a react context that has already been destroyed");
  if (reactContext.getLifecycleState() == LifecycleState.RESUMED &&
    !taskConfig.isAllowedInForeground()) {
    throw new IllegalStateException(
      "Tried to start task " + taskConfig.getTaskKey() +
        " while in foreground, but this is not allowed.");
  }
  final int taskId = mLastTaskId.incrementAndGet();
  mActiveTasks.add(taskId);
  reactContext.getJSModule(AppRegistry.class)
    .startHeadlessTask(taskId, taskConfig.getTaskKey(), taskConfig.getData());
  if (taskConfig.getTimeout() > 0) {
    scheduleTaskTimeout(taskId, taskConfig.getTimeout());
  }
  for (HeadlessJsTaskEventListener listener : mHeadlessJsTaskEventListeners) {
    listener.onHeadlessJsTaskStart(taskId);
  }
  return taskId;
}
项目:RNLearn_Project1    文件:ReactNativeHost.java   
protected ReactInstanceManager createReactInstanceManager() {
  ReactInstanceManagerBuilder builder = ReactInstanceManager.builder()
    .setApplication(mApplication)
    .setJSMainModuleName(getJSMainModuleName())
    .setUseDeveloperSupport(getUseDeveloperSupport())
    .setRedBoxHandler(getRedBoxHandler())
    .setUIImplementationProvider(getUIImplementationProvider())
    .setInitialLifecycleState(LifecycleState.BEFORE_CREATE);

  for (ReactPackage reactPackage : getPackages()) {
    builder.addPackage(reactPackage);
  }

  String jsBundleFile = getJSBundleFile();
  if (jsBundleFile != null) {
    builder.setJSBundleFile(jsBundleFile);
  } else {
    builder.setBundleAssetName(Assertions.assertNotNull(getBundleAssetName()));
  }
  return builder.build();
}
项目:RNLearn_Project1    文件:HeadlessJsTaskContext.java   
/**
 * Start a JS task. Handles invoking {@link AppRegistry#startHeadlessTask} and notifying
 * listeners.
 *
 * @return a unique id representing this task instance.
 */
public synchronized int startTask(final HeadlessJsTaskConfig taskConfig) {
  UiThreadUtil.assertOnUiThread();
  ReactContext reactContext = Assertions.assertNotNull(
    mReactContext.get(),
    "Tried to start a task on a react context that has already been destroyed");
  if (reactContext.getLifecycleState() == LifecycleState.RESUMED &&
    !taskConfig.isAllowedInForeground()) {
    throw new IllegalStateException(
      "Tried to start task " + taskConfig.getTaskKey() +
        " while in foreground, but this is not allowed.");
  }
  final int taskId = mLastTaskId.incrementAndGet();
  mActiveTasks.add(taskId);
  reactContext.getJSModule(AppRegistry.class)
    .startHeadlessTask(taskId, taskConfig.getTaskKey(), taskConfig.getData());
  if (taskConfig.getTimeout() > 0) {
    scheduleTaskTimeout(taskId, taskConfig.getTimeout());
  }
  for (HeadlessJsTaskEventListener listener : mHeadlessJsTaskEventListeners) {
    listener.onHeadlessJsTaskStart(taskId);
  }
  return taskId;
}
项目:TestRNIntegrationNative    文件:ReactActivity.java   
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    mReactRootView = new ReactRootView(this);
    mReactInstanceManager = ReactInstanceManager.builder()
        .setApplication(getApplication())
        .setBundleAssetName("index.android.bundle")
        .setJSMainModuleName("index.android")
        .addPackage(new MainReactPackage())
        .setUseDeveloperSupport(BuildConfig.DEBUG)
        .setInitialLifecycleState(LifecycleState.RESUMED)
        .addPackage(new NativeActivityPackage())
        //.setUseOldBridge(true) // uncomment this line if your app crashes
        .build();
    mReactRootView.startReactApplication(mReactInstanceManager, "HelloWorld", null);

    setContentView(mReactRootView);
}
项目:Ironman    文件:ReactNativeHost.java   
protected ReactInstanceManager createReactInstanceManager() {
  ReactInstanceManager.Builder builder = ReactInstanceManager.builder()
    .setApplication(mApplication)
    .setJSMainModuleName(getJSMainModuleName())
    .setUseDeveloperSupport(getUseDeveloperSupport())
    .setRedBoxHandler(getRedBoxHandler())
    .setUIImplementationProvider(getUIImplementationProvider())
    .setInitialLifecycleState(LifecycleState.BEFORE_CREATE);

  for (ReactPackage reactPackage : getPackages()) {
    builder.addPackage(reactPackage);
  }

  String jsBundleFile = getJSBundleFile();
  if (jsBundleFile != null) {
    builder.setJSBundleFile(jsBundleFile);
  } else {
    builder.setBundleAssetName(Assertions.assertNotNull(getBundleAssetName()));
  }
  return builder.build();
}
项目:Ironman    文件:HeadlessJsTaskContext.java   
/**
 * Start a JS task. Handles invoking {@link AppRegistry#startHeadlessTask} and notifying
 * listeners.
 *
 * @return a unique id representing this task instance.
 */
public synchronized int startTask(final HeadlessJsTaskConfig taskConfig) {
  UiThreadUtil.assertOnUiThread();
  if (mReactContext.getLifecycleState() == LifecycleState.RESUMED &&
    !taskConfig.isAllowedInForeground()) {
    throw new IllegalStateException(
      "Tried to start task " + taskConfig.getTaskKey() +
        " while in foreground, but this is not allowed.");
  }
  final int taskId = mLastTaskId.incrementAndGet();
  mReactContext.getJSModule(AppRegistry.class)
    .startHeadlessTask(taskId, taskConfig.getTaskKey(), taskConfig.getData());
  if (taskConfig.getTimeout() > 0) {
    scheduleTaskTimeout(taskId, taskConfig.getTimeout());
  }
  mActiveTasks.add(taskId);
  for (HeadlessJsTaskEventListener listener : mHeadlessJsTaskEventListeners) {
    listener.onHeadlessJsTaskStart(taskId);
  }
  return taskId;
}
项目:RNLearn_Project1    文件:ReactContext.java   
/**
 * 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);
  for (LifecycleEventListener listener : mLifecycleEventListeners) {
    try {
      listener.onHostResume();
    } catch (RuntimeException e) {
      handleException(e);
    }
  }
  ReactMarker.logMarker(ReactMarkerConstants.ON_HOST_RESUME_END);
}
项目:RNLearn_Project1    文件:ReactContext.java   
/**
 * 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) {
    try {
      listener.onHostPause();
    } catch (RuntimeException e) {
      handleException(e);
    }
  }
  ReactMarker.logMarker(ReactMarkerConstants.ON_HOST_PAUSE_END);
}
项目:RNLearn_Project1    文件:ReactContext.java   
/**
 * Should be called by the hosting Fragment in {@link Fragment#onDestroy}
 */
public void onHostDestroy() {
  UiThreadUtil.assertOnUiThread();
  mLifecycleState = LifecycleState.BEFORE_CREATE;
  for (LifecycleEventListener listener : mLifecycleEventListeners) {
    try {
      listener.onHostDestroy();
    } catch (RuntimeException e) {
      handleException(e);
    }
  }
  mCurrentActivity = null;
}
项目:RNLearn_Project1    文件:ReactInstanceManager.java   
private void moveToResumedLifecycleState(boolean force) {
  if (mCurrentReactContext != null) {
    // we currently don't have an onCreate callback so we call onResume for both transitions
    if (force ||
        mLifecycleState == LifecycleState.BEFORE_RESUME ||
        mLifecycleState == LifecycleState.BEFORE_CREATE) {
      mCurrentReactContext.onHostResume(mCurrentActivity);
    }
  }
  mLifecycleState = LifecycleState.RESUMED;
}
项目:RNLearn_Project1    文件:ReactInstanceManager.java   
private void moveToBeforeResumeLifecycleState() {
  if (mCurrentReactContext != null) {
    if (mLifecycleState == LifecycleState.BEFORE_CREATE) {
      mCurrentReactContext.onHostResume(mCurrentActivity);
      mCurrentReactContext.onHostPause();
    } else if (mLifecycleState == LifecycleState.RESUMED) {
      mCurrentReactContext.onHostPause();
    }
  }
  mLifecycleState = LifecycleState.BEFORE_RESUME;
}
项目:RNLearn_Project1    文件:ReactInstanceManager.java   
private void moveToBeforeCreateLifecycleState() {
  if (mCurrentReactContext != null) {
    if (mLifecycleState == LifecycleState.RESUMED) {
      mCurrentReactContext.onHostPause();
      mLifecycleState = LifecycleState.BEFORE_RESUME;
    }
    if (mLifecycleState == LifecycleState.BEFORE_RESUME) {
      mCurrentReactContext.onHostDestroy();
    }
  }
  mLifecycleState = LifecycleState.BEFORE_CREATE;
}
项目:RNLearn_Project1    文件:ReactInstanceManager.java   
private void tearDownReactContext(ReactContext reactContext) {
  UiThreadUtil.assertOnUiThread();
  if (mLifecycleState == LifecycleState.RESUMED) {
    reactContext.onHostPause();
  }
  for (ReactRootView rootView : mAttachedRootViews) {
    detachViewFromInstance(rootView, reactContext.getCatalystInstance());
  }
  reactContext.destroy();
  mDevSupportManager.onReactInstanceDestroyed(reactContext);
  mMemoryPressureRouter.removeMemoryPressureListener(reactContext.getCatalystInstance());
}
项目:RNLearn_Project1    文件:ReactAppTestActivity.java   
@Override
protected void onPause() {
  super.onPause();

  mLifecycleState = LifecycleState.BEFORE_RESUME;

  overridePendingTransition(0, 0);

  if (mReactInstanceManager != null) {
    mReactInstanceManager.onHostPause();
  }
}
项目:RNLearn_Project1    文件:ReactAppTestActivity.java   
@Override
protected void onResume() {
  super.onResume();

  mLifecycleState = LifecycleState.RESUMED;

  if (mReactInstanceManager != null) {
    mReactInstanceManager.onHostResume(this, this);
  }
}
项目:RNLearn_Project1    文件:ReactContext.java   
/**
 * 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);
  for (LifecycleEventListener listener : mLifecycleEventListeners) {
    try {
      listener.onHostResume();
    } catch (RuntimeException e) {
      handleException(e);
    }
  }
  ReactMarker.logMarker(ReactMarkerConstants.ON_HOST_RESUME_END);
}
项目:RNLearn_Project1    文件:ReactContext.java   
/**
 * 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) {
    try {
      listener.onHostPause();
    } catch (RuntimeException e) {
      handleException(e);
    }
  }
  ReactMarker.logMarker(ReactMarkerConstants.ON_HOST_PAUSE_END);
}
项目:RNLearn_Project1    文件:ReactContext.java   
/**
 * Should be called by the hosting Fragment in {@link Fragment#onDestroy}
 */
public void onHostDestroy() {
  UiThreadUtil.assertOnUiThread();
  mLifecycleState = LifecycleState.BEFORE_CREATE;
  for (LifecycleEventListener listener : mLifecycleEventListeners) {
    try {
      listener.onHostDestroy();
    } catch (RuntimeException e) {
      handleException(e);
    }
  }
  mCurrentActivity = null;
}
项目:RNLearn_Project1    文件:ReactInstanceManager.java   
private void moveToResumedLifecycleState(boolean force) {
  if (mCurrentReactContext != null) {
    // we currently don't have an onCreate callback so we call onResume for both transitions
    if (force ||
        mLifecycleState == LifecycleState.BEFORE_RESUME ||
        mLifecycleState == LifecycleState.BEFORE_CREATE) {
      mCurrentReactContext.onHostResume(mCurrentActivity);
    }
  }
  mLifecycleState = LifecycleState.RESUMED;
}
项目:RNLearn_Project1    文件:ReactInstanceManager.java   
private void moveToBeforeResumeLifecycleState() {
  if (mCurrentReactContext != null) {
    if (mLifecycleState == LifecycleState.BEFORE_CREATE) {
      mCurrentReactContext.onHostResume(mCurrentActivity);
      mCurrentReactContext.onHostPause();
    } else if (mLifecycleState == LifecycleState.RESUMED) {
      mCurrentReactContext.onHostPause();
    }
  }
  mLifecycleState = LifecycleState.BEFORE_RESUME;
}
项目:RNLearn_Project1    文件:ReactInstanceManager.java   
private void moveToBeforeCreateLifecycleState() {
  if (mCurrentReactContext != null) {
    if (mLifecycleState == LifecycleState.RESUMED) {
      mCurrentReactContext.onHostPause();
      mLifecycleState = LifecycleState.BEFORE_RESUME;
    }
    if (mLifecycleState == LifecycleState.BEFORE_RESUME) {
      mCurrentReactContext.onHostDestroy();
    }
  }
  mLifecycleState = LifecycleState.BEFORE_CREATE;
}
项目:RNLearn_Project1    文件:ReactInstanceManager.java   
private void tearDownReactContext(ReactContext reactContext) {
  UiThreadUtil.assertOnUiThread();
  if (mLifecycleState == LifecycleState.RESUMED) {
    reactContext.onHostPause();
  }
  for (ReactRootView rootView : mAttachedRootViews) {
    detachViewFromInstance(rootView, reactContext.getCatalystInstance());
  }
  reactContext.destroy();
  mDevSupportManager.onReactInstanceDestroyed(reactContext);
  mMemoryPressureRouter.removeMemoryPressureListener(reactContext.getCatalystInstance());
}
项目:RNLearn_Project1    文件:ReactAppTestActivity.java   
@Override
protected void onPause() {
  super.onPause();

  mLifecycleState = LifecycleState.BEFORE_RESUME;

  overridePendingTransition(0, 0);

  if (mReactInstanceManager != null) {
    mReactInstanceManager.onHostPause();
  }
}
项目:RNLearn_Project1    文件:ReactAppTestActivity.java   
@Override
protected void onResume() {
  super.onResume();

  mLifecycleState = LifecycleState.RESUMED;

  if (mReactInstanceManager != null) {
    mReactInstanceManager.onHostResume(this, this);
  }
}
项目:react-native-background-job    文件:Utils.java   
/** Check whether on not the React Native application is in foreground. */
public static boolean isReactNativeAppInForeground(@NonNull ReactNativeHost reactNativeHost) {
  if (!reactNativeHost.hasInstance()) {
    // If the app was force-stopped the instace will be destroyed. The instance can't be created from a background thread.
    return false;
  }
  ReactContext reactContext = reactNativeHost.getReactInstanceManager().getCurrentReactContext();
  return reactContext != null && reactContext.getLifecycleState() == LifecycleState.RESUMED;
}
项目:Ironman    文件:ReactContext.java   
/**
 * 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);
  mLifecycleState = LifecycleState.RESUMED;
  for (LifecycleEventListener listener : mLifecycleEventListeners) {
    listener.onHostResume();
  }
}
项目:Ironman    文件:ReactContext.java   
/**
 * Should be called by the hosting Fragment in {@link Fragment#onPause}
 */
public void onHostPause() {
  UiThreadUtil.assertOnUiThread();
  mLifecycleState = LifecycleState.BEFORE_RESUME;
  for (LifecycleEventListener listener : mLifecycleEventListeners) {
    listener.onHostPause();
  }
}
项目:Ironman    文件:ReactContext.java   
/**
 * Should be called by the hosting Fragment in {@link Fragment#onDestroy}
 */
public void onHostDestroy() {
  UiThreadUtil.assertOnUiThread();
  mLifecycleState = LifecycleState.BEFORE_CREATE;
  for (LifecycleEventListener listener : mLifecycleEventListeners) {
    listener.onHostDestroy();
  }
  mCurrentActivity = null;
}
项目:Ironman    文件:XReactInstanceManagerImpl.java   
private void moveToResumedLifecycleState(boolean force) {
  if (mCurrentReactContext != null) {
    // we currently don't have an onCreate callback so we call onResume for both transitions
    if (force ||
        mLifecycleState == LifecycleState.BEFORE_RESUME ||
        mLifecycleState == LifecycleState.BEFORE_CREATE) {
      mCurrentReactContext.onHostResume(mCurrentActivity);
    }
  }
  mLifecycleState = LifecycleState.RESUMED;
}
项目:Ironman    文件:XReactInstanceManagerImpl.java   
private void moveToBeforeResumeLifecycleState() {
  if (mCurrentReactContext != null) {
    if (mLifecycleState == LifecycleState.BEFORE_CREATE) {
      mCurrentReactContext.onHostResume(mCurrentActivity);
      mCurrentReactContext.onHostPause();
    } else if (mLifecycleState == LifecycleState.RESUMED) {
      mCurrentReactContext.onHostPause();
    }
  }
  mLifecycleState = LifecycleState.BEFORE_RESUME;
}
项目:Ironman    文件:XReactInstanceManagerImpl.java   
private void moveToBeforeCreateLifecycleState() {
  if (mCurrentReactContext != null) {
    if (mLifecycleState == LifecycleState.RESUMED) {
      mCurrentReactContext.onHostPause();
      mLifecycleState = LifecycleState.BEFORE_RESUME;
    }
    if (mLifecycleState == LifecycleState.BEFORE_RESUME) {
      mCurrentReactContext.onHostDestroy();
    }
  }
  mLifecycleState = LifecycleState.BEFORE_CREATE;
}
项目:Ironman    文件:XReactInstanceManagerImpl.java   
private void tearDownReactContext(ReactContext reactContext) {
  UiThreadUtil.assertOnUiThread();
  if (mLifecycleState == LifecycleState.RESUMED) {
    reactContext.onHostPause();
  }
  for (ReactRootView rootView : mAttachedRootViews) {
    detachViewFromInstance(rootView, reactContext.getCatalystInstance());
  }
  reactContext.destroy();
  mDevSupportManager.onReactInstanceDestroyed(reactContext);
  mMemoryPressureRouter.removeMemoryPressureListener(reactContext.getCatalystInstance());
}
项目:Ironman    文件:ReactAppTestActivity.java   
@Override
protected void onPause() {
  super.onPause();

  mLifecycleState = LifecycleState.BEFORE_RESUME;

  overridePendingTransition(0, 0);

  if (mReactInstanceManager != null) {
    mReactInstanceManager.onHostPause();
  }
}
项目:Ironman    文件:ReactAppTestActivity.java   
@Override
protected void onResume() {
  super.onResume();

  mLifecycleState = LifecycleState.RESUMED;

  if (mReactInstanceManager != null) {
    mReactInstanceManager.onHostResume(this, this);
  }
}
项目:RNLearn_Project1    文件:ReactContext.java   
public LifecycleState getLifecycleState() {
  return mLifecycleState;
}
项目:RNLearn_Project1    文件:ReactInstanceManager.java   
ReactInstanceManager(
  Context applicationContext,
  @Nullable Activity currentActivity,
  @Nullable DefaultHardwareBackBtnHandler defaultHardwareBackBtnHandler,
  @Nullable JSBundleLoader bundleLoader,
  @Nullable String jsMainModuleName,
  List<ReactPackage> packages,
  boolean useDeveloperSupport,
  @Nullable NotThreadSafeBridgeIdleDebugListener bridgeIdleDebugListener,
  LifecycleState initialLifecycleState,
  UIImplementationProvider uiImplementationProvider,
  NativeModuleCallExceptionHandler nativeModuleCallExceptionHandler,
  JSCConfig jscConfig,
  @Nullable RedBoxHandler redBoxHandler,
  boolean lazyNativeModulesEnabled,
  boolean lazyViewManagersEnabled,
  boolean useStartupThread) {

  initializeSoLoaderIfNecessary(applicationContext);

  // TODO(9577825): remove this
  ApplicationHolder.setApplication((Application) applicationContext.getApplicationContext());
  DisplayMetricsHolder.initDisplayMetricsIfNotInitialized(applicationContext);

  mApplicationContext = applicationContext;
  mCurrentActivity = currentActivity;
  mDefaultBackButtonImpl = defaultHardwareBackBtnHandler;
  mBundleLoader = bundleLoader;
  mJSMainModuleName = jsMainModuleName;
  mPackages = packages;
  mUseDeveloperSupport = useDeveloperSupport;
  mDevSupportManager = DevSupportManagerFactory.create(
      applicationContext,
      mDevInterface,
      mJSMainModuleName,
      useDeveloperSupport,
      redBoxHandler);
  mBridgeIdleDebugListener = bridgeIdleDebugListener;
  mLifecycleState = initialLifecycleState;
  mUIImplementationProvider = uiImplementationProvider;
  mMemoryPressureRouter = new MemoryPressureRouter(applicationContext);
  mNativeModuleCallExceptionHandler = nativeModuleCallExceptionHandler;
  mJSCConfig = jscConfig;
  mLazyNativeModulesEnabled = lazyNativeModulesEnabled;
  mLazyViewManagersEnabled = lazyViewManagersEnabled;
  mUseStartupThread = useStartupThread;
}
项目:RNLearn_Project1    文件:ReactInstanceManager.java   
public LifecycleState getLifecycleState() {
  return mLifecycleState;
}