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