javacommons/security/javasrc/com/nokia/mj/impl/security/midp/authorization/SecurityPromptHandler.java
branchRCL_3
changeset 19 71c436fe3ce0
parent 14 04becd199f91
child 21 4376525cdefb
equal deleted inserted replaced
18:9ac0a0a7da70 19:71c436fe3ce0
    79         case GeneralSecuritySettings.USER_SECURITY_MODE:
    79         case GeneralSecuritySettings.USER_SECURITY_MODE:
    80             iSecurityPromptsMode = securityPromptsMode;
    80             iSecurityPromptsMode = securityPromptsMode;
    81         }
    81         }
    82     }
    82     }
    83 
    83 
    84     public UserSecuritySettings handleUserPermission(
    84     public synchronized UserSecuritySettings handleUserPermission(
    85         UserPermission userPermission, boolean blanketPromptShown)
    85         UserPermission userPermission, boolean blanketPromptShown)
    86     {
    86     {
    87         UserSecuritySettings settings = userPermission
    87         UserSecuritySettings settings = userPermission
    88                                         .getUserSecuritySettings();
    88                                         .getUserSecuritySettings();
    89         Boolean tmp = (Boolean)sessionsDenied.get(settings.getName());
    89         Boolean tmp = (Boolean)sessionsDenied.get(settings.getName());
   217                 // option the most powerful one
   217                 // option the most powerful one
   218                 answer = 0;
   218                 answer = 0;
   219             }
   219             }
   220             else
   220             else
   221             {
   221             {
   222                 RuntimeUi ui = getUiInstance();
   222                 getUiInstance();
   223                 boolean responseAvailable = ui.confirm(
   223                 boolean responseAvailable = ui.confirm(
   224                                                 appName,
   224                                                 appName,
   225                                                 cData);
   225                                                 cData);
   226                 if (!responseAvailable)
   226                 if (!responseAvailable)
   227                 {
   227                 {
   327         {
   327         {
   328             ui.destroy();
   328             ui.destroy();
   329         }
   329         }
   330     }
   330     }
   331 
   331 
   332     private RuntimeUi getUiInstance()
   332     private void getUiInstance()
   333     {
   333     {
   334         if (ui == null)
   334         if (ui == null)
   335         {
   335         {
   336             ui = RuntimeUiFactory.getRuntimeUi();
   336             ui = RuntimeUiFactory.getRuntimeUi();
   337         }
   337         }
   338         return ui;
       
   339     }
   338     }
   340 
   339 
   341     private UserSecuritySettings handleDenyAnswer(UserSecuritySettings settings)
   340     private UserSecuritySettings handleDenyAnswer(UserSecuritySettings settings)
   342     {
   341     {
   343         // if the securityMode is Normal and Session/Blanket is Allowed interaction mode or
   342         // if the securityMode is Normal and Session/Blanket is Allowed interaction mode or