securitydialogs/SecUi/Src/SecUiManualSecuritySettings.cpp
changeset 66 67b3e3c1fc87
parent 39 61986511a9c8
equal deleted inserted replaced
63:989397f9511c 66:67b3e3c1fc87
   372     *****************************************************/
   372     *****************************************************/
   373     RDEBUG("0", 0);
   373     RDEBUG("0", 0);
   374     RMmCustomAPI::TLockNumber aLockType;
   374     RMmCustomAPI::TLockNumber aLockType;
   375     TInt ret = KErrGsm0707IncorrectPassword;
   375     TInt ret = KErrGsm0707IncorrectPassword;
   376     TInt length = aLockCode.Length();
   376     TInt length = aLockCode.Length();
       
   377     aLockType = RMmCustomAPI::EOperator;
       
   378     aLockType = aLockType;
   377 
   379 
   378     RDEBUG("length", length);
   380     RDEBUG("length", length);
   379 		// from now on, it accepts restricted lengths, although some locks are 20, others are 13
   381 		// from now on, it accepts restricted lengths, although some locks are 20, others are 13
       
   382 		// On 07/10/2010, this API is non-existent. Temporarilly remove the offendig code until a solution is found.
   380     if(aLockCode.Length() <= KSimLockMaxPasswordSize)
   383     if(aLockCode.Length() <= KSimLockMaxPasswordSize)
   381     {
   384     {
   382     if (aType.CompareF(Operator) == 0)
   385     if (aType.CompareF(Operator) == 0)
   383         {
   386         {
   384         aLockType = RMmCustomAPI::EOperator;
   387         aLockType = RMmCustomAPI::EOperator;
   385         ret = iCustomPhone.ActivateSimLock( aLockCode,aLockType );
   388         // ret = iCustomPhone.ActivateSimLock( aLockCode,aLockType );
   386         }
   389         }
   387 
   390 
   388     if (aType.CompareF(Gid1) == 0)
   391     if (aType.CompareF(Gid1) == 0)
   389         {
   392         {
   390         aLockType = RMmCustomAPI::EGid1;
   393         aLockType = RMmCustomAPI::EGid1;
   391         ret = iCustomPhone.ActivateSimLock( aLockCode,aLockType );
   394         // ret = iCustomPhone.ActivateSimLock( aLockCode,aLockType );
   392         }
   395         }
   393 
   396 
   394     if (aType.CompareF(Gid2) == 0)
   397     if (aType.CompareF(Gid2) == 0)
   395         {
   398         {
   396         aLockType = RMmCustomAPI::EGid2;
   399         aLockType = RMmCustomAPI::EGid2;
   397         ret = iCustomPhone.ActivateSimLock( aLockCode,aLockType );
   400         // ret = iCustomPhone.ActivateSimLock( aLockCode,aLockType );
   398         }
   401         }
   399 
   402 
   400     if (aType.CompareF(Imsi) == 0)
   403     if (aType.CompareF(Imsi) == 0)
   401         {
   404         {
   402         aLockType = RMmCustomAPI::EImsi;
   405         aLockType = RMmCustomAPI::EImsi;
   403         ret = iCustomPhone.ActivateSimLock( aLockCode,aLockType );
   406         // ret = iCustomPhone.ActivateSimLock( aLockCode,aLockType );
   404         }
   407         }
   405 
   408 
   406     if (aType.CompareF(Operator_Gid1) == 0)
   409     if (aType.CompareF(Operator_Gid1) == 0)
   407         {    
   410         {    
   408         aLockType = RMmCustomAPI::EOperator_Gid1;
   411         aLockType = RMmCustomAPI::EOperator_Gid1;
   409         ret = iCustomPhone.ActivateSimLock( aLockCode,aLockType );
   412         // ret = iCustomPhone.ActivateSimLock( aLockCode,aLockType );
   410         }
   413         }
   411 
   414 
   412     if (aType.CompareF(Operator_Gid2) == 0)
   415     if (aType.CompareF(Operator_Gid2) == 0)
   413         {
   416         {
   414         aLockType = RMmCustomAPI::EOperator_Gid2;
   417         aLockType = RMmCustomAPI::EOperator_Gid2;
   415         ret = iCustomPhone.ActivateSimLock( aLockCode,aLockType );
   418         // ret = iCustomPhone.ActivateSimLock( aLockCode,aLockType );
   416         }
   419         }
   417     }
   420     }
   418 
   421 
   419     RDEBUG("ret", ret);
   422     RDEBUG("ret", ret);
   420     switch (ret)
   423     switch (ret)
   467     *    Series 60 Customer / ETel
   470     *    Series 60 Customer / ETel
   468     *    Series 60  ETel API
   471     *    Series 60  ETel API
   469     *****************************************************/
   472     *****************************************************/
   470     RDEBUG("0", 0);
   473     RDEBUG("0", 0);
   471     RMmCustomAPI::TLockNumber aLockType;
   474     RMmCustomAPI::TLockNumber aLockType;
       
   475     aLockType = RMmCustomAPI::EOperator;
       
   476     aLockType = aLockType;
   472     TInt ret = KErrGsm0707IncorrectPassword;
   477     TInt ret = KErrGsm0707IncorrectPassword;
   473     TInt length = aUnlockCode.Length();
   478     TInt length = aUnlockCode.Length();
   474 
   479 
   475     RDEBUG("length", length);
   480     RDEBUG("length", length);
   476 		// from now on, it accepts restricted lengths, although some locks are 20, others are 13
   481 		// from now on, it accepts restricted lengths, although some locks are 20, others are 13
       
   482 		// On 07/10/2010, this API is non-existent. Temporarilly remove the offendig code until a solution is found.
   477     if(aUnlockCode.Length() <= KSimLockMaxPasswordSize)
   483     if(aUnlockCode.Length() <= KSimLockMaxPasswordSize)
   478     {
   484     {
   479     if (aType.CompareF(Operator) == 0)
   485     if (aType.CompareF(Operator) == 0)
   480         {
   486         {
   481         aLockType = RMmCustomAPI::EOperator;
   487         aLockType = RMmCustomAPI::EOperator;
   482         ret = iCustomPhone.DeActivateSimLock( aUnlockCode,aLockType );
   488         // ret = iCustomPhone.DeActivateSimLock( aUnlockCode,aLockType );
   483         }
   489         }
   484 
   490 
   485     if (aType.CompareF(Gid1) == 0)
   491     if (aType.CompareF(Gid1) == 0)
   486         {
   492         {
   487         aLockType = RMmCustomAPI::EGid1;
   493         aLockType = RMmCustomAPI::EGid1;
   488         ret = iCustomPhone.DeActivateSimLock( aUnlockCode,aLockType );
   494         // ret = iCustomPhone.DeActivateSimLock( aUnlockCode,aLockType );
   489         }
   495         }
   490 
   496 
   491     if (aType.CompareF(Gid2) == 0)
   497     if (aType.CompareF(Gid2) == 0)
   492         {
   498         {
   493         aLockType = RMmCustomAPI::EGid2;
   499         aLockType = RMmCustomAPI::EGid2;
   494         ret = iCustomPhone.DeActivateSimLock( aUnlockCode,aLockType );
   500         // ret = iCustomPhone.DeActivateSimLock( aUnlockCode,aLockType );
   495         }
   501         }
   496 
   502 
   497     if (aType.CompareF(Imsi) == 0)
   503     if (aType.CompareF(Imsi) == 0)
   498         {
   504         {
   499         aLockType = RMmCustomAPI::EImsi;
   505         aLockType = RMmCustomAPI::EImsi;
   500         ret = iCustomPhone.DeActivateSimLock( aUnlockCode,aLockType );
   506         // ret = iCustomPhone.DeActivateSimLock( aUnlockCode,aLockType );
   501         }
   507         }
   502 
   508 
   503     if (aType.CompareF(Operator_Gid1) == 0)
   509     if (aType.CompareF(Operator_Gid1) == 0)
   504         {    
   510         {    
   505         aLockType = RMmCustomAPI::EOperator_Gid1;
   511         aLockType = RMmCustomAPI::EOperator_Gid1;
   506         ret = iCustomPhone.DeActivateSimLock( aUnlockCode,aLockType );
   512         // ret = iCustomPhone.DeActivateSimLock( aUnlockCode,aLockType );
   507         }
   513         }
   508 
   514 
   509     if (aType.CompareF(Operator_Gid2) == 0)
   515     if (aType.CompareF(Operator_Gid2) == 0)
   510         {
   516         {
   511         aLockType = RMmCustomAPI::EOperator_Gid2;
   517         aLockType = RMmCustomAPI::EOperator_Gid2;
   512         ret = iCustomPhone.DeActivateSimLock( aUnlockCode,aLockType );
   518         // ret = iCustomPhone.DeActivateSimLock( aUnlockCode,aLockType );
   513         }
   519         }
   514     if (aType.CompareF(GlobalUnlock) == 0)
   520     if (aType.CompareF(GlobalUnlock) == 0)
   515         {
   521         {
   516         aLockType = RMmCustomAPI::EGlobalUnlock;
   522         aLockType = RMmCustomAPI::EGlobalUnlock;
   517         ret = iCustomPhone.DeActivateSimLock( aUnlockCode,aLockType );
   523         // ret = iCustomPhone.DeActivateSimLock( aUnlockCode,aLockType );
   518         }    
   524         }    
   519         
   525         
   520     }
   526     }
   521     RDEBUG("ret", ret);
   527     RDEBUG("ret", ret);
   522     switch (ret)
   528     switch (ret)