Examples of MIDletSuite


Examples of com.sun.midp.midlet.MIDletSuite

     * @param   resName  Image resource name
     * @return  true if image was loaded and created, false otherwise
     */
    private boolean loadAndCreateImmutableImageDataFromCache(ImageData data,
                                                             String resName) {
        MIDletSuite midletSuite =
            MIDletStateHandler.getMidletStateHandler().getMIDletSuite();
        int suiteId = midletSuite.getID();

        try {
            return loadAndCreateImmutableImageDataFromCache0(data,
                                                             suiteId, resName);
        } catch(OutOfMemoryError e) {
View Full Code Here

Examples of com.sun.midp.midlet.MIDletSuite

    static AppProxy getCurrent() {
        synchronized (mutex) {
            if (currentApp == null) {
                MIDletStateHandler mh =
                    MIDletStateHandler.getMidletStateHandler();
                MIDletSuite msuite = mh.getMIDletSuite();
                try {
                    currentApp = (msuite != null) ?
                        new AppProxy(msuite,
                                     mh.getFirstRunningMidlet(),
                                     null) :
View Full Code Here

Examples of com.sun.midp.midlet.MIDletSuite

     */
    protected AppProxy(int storageId, String classname)
    {
        this.storageId = storageId;
        this.classname = classname;
        MIDletSuite midletSuite = null;

        /* trying to initialize fields from suite info */
        try {
            midletSuite = MIDletSuiteStorage.
                    getMIDletSuiteStorage(classSecurityToken).
View Full Code Here

Examples of com.sun.midp.midlet.MIDletSuite

    final static void checkAPIPermission(Object securityToken) {
        if (securityToken != null) {
            ((SecurityToken)securityToken).
                checkIfPermissionAllowed(Permissions.MIDP);
        } else {
            MIDletSuite msuite =
                MIDletStateHandler.getMidletStateHandler().getMIDletSuite();
            if (msuite != null) {
                msuite.checkIfPermissionAllowed(Permissions.AMS);
            }
        }
    }
View Full Code Here

Examples of com.sun.midp.midlet.MIDletSuite

                notifyDestroyed();
                return;
            }

            for (int i = 0; i < suiteIds.length; i++) {
                MIDletSuite suite = storage.getMIDletSuite(suiteIds[i], false);
                String value;

                System.out.println("Suite: " + suiteIds[i]);

                value = suite.getProperty("MIDlet-Name");
                System.out.println("  Name: " + value);

                value = suite.getProperty("MIDlet-Version");
                System.out.println("  Version: " + value);

                value = suite.getProperty("MIDlet-Vendor");
                System.out.println("  Vendor: " + value);

                value = suite.getProperty("MIDlet-Description");
                if (value != null) {
                    System.out.println("  Description: " + value);
                }

                for (int j = 1; ; j++) {
                    value = suite.getProperty("MIDlet-" + j);
                    if (value == null) {
                        break;
                    }

                    if (j == 1) {
View Full Code Here

Examples of com.sun.midp.midlet.MIDletSuite

     * @exception SecurityException if the caller does not have permission
     *   to manage midlets
     */
    public static void setLastSuiteToRun(int id, String midlet, String arg0, String arg1) {

        MIDletSuite midletSuite =
            MIDletStateHandler.getMidletStateHandler().getMIDletSuite();

        // if a MIDlet suite is not scheduled, assume the JAM is calling.
        if (midletSuite != null) {
            midletSuite.checkIfPermissionAllowed(Permissions.AMS);
        }

        lastMidletSuiteToRun = id;
        lastMidletToRun = midlet;
        arg0ForLastMidlet = arg0;
View Full Code Here

Examples of com.sun.midp.midlet.MIDletSuite

    public void setTempProperty(SecurityToken token, String key,
            String value) {
        if (token != null) {
            token.checkIfPermissionAllowed(Permissions.AMS);
        } else {
            MIDletSuite current = MIDletStateHandler.
                getMidletStateHandler().getMIDletSuite();

            current.checkIfPermissionAllowed(Permissions.AMS);
        }

        properties.setProperty(key, value);
    }
View Full Code Here

Examples of com.sun.midp.midlet.MIDletSuite

     *
     * @param mss the midlet suite storage
     */
    private void readMIDletInfo(MIDletSuiteStorage mss) throws Throwable {
        try {
            MIDletSuite midletSuite =
                mss.getMIDletSuite(suiteInfo.suiteId, false);

            if (midletSuite == null) {
                return;
            }

            try {
                for (int n = 1; n < 100; n++) {
                    String nth = "MIDlet-"+ n;
                    String attr = midletSuite.getProperty(nth);
                    if (attr == null || attr.length() == 0)
                        break;

                    addMIDlet(new MIDletInfo(attr));
                }
            } finally {
                midletSuite.close();
            }
        } catch (Throwable t) {
            throw t;
        }
    }
View Full Code Here

Examples of com.sun.midp.midlet.MIDletSuite

    /**
     * Constructs a file object.
     */
    public File() {
        MIDletSuite midletSuite = Scheduler.getScheduler().getMIDletSuite();

        // if a MIDlet suite is not scheduled, assume the JAM is calling.
        if (midletSuite != null) {
            midletSuite.checkIfPermissionAllowed(Permissions.AMS);
        }
    }
View Full Code Here

Examples of com.sun.midp.midlet.MIDletSuite

     * Can only be called by JAM for testing.
     *
     * @param domain name of a security domain
     */
    public void setUnsignedSecurityDomain(String domain) {
        MIDletSuite midletSuite = MIDletStateHandler.
            getMidletStateHandler().getMIDletSuite();

        // if a MIDlet suite is not started, assume the JAM is calling.
        if (midletSuite != null) {
            midletSuite.checkIfPermissionAllowed(Permissions.MIDP);
        }

        unsignedSecurityDomain = domain;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.