Revision: 201025 RCL_3
authorDremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Thu, 15 Jul 2010 19:36:50 +0300
branchRCL_3
changeset 19 94b923fa11ed
parent 17 2ca12c9f635b
child 20 63339781d179
Revision: 201025 Kit: 2010127
securitydialogs/Autolock/src/AutolockAppUi.cpp
securitydialogs/SecUi/Src/SecUiSecuritySettings.cpp
securitydialogs/simlockui/group/SimLockUI.mmp
--- a/securitydialogs/Autolock/src/AutolockAppUi.cpp	Mon Jun 21 16:38:39 2010 +0300
+++ b/securitydialogs/Autolock/src/AutolockAppUi.cpp	Thu Jul 15 19:36:50 2010 +0300
@@ -992,6 +992,10 @@
 		RWindowGroup& groupWin=iCoeEnv->RootWin();
 		iAppKey = groupWin.CaptureKeyUpAndDowns(EStdKeyApplication0, 0, 0); // Capture app key
 		}
+	// Any orientation change is a waste of battery and triggers unnecesary window events and paining.
+	// Not only that: in landscape the BigRedButton is too small.
+	// Therefore we always stay in portrait. The icon looks much nicer.
+	SetOrientationL( EAppUiOrientationPortrait );
 	LockSideKeyL();
 	}
 // ----------------------------------------------------
--- 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**,&noteDlg ) );
+            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)
         {
--- a/securitydialogs/simlockui/group/SimLockUI.mmp	Mon Jun 21 16:38:39 2010 +0300
+++ b/securitydialogs/simlockui/group/SimLockUI.mmp	Thu Jul 15 19:36:50 2010 +0300
@@ -24,7 +24,7 @@
 #include "../inc/simlockui.hrh"
 #include <data_caging_paths.hrh>
 #include <platform_paths.hrh>
-CAPABILITY ALL -TCB
+CAPABILITY CAP_APPLICATION
 
 TARGETPATH        /sys/bin
 TARGET            simlockui.exe