Package net.rim.device.api.applicationcontrol

Examples of net.rim.device.api.applicationcontrol.ApplicationPermissionsManager


      if(feature.equals(BarcodeNamespace.FEATURE_NAME)){
          scriptEngine.addExtension(feature, BarcodeNamespace.getInstance());
        }
     
      if( feature.equals( BarcodeNamespace.FEATURE_NAME ) ) {
            ApplicationPermissionsManager apm = ApplicationPermissionsManager.getInstance();
            ApplicationPermissions permissions = apm.getApplicationPermissions();
            ApplicationPermissions newPermissions = new ApplicationPermissions();

            int permissionKeys[] = new int[] { ApplicationPermissions.PERMISSION_FILE_API, ApplicationPermissions.PERMISSION_INPUT_SIMULATION, ApplicationPermissions.PERMISSION_MEDIA, ApplicationPermissions.PERMISSION_RECORDING };

            for( int i = 0; i < permissionKeys.length; i++ ) {
View Full Code Here


    public void loadFeature( final String feature, final String version, final Document doc, final ScriptEngine scriptEngine )
            throws Exception {
        Object obj = null;

        if( feature.equals( CameraNamespace.NAME ) ) {
            ApplicationPermissionsManager apm = ApplicationPermissionsManager.getInstance();
            ApplicationPermissions permissions = apm.getApplicationPermissions();
            ApplicationPermissions newPermissions = new ApplicationPermissions();

            int permissionKeys[] = new int[] { ApplicationPermissions.PERMISSION_INPUT_SIMULATION,
                    ApplicationPermissions.PERMISSION_EVENT_INJECTOR, ApplicationPermissions.PERMISSION_FILE_API };
View Full Code Here

    public void loadFeature( final String feature, final String version, final Document doc, final ScriptEngine scriptEngine )
            throws Exception {
        Object obj = null;

        if( feature.equals( MicrophoneNamespace.NAME ) ) {
            ApplicationPermissionsManager apm = ApplicationPermissionsManager.getInstance();
            ApplicationPermissions permissions = apm.getApplicationPermissions();
            ApplicationPermissions newPermissions = new ApplicationPermissions();

            int permissionKeys[] = new int[] { ApplicationPermissions.PERMISSION_FILE_API };

            for( int i = 0; i < permissionKeys.length; i++ ) {
View Full Code Here

            }
        }
    }

    private int checkPermission( String module ) {
        ApplicationPermissionsManager apm = ApplicationPermissionsManager.getInstance();
        if( module.equals( BLACKBERRY_APP ) ) {
            return apm.getPermission( ApplicationPermissions.PERMISSION_APPLICATION_MANAGEMENT );
        } else if( module.equals( BLACKBERRY_INVOKE ) || module.equals( BLACKBERRY_INVOKE_ADDRESSBOOKARGUMENTS )
                || module.equals( BLACKBERRY_INVOKE_BROWSERARGUMENTS ) || module.equals( BLACKBERRY_INVOKE_CALENDARARGUMENTS )
                || module.equals( BLACKBERRY_INVOKE_CAMERAARGUMENTS ) || module.equals( BLACKBERRY_INVOKE_JAVAARGUMENTS )
                || module.equals( BLACKBERRY_INVOKE_MAPSARGUMENTS ) || module.equals( BLACKBERRY_INVOKE_MESSAGEARGUMENTS )
                || module.equals( BLACKBERRY_INVOKE_PHONEARGUMENTS ) || module.equals( BLACKBERRY_INVOKE_SEARCHARGUMENTS )
                || module.equals( BLACKBERRY_INVOKE_TASKARGUMENTS ) ) {
            return apm.getPermission( ApplicationPermissions.PERMISSION_CROSS_APPLICATION_COMMUNICATION );
        } else if( module.equals( BLACKBERRY_IO_DIR ) || module.equals( BLACKBERRY_IO_FILE ) ) {
            return apm.getPermission( ApplicationPermissions.PERMISSION_FILE_API );
        } else if( module.equals( BLACKBERRY_MESSAGE ) ) {
            return apm.getPermission( ApplicationPermissions.PERMISSION_EMAIL );
        } else if( module.equals( BLACKBERRY_PIM_ADDRESS ) || module.equals( BLACKBERRY_PIM_APPOINTMENT )
                || module.equals( BLACKBERRY_PIM_ATTENDEE ) || module.equals( BLACKBERRY_PIM_CATEGORY )
                || module.equals( BLACKBERRY_PIM_CONTACT ) || module.equals( BLACKBERRY_PIM_MEMO )
                || module.equals( BLACKBERRY_PIM_RECURRENCE ) || module.equals( BLACKBERRY_PIM_REMINDER )
                || module.equals( BLACKBERRY_PIM_TASK ) ) {
            return apm.getPermission( ApplicationPermissions.PERMISSION_ORGANIZER_DATA );
        } else if( module.equals( BLACKBERRY_PUSH ) ) {
            return apm.getPermission( ApplicationPermissions.PERMISSION_INTERNET );
        }
        return ApplicationPermissions.VALUE_ALLOW;
    }
View Full Code Here

        // for a list of all available permissions
        // May 13, 2008: updated permissions by replacing deprecated constants.

        // Capture the current state of permissions and check against the
        // requirements
        final ApplicationPermissionsManager apm =
                ApplicationPermissionsManager.getInstance();
        final ApplicationPermissions original = apm.getApplicationPermissions();

        // Set up and attach a reason provider
        final DemoReasonProvider drp = new DemoReasonProvider();
        apm.addReasonProvider(ApplicationDescriptor
                .currentApplicationDescriptor(), drp);

        if (original
                .getPermission(ApplicationPermissions.PERMISSION_INPUT_SIMULATION) == ApplicationPermissions.VALUE_ALLOW
                && original
View Full Code Here

TOP

Related Classes of net.rim.device.api.applicationcontrol.ApplicationPermissionsManager

Copyright © 2018 www.massapicom. 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.