/**
   * Sets up the session for rendering.
   *
   * <p>The counterpart is {@link #tearDown()}.
   */
  private void setUp() {
    // make sure the Resources object references the context (and other objects) for this
    // scene
    mContext.initResources();
    sCurrentContext = mContext;

    // create an InputMethodManager
    InputMethodManager.getInstance();

    LayoutLog currentLog = mParams.getLog();
    Bridge.setLog(currentLog);
    mContext.getRenderResources().setFrameworkResourceIdProvider(this);
    mContext.getRenderResources().setLogger(currentLog);
  }