javatools/javacontrolpanel/controlpanel/javasrc/com/nokia/mj/impl/rt/javacontrolpanel/ApplicationUtilsImpl.java
author Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Fri, 11 Jun 2010 13:33:44 +0300
changeset 35 85266cc22c7f
child 64 0ea12c182930
permissions -rw-r--r--
Revision: v2.2.1 Kit: 2010123
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
35
85266cc22c7f Revision: v2.2.1
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
     1
/*
85266cc22c7f Revision: v2.2.1
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
     2
* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
85266cc22c7f Revision: v2.2.1
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
     3
* All rights reserved.
85266cc22c7f Revision: v2.2.1
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
     4
* This component and the accompanying materials are made available
85266cc22c7f Revision: v2.2.1
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
     5
* under the terms of "Eclipse Public License v1.0"
85266cc22c7f Revision: v2.2.1
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
     6
* which accompanies this distribution, and is available
85266cc22c7f Revision: v2.2.1
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
     7
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
85266cc22c7f Revision: v2.2.1
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
     8
*
85266cc22c7f Revision: v2.2.1
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
     9
* Initial Contributors:
85266cc22c7f Revision: v2.2.1
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    10
* Nokia Corporation - initial contribution.
85266cc22c7f Revision: v2.2.1
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    11
*
85266cc22c7f Revision: v2.2.1
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    12
* Contributors:
85266cc22c7f Revision: v2.2.1
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    13
*
85266cc22c7f Revision: v2.2.1
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    14
* Description:
85266cc22c7f Revision: v2.2.1
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    15
*
85266cc22c7f Revision: v2.2.1
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    16
*/
85266cc22c7f Revision: v2.2.1
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    17
85266cc22c7f Revision: v2.2.1
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    18
package com.nokia.mj.impl.rt.javacontrolpanel;
85266cc22c7f Revision: v2.2.1
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    19
85266cc22c7f Revision: v2.2.1
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    20
import com.nokia.mj.impl.rt.support.ApplicationInfo;
85266cc22c7f Revision: v2.2.1
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    21
import com.nokia.mj.impl.rt.support.ApplicationUtils;
85266cc22c7f Revision: v2.2.1
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    22
import com.nokia.mj.impl.utils.Uid;
85266cc22c7f Revision: v2.2.1
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    23
85266cc22c7f Revision: v2.2.1
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    24
import java.security.Permission;
85266cc22c7f Revision: v2.2.1
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    25
import java.security.AccessControlException;
85266cc22c7f Revision: v2.2.1
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    26
85266cc22c7f Revision: v2.2.1
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    27
/**
85266cc22c7f Revision: v2.2.1
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    28
 * @author Nokia Corporation
85266cc22c7f Revision: v2.2.1
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    29
 * @version 1.0
85266cc22c7f Revision: v2.2.1
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    30
 */
85266cc22c7f Revision: v2.2.1
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    31
public class ApplicationUtilsImpl extends ApplicationUtils
85266cc22c7f Revision: v2.2.1
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    32
{
85266cc22c7f Revision: v2.2.1
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    33
    public static void doShutdownImpl()
85266cc22c7f Revision: v2.2.1
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    34
    {
85266cc22c7f Revision: v2.2.1
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    35
        // Send shutdown notification to all registered listeners.
85266cc22c7f Revision: v2.2.1
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    36
        ((ApplicationUtilsImpl)sInstance).doShutdown();
85266cc22c7f Revision: v2.2.1
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    37
    }
85266cc22c7f Revision: v2.2.1
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    38
85266cc22c7f Revision: v2.2.1
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    39
85266cc22c7f Revision: v2.2.1
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    40
    public void notifyExitCmd()
85266cc22c7f Revision: v2.2.1
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    41
    {
85266cc22c7f Revision: v2.2.1
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    42
    }
85266cc22c7f Revision: v2.2.1
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    43
85266cc22c7f Revision: v2.2.1
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    44
    public void checkPermission(Permission aPermission)
85266cc22c7f Revision: v2.2.1
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    45
    throws AccessControlException, NullPointerException
85266cc22c7f Revision: v2.2.1
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    46
    {
85266cc22c7f Revision: v2.2.1
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    47
        checkPermission(null, aPermission);
85266cc22c7f Revision: v2.2.1
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    48
    }
85266cc22c7f Revision: v2.2.1
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    49
85266cc22c7f Revision: v2.2.1
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    50
    public void checkPermission(Uid aAppUid, Permission aPermission)
85266cc22c7f Revision: v2.2.1
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    51
    throws AccessControlException, NullPointerException
85266cc22c7f Revision: v2.2.1
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    52
    {
85266cc22c7f Revision: v2.2.1
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    53
        return;
85266cc22c7f Revision: v2.2.1
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    54
    }
85266cc22c7f Revision: v2.2.1
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    55
}