AmsUtilpublic class AmsUtil extends Object Implements utilities that are different for SVM and MVM modes. |
Fields Summary |
---|
private static MIDletProxyList | midletProxyListCached reference to the MIDletProxyList. |
Methods Summary |
---|
static boolean | executeWithArgs(com.sun.midp.midletsuite.MIDletSuiteStorage midletSuiteStorage, int externalAppId, int id, java.lang.String midlet, java.lang.String displayName, java.lang.String arg0, java.lang.String arg1, java.lang.String arg2, int memoryReserved, int memoryTotal, int priority, java.lang.String profileName)Queues the execution of the named Application suite to run.
The current application suite should terminate itself normally
to make resources available to the new application suite. Only
one package and set of MIDlets can be queued in this manner.
If multiple calls to execute are made, the package and MIDlets
specified during the last invokation will be executed
when the current application is terminated.
if (id != MIDletSuite.UNUSED_SUITE_ID) {
// The MIDlet running already shoudln't be started again.
// Each started MIDlet has matching MIDletProxy instance
// created on MIDLET_CREATED_NOTIFICATION event. In SVM mode
// the event system is not used for MIDlet execution, so
// MIDletProxy can not exist yet for a MIDlet just started.
// Instead of MIDletProxyList browsing the MIDletStateHandler
// is checked for the running MIDlet.
if (MIDletStateHandler.getMidletStateHandler().isRunning(midlet)) {
// No need to exit, MIDlet already loaded
return false;
}
}
MIDletSuiteUtils.nextMidletSuiteToRun = id;
MIDletSuiteUtils.nextMidletToRun = midlet;
MIDletSuiteUtils.arg0ForNextMidlet = arg0;
MIDletSuiteUtils.arg1ForNextMidlet = arg1;
MIDletSuiteUtils.arg2ForNextMidlet = arg2;
MIDletSuiteUtils.memoryReserved = memoryReserved;
MIDletSuiteUtils.memoryTotal = memoryTotal;
MIDletSuiteUtils.priority = priority;
MIDletSuiteUtils.profileName = profileName;
return true;
| static void | initClass(MIDletProxyList theMIDletProxyList, MIDletControllerEventProducer theMidletControllerEventProducer)Initializes AmsUtil class. shall only be called from
MIDletSuiteLoader's main() in MVM AMS isolate
or in SVM main isolate.
No need in security checks since it is package private method.
midletProxyList = theMIDletProxyList;
| static void | terminateIsolate(int id)Does nothing in SVM mode
|
|