diff -r 2ca12c9f635b -r 94b923fa11ed securitydialogs/SecUi/Src/SecUiSecuritySettings.cpp --- a/securitydialogs/SecUi/Src/SecUiSecuritySettings.cpp Mon Jun 21 16:38:39 2010 +0300 +++ b/securitydialogs/SecUi/Src/SecUiSecuritySettings.cpp Thu Jul 15 19:36:50 2010 +0300 @@ -993,6 +993,38 @@ CleanupStack::PopAndDestroy(); // items + if ( FeatureManager::FeatureSupported( KFeatureIdSapTerminalControlFw ) ) + { + // define a flag indicating whether disable autolock is allowed. + TBool allowDisableAL = ETrue; + + if ( ( aPeriod == 0 ) && ( maxPeriod > 0 ) ) + { + #if defined( _DEBUG ) + RDebug::Print( + _L("(SECUI)CSecuritySettings::ChangeAutoLockPeriodL() \ + The period: %d is not allowed by TARM; max: %d" ), + aPeriod, maxPeriod ); + #endif + allowDisableAL = EFalse; + HBufC* prompt = NULL; + prompt = StringLoader::LoadLC( + R_SECUI_TEXT_AUTOLOCK_MUST_BE_ACTIVE ); + CAknNoteDialog* noteDlg = new ( ELeave ) CAknNoteDialog( + REINTERPRET_CAST( CEikDialog**,¬eDlg ) ); + noteDlg->PrepareLC( R_CODE_ERROR ); + noteDlg->SetTextL( *prompt ); + noteDlg->SetTimeout( CAknNoteDialog::ELongTimeout ); + noteDlg->SetTone( CAknNoteDialog::EErrorTone ); + noteDlg->RunLD(); + CleanupStack::PopAndDestroy( prompt ); + } + + if ( !allowDisableAL ) + { + return ChangeAutoLockPeriodL( oldPeriod ); + } + } if (aPeriod == 0) {