javamanager/javainstaller/installer/javasrc/com/nokia/mj/impl/installer/midp2/install/steps/HandleCustomAttributes.java
branchRCL_3
changeset 26 2455ef1f5bbc
parent 25 ae942d28ec0e
child 27 d5e927d5853b
equal deleted inserted replaced
25:ae942d28ec0e 26:2455ef1f5bbc
   100         {
   100         {
   101             return;
   101             return;
   102         }
   102         }
   103         for (int i = 1; true; i++)
   103         for (int i = 1; true; i++)
   104         {
   104         {
   105             if (apps.size() < i)
       
   106             {
       
   107                 break;
       
   108             }
       
   109 
       
   110             String attrName = "Nokia-MIDlet-Auto-Start-" + i;
   105             String attrName = "Nokia-MIDlet-Auto-Start-" + i;
   111             String attrValue = aBall.getAttributeValue(attrName);
   106             String attrValue = aBall.getAttributeValue(attrName);
   112 
   107 
   113             if (attrValue == null)
   108             if (attrValue == null)
   114             {
   109             {
   125                 }
   120                 }
   126             }
   121             }
   127 
   122 
   128             if (attrValue != null)
   123             if (attrValue != null)
   129             {
   124             {
   130                 if (!aBall.attributeExistsInJar(attrName))
   125                 if (apps.size() < i)
   131                 {
   126                 {
   132                     // The attribute is only in .jad, ignore it.
   127                     break;
   133                     Log.logWarning("Attribute " + attrName +
       
   134                         " ignored because it is not in Manifest");
       
   135                     continue;
       
   136                 }
   128                 }
   137 
   129 
   138                 // Check if MIDlet has permission for Auto-start
   130                 // Check if MIDlet has permission for Auto-start
   139                 AccessControllerImpl accessControllerImpl =
   131                 AccessControllerImpl accessControllerImpl =
   140                     AccessControllerFactoryImpl.
   132                     AccessControllerFactoryImpl.
   177                      (aBall.attributeExistsInJad(attrName)?
   169                      (aBall.attributeExistsInJad(attrName)?
   178                       OtaStatusCode.INVALID_DESCRIPTOR:
   170                       OtaStatusCode.INVALID_DESCRIPTOR:
   179                       OtaStatusCode.INVALID_JAR));
   171                       OtaStatusCode.INVALID_JAR));
   180                 }
   172                 }
   181             }
   173             }
       
   174             else
       
   175             {
       
   176                 break;
       
   177             }
   182         }
   178         }
   183     }
   179     }
   184 }
   180 }