appinstaller/AppMngr2/GSSettingsPlugin/src/appmngr2gssettingsplugin.cpp
changeset 5 aba6b8104af3
parent 0 ba25891c3a9e
child 25 7333d7932ef7
equal deleted inserted replaced
4:3eebb1e54d3a 5:aba6b8104af3
     1 /*
     1 /*
     2 * Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies).
     2 * Copyright (c) 2003-2010 Nokia Corporation and/or its subsidiary(-ies).
     3 * All rights reserved.
     3 * All rights reserved.
     4 * This component and the accompanying materials are made available
     4 * This component and the accompanying materials are made available
     5 * under the terms of "Eclipse Public License v1.0"
     5 * under the terms of "Eclipse Public License v1.0"
     6 * which accompanies this distribution, and is available
     6 * which accompanies this distribution, and is available
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
   362         CAknSettingPage* dlg = NULL;
   362         CAknSettingPage* dlg = NULL;
   363         CDesCArrayFlat* itemArray = NULL;
   363         CDesCArrayFlat* itemArray = NULL;
   364 
   364 
   365         if( aSettingIndex == EAppMngr2SettingSwInstall )
   365         if( aSettingIndex == EAppMngr2SettingSwInstall )
   366             {
   366             {
   367             // Install software
   367             // Install software - toggle 'Signed only' and 'All'
   368             itemArray = iCoeEnv->ReadDesC16ArrayResourceL(
   368             TBool allowUntrusted = EFalse;
   369                     R_APPMNGR2_ALLOW_UNTRUSTED_VALUE_ARRAY );
   369             repDB->Get( KSWInstallerAllowUntrusted, allowUntrusted );
   370             repDB->Get( KSWInstallerAllowUntrusted, newIndex );
   370             allowUntrusted = !allowUntrusted;
   371             if( newIndex )
   371             SetPermissionL( aSettingIndex, allowUntrusted, urlText );
   372                 {
       
   373                 newIndex = 1;
       
   374                 }
       
   375             dlg = new ( ELeave ) CAknRadioButtonSettingPage(
       
   376                     R_APPMNGR2_SET_PAGE_ALLOW_UNTRUSTED,
       
   377                     newIndex, itemArray );
       
   378             }
   372             }
   379         else
   373         else
   380             {
   374             {
   381             // OCSP check
   375             // OCSP check
   382             repDB->Get( KSWInstallerOcspProcedure, newIndex );
   376             repDB->Get( KSWInstallerOcspProcedure, newIndex );
   387                     R_APPMNGR2_OCSP_CHECK_PAGE, newIndex, itemArray );
   381                     R_APPMNGR2_OCSP_CHECK_PAGE, newIndex, itemArray );
   388             }
   382             }
   389         CleanupStack::PopAndDestroy( repDB );
   383         CleanupStack::PopAndDestroy( repDB );
   390         CleanupStack::PushL( itemArray );
   384         CleanupStack::PushL( itemArray );
   391 
   385 
   392         if( dlg->ExecuteLD( CAknSettingPage::EUpdateWhenChanged ) )
   386         if( dlg && dlg->ExecuteLD( CAknSettingPage::EUpdateWhenChanged ) )
   393             {
   387             {
   394             SetPermissionL( aSettingIndex, newIndex, urlText );
   388             SetPermissionL( aSettingIndex, newIndex, urlText );
   395             }
   389             }
   396         CleanupStack::PopAndDestroy( itemArray );
   390         CleanupStack::PopAndDestroy( itemArray );
   397         }
   391         }