Revision: 201015 RCL_3
authorDremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Tue, 27 Apr 2010 17:57:16 +0300
branchRCL_3
changeset 15 21e939dd208a
parent 11 8d1d8440b626
child 18 36a7e6c28b62
child 23 66ecddbca914
Revision: 201015 Kit: 201017
accessoryservices/accessorymonitor/tsrc/public/basic/accmonitoringtestmodule/group/envrecall.cmd
accessoryservices/accessorymonitor/tsrc/public/basic/accmonitoringtestmodule/group/envsetup.cmd
accessoryservices/accessorymonitor/tsrc/public/basic/group/envrecall.cmd
accessoryservices/accessorymonitor/tsrc/public/basic/group/envsetup.cmd
accessoryservices/accessoryremotecontrol/tsrc/remcontestcontrol/dsytfstifadapter/group/envrecall.cmd
accessoryservices/accessoryremotecontrol/tsrc/remcontestcontrol/dsytfstifadapter/group/envsetup.cmd
accessoryservices/accessoryserver/src/Policy/AccPolGenericIDArrayAccessor.cpp
accessoryservices/accessoryserver/src/Server/AccSrvConnectionController.cpp
accessoryservices/accessoryserver/src/Server/AccSrvSettingsHandler.cpp
accessoryservices/accessoryserver/tsrc/public/basic/AccessoryTestControl/dsytfstifadapter/group/envrecall.cmd
accessoryservices/accessoryserver/tsrc/public/basic/AccessoryTestControl/dsytfstifadapter/group/envsetup.cmd
accessoryservices/gid_pc_tool/Data/CMD/CreateDB.cmd
sysstatemgmt/ssmcmdlists/data/noncriticalcmdlist_ext.rss
sysstatemgmt/ssmcustcmds/ssmsystemcmds/src/ssminitpskeys.cpp
sysstatemgmt/systemstatereferenceplugins/clayer/inc/startupdomainpskeys.h
sysstatemgmt/systemstatereferenceplugins/clayer/src/ssmsecurityeventobserver.cpp
sysstatemgmt/systemstatereferenceplugins/custcmd/src/ssmsecuritychecknotifier.cpp
--- a/accessoryservices/accessorymonitor/tsrc/public/basic/accmonitoringtestmodule/group/envrecall.cmd	Wed Apr 14 17:17:45 2010 +0300
+++ b/accessoryservices/accessorymonitor/tsrc/public/basic/accmonitoringtestmodule/group/envrecall.cmd	Tue Apr 27 17:57:16 2010 +0300
@@ -19,21 +19,25 @@
 
 @echo Cleaning stubs...
 pushd ..\..\stubs\group\
-call bldmake bldfiles
-call abld test reallyclean
+REM call bldmake bldfiles
+REM call abld test reallyclean
+call sbs -c armv5.test REALLYCLEAN
+call sbs -c winscw.test REALLYCLEAN
 popd
 @echo Cleaning stubs... Finished
 
 @echo build accfwuinotifier...
 pushd \sf\mw\appsupport\coreapplicationuis\accfwuinotifier\group\
-call bldmake bldfiles
-call abld build
+REM call bldmake bldfiles
+REM call abld build
+call sbs
 popd
 @echo build accfwuinotifier... Finished
 
 @echo build accessoryadaptation...
 pushd \ncp_sw\corecom\modemadaptation_ext\adaptationlayer_ext\systemadaptation\group\
-call bldmake bldfiles
-call abld build accessoryadaptation
+REM call bldmake bldfiles
+REM call abld build accessoryadaptation
+call sbs -p accessoryadaptation
 popd
 @echo build accessoryadaptation... Finished
\ No newline at end of file
--- a/accessoryservices/accessorymonitor/tsrc/public/basic/accmonitoringtestmodule/group/envsetup.cmd	Wed Apr 14 17:17:45 2010 +0300
+++ b/accessoryservices/accessorymonitor/tsrc/public/basic/accmonitoringtestmodule/group/envsetup.cmd	Tue Apr 27 17:57:16 2010 +0300
@@ -19,22 +19,30 @@
 
 @echo Cleaning accfwuinotifier...
 pushd \sf\mw\appsupport\coreapplicationuis\accfwuinotifier\group\
-call bldmake bldfiles
-call abld reallyclean
+REM call bldmake bldfiles
+REM call abld reallyclean
+call sbs -c armv5 REALLYCLEAN
+call sbs -c winscw REALLYCLEAN
 popd
 @echo Cleaning accfwuinotifier... Finished
 
 @echo Cleaning accessoryadaptation...
 pushd \ncp_sw\corecom\modemadaptation_ext\adaptationlayer_ext\systemadaptation\group\
-call bldmake bldfiles
-call abld clean armv5 accessoryadaptation
+REM call bldmake bldfiles
+REM call abld clean armv5 accessoryadaptation
+call sbs -p accessoryadaptation -c armv5 CLEAN
+call sbs -p accessoryadaptation -c winscw CLEAN
 popd
 @echo Cleaning accessoryadaptation... Finished
 
 @echo Setting up stubs...
 pushd ..\..\stubs\group\
-call bldmake bldfiles
-call abld test reallyclean
-call abld test build
+REM call bldmake bldfiles
+REM call abld test reallyclean
+call sbs -c armv5.test REALLYCLEAN
+call sbs -c winscw.test REALLYCLEAN
+REM call abld test build
+call sbs -c armv5.test
+call sbs -c winscw.test
 popd
 @echo Setting up stubs... Finished
--- a/accessoryservices/accessorymonitor/tsrc/public/basic/group/envrecall.cmd	Wed Apr 14 17:17:45 2010 +0300
+++ b/accessoryservices/accessorymonitor/tsrc/public/basic/group/envrecall.cmd	Tue Apr 27 17:57:16 2010 +0300
@@ -19,21 +19,25 @@
 
 @echo Cleaning stubs...
 pushd ..\stubs\group\
-call bldmake bldfiles
-call abld test reallyclean
+REM call bldmake bldfiles
+REM call abld test reallyclean
+call sbs -c armv5.test REALLYCLEAN
+call sbs -c winscw.test REALLYCLEAN
 popd
 @echo Cleaning stubs... Finished
 
 @echo build accfwuinotifier...
 pushd \sf\mw\appsupport\coreapplicationuis\accfwuinotifier\group\
-call bldmake bldfiles
-call abld build
+REM call bldmake bldfiles
+REM call abld build
+call sbs
 popd
 @echo build accfwuinotifier... Finished
 
 @echo build accessoryadaptation...
 pushd \ncp_sw\corecom\modemadaptation_ext\adaptationlayer_ext\systemadaptation\group\
-call bldmake bldfiles
-call abld build accessoryadaptation
+REM call bldmake bldfiles
+REM call abld build accessoryadaptation
+call sbs -p accessoryadaptation
 popd
 @echo build accessoryadaptation... Finished
\ No newline at end of file
--- a/accessoryservices/accessorymonitor/tsrc/public/basic/group/envsetup.cmd	Wed Apr 14 17:17:45 2010 +0300
+++ b/accessoryservices/accessorymonitor/tsrc/public/basic/group/envsetup.cmd	Tue Apr 27 17:57:16 2010 +0300
@@ -19,22 +19,29 @@
 
 @echo Cleaning accfwuinotifier...
 pushd \sf\mw\appsupport\coreapplicationuis\accfwuinotifier\group\
-call bldmake bldfiles
-call abld reallyclean
+REM call bldmake bldfiles
+REM call abld reallyclean
+call sbs -c armv5 REALLYCLEAN
+call sbs -c winscw REALLYCLEAN
 popd
 @echo Cleaning accfwuinotifier... Finished
 
 @echo Cleaning accessoryadaptation...
 pushd \ncp_sw\corecom\modemadaptation_ext\adaptationlayer_ext\systemadaptation\group\
-call bldmake bldfiles
-call abld clean armv5 accessoryadaptation
+REM call bldmake bldfiles
+REM call abld clean armv5 accessoryadaptation
+call sbs -p accessoryadaptation -c armv5 CLEAN
 popd
 @echo Cleaning accessoryadaptation... Finished
 
 @echo Setting up stubs...
 pushd ..\stubs\group\
-call bldmake bldfiles
-call abld test reallyclean
-call abld test build
+REM call bldmake bldfiles
+REM call abld test reallyclean
+call sbs -c armv5.test REALLYCLEAN
+call sbs -c winscw.test REALLYCLEAN
+REM call abld test build
+call sbs -c armv5.test
+call sbs -c winscw.test
 popd
 @echo Setting up stubs... Finished
--- a/accessoryservices/accessoryremotecontrol/tsrc/remcontestcontrol/dsytfstifadapter/group/envrecall.cmd	Wed Apr 14 17:17:45 2010 +0300
+++ b/accessoryservices/accessoryremotecontrol/tsrc/remcontestcontrol/dsytfstifadapter/group/envrecall.cmd	Tue Apr 27 17:57:16 2010 +0300
@@ -19,30 +19,37 @@
 
 @echo Cleaning stubs
 pushd ..\..\..\stub\group\
-call bldmake bldfiles
-call abld test reallyclean
+REM call bldmake bldfiles
+REM call abld test reallyclean
+call sbs -c armv5.test REALLYCLEAN
+call sbs -c winscw.test REALLYCLEAN
 popd
 @echo Cleaning stubs done
 
 @echo build remconadaptation...
 pushd \ncp_sw\corecom\modemadaptation_ext\adaptationlayer_ext\systemadaptation\accessoryadaptation\group\
-call bldmake bldfiles
-call abld build remconadaptation
+REM call bldmake bldfiles
+REM call abld build remconadaptation
+call sbs -p remconadaptation
 popd
 @echo build remconadaptation... Finished
 
 @echo build phoneclient...
 pushd \sf\mw\phonesrv\phoneclientserver\phoneclient\group
-call bldmake bldfiles
-call abld build
+REM call bldmake bldfiles
+REM call abld build
+call sbs
 popd
 @echo build phoneclient... Finished
 
 @echo build phonecmdhandler
 pushd \sf\mw\phonesrv\phonecmdhandler\group\
-call bldmake bldfiles
-call abld makefile 
-call abld reallyclean
-call abld build
+REM call bldmake bldfiles
+REM call abld makefile 
+REM call abld reallyclean
+call sbs -c armv5 REALLYCLEAN
+call sbs -c winscw REALLYCLEAN
+REM call abld build
+call sbs
 popd
 @echo build phonecmdhandler done
--- a/accessoryservices/accessoryremotecontrol/tsrc/remcontestcontrol/dsytfstifadapter/group/envsetup.cmd	Wed Apr 14 17:17:45 2010 +0300
+++ b/accessoryservices/accessoryremotecontrol/tsrc/remcontestcontrol/dsytfstifadapter/group/envsetup.cmd	Tue Apr 27 17:57:16 2010 +0300
@@ -19,17 +19,22 @@
 
 @echo Cleaning remconadaptation...
 pushd \ncp_sw\corecom\modemadaptation_ext\adaptationlayer_ext\systemadaptation\accessoryadaptation\group\
-call bldmake bldfiles
-call abld makefile remconadaptation
-call abld reallyclean remconadaptation
+REM call bldmake bldfiles
+REM call abld makefile remconadaptation
+REM call abld reallyclean remconadaptation
+call sbs -p remconadaptation -c armv5 REALLYCLEAN
+call sbs -p remconadaptation -c winscw REALLYCLEAN
 popd
 @echo Cleaning remconadaptation... Finished
 
-
 @echo build/instr stubs
 pushd ..\..\..\stub\group\
-call bldmake bldfiles
-call abld test reallyclean
-call abld test build
+REM call bldmake bldfiles
+REM call abld test reallyclean
+call sbs -c armv5.test REALLYCLEAN
+call sbs -c winscw.test REALLYCLEAN
+REM call abld test build
+call sbs -c armv5.test
+call sbs -c winscw.test
 popd
 @echo build/instr stubs done
--- a/accessoryservices/accessoryserver/src/Policy/AccPolGenericIDArrayAccessor.cpp	Wed Apr 14 17:17:45 2010 +0300
+++ b/accessoryservices/accessoryserver/src/Policy/AccPolGenericIDArrayAccessor.cpp	Tue Apr 27 17:57:16 2010 +0300
@@ -116,13 +116,17 @@
     COM_TRACE_( "[AccFW: ACCPOLICY] TAccPolGenericIDArrayAccessor::RemoveIndexFromGenericIDArray()" ); 
     
     TInt iArrayCount( aGenericIDArray.Count() );    
-    TInt i(aIndex); 
-    for ( ; i < (iArrayCount-1); ++i ) 
-        { 
-        aGenericIDArray.iGenericIDArray[i] = aGenericIDArray.iGenericIDArray[i+1]; 
-        } 
-    TAccPolGenericID emptyID; 
-    aGenericIDArray.iGenericIDArray[i] = emptyID; 
+    TInt i(aIndex);
+    
+    if( (iArrayCount > 0) && (i >= 0) ) 
+    	{
+	    for ( ; i < (iArrayCount-1); ++i ) 
+	        { 
+	        aGenericIDArray.iGenericIDArray[i] = aGenericIDArray.iGenericIDArray[i+1]; 
+	        } 
+    	TAccPolGenericID emptyID; 
+    	aGenericIDArray.iGenericIDArray[i] = emptyID; 
+    	} 
 
     COM_TRACE_( "[AccFW: ACCPOLICY] TAccPolGenericIDArrayAccessor::RemoveIndexFromGenericIDArray() - return void" ); 
     } 
--- a/accessoryservices/accessoryserver/src/Server/AccSrvConnectionController.cpp	Wed Apr 14 17:17:45 2010 +0300
+++ b/accessoryservices/accessoryserver/src/Server/AccSrvConnectionController.cpp	Tue Apr 27 17:57:16 2010 +0300
@@ -766,7 +766,10 @@
         { 
         TInt index( TAccPolGenericIDArrayAccessor::FindWithUniqueIDL( 
                 genericIDArray, aDbId) ); 
-        TAccPolGenericIDArrayAccessor::RemoveIndexFromGenericIDArray(genericIDArray, index); 
+				if(KErrNotFound != index)
+					{
+        	TAccPolGenericIDArrayAccessor::RemoveIndexFromGenericIDArray(genericIDArray, index); 
+        	}
         }
 
     accMode = iPolicy->ResolveAccessoryModeL( genericIDArray, 
--- a/accessoryservices/accessoryserver/src/Server/AccSrvSettingsHandler.cpp	Wed Apr 14 17:17:45 2010 +0300
+++ b/accessoryservices/accessoryserver/src/Server/AccSrvSettingsHandler.cpp	Tue Apr 27 17:57:16 2010 +0300
@@ -254,17 +254,18 @@
 
     TPtr8 ptrBuf( buf->Des() );
     User::LeaveIfError( session.Connect() );
+	CleanupClosePushL ( session );
     User::LeaveIfError( file.Open( session, KHWDevicesFile, EFileRead ) );
     file.Read( ptrBuf );
     file.Close();
-    session.Close();
 
     TLex8 l( ptrBuf );
     TInt32 temp;
     l.Val( temp );
     settings = static_cast< TUint32 >( temp );
 
-    CleanupStack::Pop( buf );
+	CleanupStack::PopAndDestroy ( &session );
+    CleanupStack::PopAndDestroy ( buf );
 
     COM_TRACE_1( "[AccFW:AccServer] CAccSrvSettingsHandler::GetSupportedHWDevicesL() - return %d", settings );
 
--- a/accessoryservices/accessoryserver/tsrc/public/basic/AccessoryTestControl/dsytfstifadapter/group/envrecall.cmd	Wed Apr 14 17:17:45 2010 +0300
+++ b/accessoryservices/accessoryserver/tsrc/public/basic/AccessoryTestControl/dsytfstifadapter/group/envrecall.cmd	Tue Apr 27 17:57:16 2010 +0300
@@ -19,41 +19,51 @@
 
 @echo Cleaning stubs...
 pushd ..\..\..\stubs\group\
-call bldmake bldfiles
-call abld test reallyclean
+REM call bldmake bldfiles
+REM call abld test reallyclean
+call sbs -c armv5.test REALLYCLEAN
+call sbs -c winscw.test REALLYCLEAN
 popd
 @echo Cleaning stubs... Finished
 
 
 @echo build BT Audioman Client...
 pushd \sf\mw\btservices\bluetoothengine\btaudioman\group
-call bldmake bldfiles
-call abld build
+REM call bldmake bldfiles
+REM call abld build
+call sbs
 popd
 @echo build BT Audioman Client... Finished
 
 
 @echo build accfwuinotifier...
 pushd \sf\mw\appsupport\coreapplicationuis\accfwuinotifier\group
-call bldmake bldfiles
-call abld build
+REM call bldmake bldfiles
+REM call abld build
+call sbs
 popd
 @echo build accfwuinotifier... Finished
 
 
 @echo build accessoryadaptation...
 pushd \ncp_sw\corecom\modemadaptation_ext\adaptationlayer_ext\systemadaptation\accessoryadaptation\group\
-call bldmake bldfiles
-call abld cleanexport
-call abld export
-call abld build accessoryadaptation
+REM call bldmake bldfiles
+REM call abld cleanexport
+call sbs -c armv5 CLEANEXPORT
+call sbs -c winscw CLEANEXPORT
+REM call abld export
+call sbs -c armv5 EXPORT
+call sbs -c winscw EXPORT
+REM call abld build accessoryadaptation
+call sbs -p accessoryadaptation
 popd
 @echo build accessoryadaptation... Finished
 
 
 @echo build Plugged Display ASY...
 pushd \sf\os\devicesrv\accessoryservices\pluggeddisplay\pluggeddisplayasy\group
-call bldmake bldfiles
-call abld build
+REM call bldmake bldfiles
+REM call abld build
+call sbs
 popd
 @echo build Plugged Display ASY... Finished
\ No newline at end of file
--- a/accessoryservices/accessoryserver/tsrc/public/basic/AccessoryTestControl/dsytfstifadapter/group/envsetup.cmd	Wed Apr 14 17:17:45 2010 +0300
+++ b/accessoryservices/accessoryserver/tsrc/public/basic/AccessoryTestControl/dsytfstifadapter/group/envsetup.cmd	Tue Apr 27 17:57:16 2010 +0300
@@ -19,43 +19,55 @@
 
 @echo Cleaning BT Audioman Client...
 pushd \sf\mw\btservices\bluetoothengine\btaudioman\group
-call bldmake bldfiles
-call abld makefile btaudiomanclient
-call abld reallyclean btaudiomanclient
+REM call bldmake bldfiles
+REM call abld makefile btaudiomanclient
+REM call abld reallyclean btaudiomanclient
+call sbs -p btaudiomanclient -c armv5 REALLYCLEAN
+call sbs -p btaudiomanclient -c winscw REALLYCLEAN
 popd
 @echo Cleaning BT Audioman Client... Finished
 
 
 @echo Cleaning accfwuinotifier...
 pushd \sf\mw\appsupport\coreapplicationuis\accfwuinotifier\group
-call bldmake bldfiles
-call abld makefile 
-call abld reallyclean
+REM call bldmake bldfiles
+REM call abld makefile 
+REM call abld reallyclean
+call sbs -c armv5 REALLYCLEAN
+call sbs -c winscw REALLYCLEAN
 popd
 @echo Cleaning accfwuinotifier... Finished
 
 
 @echo Cleaning accessoryadaptation...
 pushd \ncp_sw\corecom\modemadaptation_ext\adaptationlayer_ext\systemadaptation\accessoryadaptation\group\
-call bldmake bldfiles
-call abld makefile accessoryadaptation
-call abld clean accessoryadaptation
+REM call bldmake bldfiles
+REM call abld makefile accessoryadaptation
+REM call abld clean accessoryadaptation
+call sbs -p accessoryadaptation -c armv5 CLEAN
+call sbs -p accessoryadaptation -c winscw CLEAN
 popd
 @echo Cleaning accessoryadaptation... Finished
 
 
 @echo Cleaning Plugged Display ASY...
 pushd \sf\os\devicesrv\accessoryservices\pluggeddisplay\pluggeddisplayasy\group
-call bldmake bldfiles
-call abld reallyclean
+REM call bldmake bldfiles
+REM call abld reallyclean
+call sbs -c armv5 REALLYCLEAN
+call sbs -c winscw REALLYCLEAN
 popd
 @echo Cleaning Plugged Display ASY... Finished
 
 
 @echo Setting up stubs...
 pushd ..\..\..\stubs\group\
-call bldmake bldfiles
-call abld test reallyclean
-call abld test build
+REM call bldmake bldfiles
+REM call abld test reallyclean
+call sbs -c armv5.test REALLYCLEAN
+call sbs -c winscw.test REALLYCLEAN
+REM call abld test build
+call sbs -c armv5.test
+call sbs -c winscw.test
 popd
 @echo Setting up stubs... Finished
--- a/accessoryservices/gid_pc_tool/Data/CMD/CreateDB.cmd	Wed Apr 14 17:17:45 2010 +0300
+++ b/accessoryservices/gid_pc_tool/Data/CMD/CreateDB.cmd	Tue Apr 27 17:57:16 2010 +0300
@@ -40,8 +40,12 @@
 cd%ACCPOL_PATH%\group
 echo export second
 xcopy \epoc32\winscw\c\System\Data\DBS_10205030_accpolicydb.db ..\data\
-call abld.bat cleanexport
-call abld.bat export
+REM call abld.bat cleanexport
+call sbs -c armv5 CLEANEXPORT
+call sbs -c winscw CLEANEXPORT
+REM call abld.bat export
+call sbs -c armv5 EXPORT
+call sbs -c winscw EXPORT
 
 goto end
 
@@ -49,9 +53,13 @@
 
 cd%ACCPOL_PATH%\group
 echo export first
-call bldmake bldfiles
-call abld cleanexport
-call abld export
+REM call bldmake bldfiles
+REM call abld cleanexport
+call sbs -c armv5 CLEANEXPORT
+call sbs -c winscw CLEANEXPORT
+REM call abld export
+call sbs -c armv5 EXPORT
+call sbs -c winscw EXPORT
 goto importer
 
 
--- a/sysstatemgmt/ssmcmdlists/data/noncriticalcmdlist_ext.rss	Wed Apr 14 17:17:45 2010 +0300
+++ b/sysstatemgmt/ssmcmdlists/data/noncriticalcmdlist_ext.rss	Tue Apr 27 17:57:16 2010 +0300
@@ -126,7 +126,7 @@
         // prio 0x7EF9
         r_cmd_activitymonitor4,
         // prio 0x7EF8
-        r_cmd_clockapp,
+        r_cmd_clock,	//ESLT-842J9W
         // prio 0x7EF7
         r_cmd_activitymonitor5,
         // prio 0x7EF6
@@ -402,13 +402,13 @@
     }
 
 // ---------------------------------------------------------------------------
-// r_cmd_clockapp
+// r_cmd_clock
 // ---------------------------------------------------------------------------
 //
-RESOURCE SSM_START_APP_INFO r_cmd_clockapp
+RESOURCE SSM_START_APP_INFO r_cmd_clock
     {
     priority = 0x7EF8;
-    name = "z:\\sys\\bin\\clockapp.exe";
+    name = "clock.exe";
     execution_behaviour = ESsmWaitForSignal;
     timeout = 10000;
     background = 1; // To background
--- a/sysstatemgmt/ssmcustcmds/ssmsystemcmds/src/ssminitpskeys.cpp	Wed Apr 14 17:17:45 2010 +0300
+++ b/sysstatemgmt/ssmcustcmds/ssmsystemcmds/src/ssminitpskeys.cpp	Tue Apr 27 17:57:16 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
@@ -274,6 +274,15 @@
              KWriteDeviceDataPolicy );
     SetL( KPSStarterUid, KRTCPropertyKey, 0 );
     
+    INFO( "KPSUidStartup::KIgnoreSecurityEvent" );
+    DefineL( KPSUidStartup,
+             KIgnoreSecurityEvent,
+             KReadDeviceDataPolicy,
+             KWriteDeviceDataPolicy );
+    SetL( KPSUidStartup,
+          KIgnoreSecurityEvent,
+          EPSIgnoreSecurityEventUninitialized );
+    
 // Store FirstBoot Value from cenrep
 TInt csVal( 0 );
 TInt psVal( 0 );
--- a/sysstatemgmt/systemstatereferenceplugins/clayer/inc/startupdomainpskeys.h	Wed Apr 14 17:17:45 2010 +0300
+++ b/sysstatemgmt/systemstatereferenceplugins/clayer/inc/startupdomainpskeys.h	Tue Apr 27 17:57:16 2010 +0300
@@ -34,6 +34,21 @@
 
 static const TUid KPSUidStartup = { 0x101F8766 };
 
+
+// =============================================================================
+// SIM Utils API
+// =============================================================================
+
+// Use TUid KPSUidStartup = { 0x101F8766 };
+
+/**
+* Note: Refer simutils.h for actual definitions.
+*/
+//const TUint32 KPSSimStatus = 0x00000031;
+//const TUint32 KPSSimOwned = 0x00000032;
+//const TUint32 KPSSimChanged = 0x00000033;
+
+
 // =============================================================================
 // System State API
 // =============================================================================
@@ -259,6 +274,22 @@
     };
 
 // =============================================================================
+// Security Event SUP
+// =============================================================================
+/**
+* To be used by security event SUP to decide whether an event to be ignored or not
+*/
+
+// Use TUid KPSUidStartup = { 0x101F8766 };
+const TUint32 KIgnoreSecurityEvent = 0x00000302;
+enum TPSIgnoreSecurityEvent
+    {
+    EPSIgnoreSecurityEventUninitialized = KStartupEnumerationFirstValue,
+    EPSIgnoreSecurityEventEPin1Required,
+    EPSIgnoreSecurityEventEPhonePasswordRequired
+    };
+
+// =============================================================================
 // Wakeup Alarm API
 // =============================================================================
 
--- a/sysstatemgmt/systemstatereferenceplugins/clayer/src/ssmsecurityeventobserver.cpp	Wed Apr 14 17:17:45 2010 +0300
+++ b/sysstatemgmt/systemstatereferenceplugins/clayer/src/ssmsecurityeventobserver.cpp	Tue Apr 27 17:57:16 2010 +0300
@@ -15,7 +15,7 @@
 //
 
 
-
+#include <ssm/startupdomainpskeys.h>
 #include "strtsecphaseobserver.h"
 #include "ssmsecurityeventobserver.h"
 #include "ssmsecuritynotecontroller.h"
@@ -126,8 +126,24 @@
     switch (iEvent)
         {
         case RMobilePhone::EPin1Required:
-            SimCodeRequest(ESecCodePIN1);
+            {
+            TInt pSIgnorePin1RequiredEvent( EPSIgnoreSecurityEventUninitialized );
+
+            //Get the KIgnoreSecurityEvent PS value
+            TInt err = RProperty::Get( KPSUidStartup, KIgnoreSecurityEvent, pSIgnorePin1RequiredEvent );
+			DEBUGPRINT2A("Getting KIgnoreSecurityEvent completed with %d ", err);
+            //Ignore the event only when KIgnoreSecurityEvent value is EPSIgnoreSecurityEventEPin1Required 
+            if( KErrNone == err && EPSIgnoreSecurityEventEPin1Required == pSIgnorePin1RequiredEvent )
+                {
+                err = RProperty::Set( KPSUidStartup, KIgnoreSecurityEvent, EPSIgnoreSecurityEventUninitialized );
+                DEBUGPRINT2A("Setting KIgnoreSecurityEvent completed with %d ", err);
+				}
+            else
+                {
+                SimCodeRequest(ESecCodePIN1);
+                }
             break;
+            }
         case RMobilePhone::EPuk1Required:
             SimCodeRequest(ESecCodePUK1);
             break;
@@ -138,8 +154,24 @@
             SimCodeRequest(ESecCodePUK2);
             break;
         case RMobilePhone::EPhonePasswordRequired:
-            SecCodeRequest(ESecCodePasswd);
+            {
+            TInt pSIgnorePhonePasswordRequiredEvent( EPSIgnoreSecurityEventUninitialized );
+
+            //Get the KCancelSecurityNotifier PS value
+            TInt err = RProperty::Get( KPSUidStartup, KIgnoreSecurityEvent, pSIgnorePhonePasswordRequiredEvent );
+			DEBUGPRINT2A("Getting KIgnoreSecurityEvent completed with %d ", err);
+            //Ignore the event only when KIgnoreSecurityEvent value is EPSIgnoreSecurityEventEPhonePasswordRequired 
+            if( KErrNone == err && EPSIgnoreSecurityEventEPhonePasswordRequired == pSIgnorePhonePasswordRequiredEvent )
+                {
+                err = RProperty::Set( KPSUidStartup, KIgnoreSecurityEvent, EPSIgnoreSecurityEventUninitialized );
+				DEBUGPRINT2A("Setting KIgnoreSecurityEvent completed with %d ", err);
+				}
+            else
+                {
+                SecCodeRequest(ESecCodePasswd);
+                }
             break;
+            }
         case RMobilePhone::EPin1Verified:
             CodeVerifyIndication(ESecCodePIN1);
             break;
--- a/sysstatemgmt/systemstatereferenceplugins/custcmd/src/ssmsecuritychecknotifier.cpp	Wed Apr 14 17:17:45 2010 +0300
+++ b/sysstatemgmt/systemstatereferenceplugins/custcmd/src/ssmsecuritychecknotifier.cpp	Tue Apr 27 17:57:16 2010 +0300
@@ -26,10 +26,12 @@
 #include "ssmsecuritychecknotifier.h"
 #include "ssmdebug.h"
 #include "ssmuiproviderdll.h"
+#include "ssmrefcustomcmdcommon.h"
 #include <ssm/ssmstateawaresession.h>
 #include <e32def.h>
 #include <startupdomaindefs.h>
-#include <etelmm.h> 
+#include <etelmm.h>
+#include <ctsydomainpskeys.h>
 
 static TBool NoteTypeToEvent(
     TInt& aEventCode, const TStrtSecurityNoteType aNoteType )
@@ -199,21 +201,27 @@
 	//Get the current state of the system
 	TSsmState currentState = ssmStateAwareSession.State();
 
+	//Close the state aware session
+	ssmStateAwareSession.Close();
+
 	TBool isDlgCancellable;
 
 	//Is system in start up state
 	if ( currentState.MainState() == ESsmStartup )
 		{
+		TInt securityPhaseVal = EStarterSecurityPhaseUninitialized;
+		TInt errorCode = RProperty::Get(CSsmUiSpecific::StarterPSUid(), KStarterSecurityPhase, securityPhaseVal);
+		DEBUGPRINT3A("Getting the KStarterSecurityPhase completed with errorcode %d and its value is %d", errorCode, securityPhaseVal);
+		User::LeaveIfError(errorCode);
+
 		//TSsmStartupSubStateExt::ESsmStateNonCritical
-		iAfterStartup = ( 0x34 == currentState.SubState() ) ? ETrue : EFalse;
+		iAfterStartup = ( 0x34 == currentState.SubState() && securityPhaseVal > EStarterSecurityPhaseSimNok ) ? ETrue : EFalse;
 		}
 	else
 		{
 		iAfterStartup = ETrue;
 		}
-	
-	//Close the state aware session
-	ssmStateAwareSession.Close();
+	DEBUGPRINT2A("iAfterStartup is %d", iAfterStartup);
 
 	//Notifier dialogue is not cancellable if system is in startup state and
 	//requested for PUK1 or PUK2 or UPUK code
@@ -242,10 +250,26 @@
         }
     else if (iCmdState == EEmergencyCallIsActive && iStatus.Int() != KErrCancel)
         {
-        // Emergency call activated from the security note dialog has
-        // finished. Show the note again.
-        DEBUGPRINT1A("ECall Ended and restarting pin notifier");
-        StartNotifier();
+        TInt value = -1; 
+		const TInt errorcode = iSsmEmergencyCallProperty.Get( value );
+		DEBUGPRINT3A("iSsmEmergencyCallProperty.Get() has returned value %d and errorcode %d", value , errorcode);
+		if (KErrNone == errorcode)
+			{
+			// Compare the property value with EPSCTsyCallStateNone. This indicates the call has finished.
+			if (EPSCTsyCallStateNone == value)
+				{
+				// Emergency call activated from the security note dialog has
+				// finished. Show the note again.
+				DEBUGPRINT1A("ECall Ended and restarting pin notifier");
+				StartNotifier();
+				}
+			else
+				{
+				//Subscribe to the property again if the property key value is not yet set to EPSCTsyCallStateNone.
+				iSsmEmergencyCallProperty.Subscribe(iStatus);
+				SetActive();
+				}
+			}
         }
     else
         {