コード例 #1
0
  /**
   * Creates MIDlet suite instance by suite ID
   *
   * @return MIDlet suite to load
   * @throws Exception in the case MIDlet suite can not be created because of a security reasons or
   *     some problems related to suite storage
   */
  protected MIDletSuite createMIDletSuite() throws Exception {
    MIDletSuiteStorage storage;
    MIDletSuite suite = null;

    storage = MIDletSuiteStorage.getMIDletSuiteStorage(internalSecurityToken);

    if (suiteId == MIDletSuite.INTERNAL_SUITE_ID) {
      // assume a class name of a MIDlet in the classpath
      suite = InternalMIDletSuiteImpl.create(storage, midletDisplayName, suiteId);
    } else {
      suite = storage.getMIDletSuite(suiteId, false);
      Logging.initLogSettings(suiteId);
    }

    return suite;
  }
コード例 #2
0
  /** Creates environment objects needed to AMS task */
  protected void createSuiteEnvironment() {
    foregroundController = this;

    lcduiEnvironment =
        new LCDUIEnvironmentForCDC(
            internalSecurityToken, eventQueue, isolateId, foregroundController);
    foregroundEventProducer = new CdcForegroundEventProducer(eventQueue);

    // creates display container, needs foregroundController
    super.createSuiteEnvironment();

    midletStateHandler = MIDletStateHandler.getMidletStateHandler();

    MIDletSuiteStorage mss = MIDletSuiteStorage.getMIDletSuiteStorage(internalSecurityToken);

    midletStateHandler.initMIDletStateHandler(
        internalSecurityToken, this, new CdcMIDletLoader(mss), this);

    MidletSuiteContainer msc = new MidletSuiteContainer(mss);

    RmsEnvironment.init(internalSecurityToken, msc);
  }