Revision: 201007 RCL_3
authorDremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Fri, 12 Mar 2010 15:43:21 +0200
branchRCL_3
changeset 12 7645e9ce10dc
parent 4 0fdb7f6b0309
child 13 096dad6e50a9
Revision: 201007 Kit: 201008
appfw/apparchitecture/apfile/apfmimecontentpolicy.cpp
appfw/apparchitecture/aplist/aplapplistitem.cpp
appfw/apparchitecture/aplist/aplappregfinder.cpp
appfw/apparchitecture/conf/apparchitecture_closedcontentextinfo.confml
appfw/apparchitecture/conf/apparchitecture_closedcontentextinfo_10003a3f.crml
appfw/apparchitecture/group/APFILE.MMP
appfw/apparchitecture/group/BLD.INF
appfw/apparchitecture/group/apparc.iby
appfw/apparchitecture/group/apparcTest.iby
appfw/apparchitecture/tdata/10003a3f.txt
appfw/apparchitecture/tef/scripts/apparctest_t_mimecontentpolicy.script
appfw/apparchitecture/tef/t_mimecontentpolicystep.cpp
appfw/apparchitecture/tef/t_mimecontentpolicystep.h
commonappservices/alarmserver/ConsoleAlarmAlertServer/Source/ConsoleAlarmAlertSession.cpp
commonappservices/alarmserver/Test/group/consolealarmalertserver.mmp
coreapplicationuis/ATCmdPlugin/data/2001A273.rss
coreapplicationuis/SysAp/Inc/SysApAppUi.h
coreapplicationuis/SysAp/Inc/SysApFeatureManager.h
coreapplicationuis/SysAp/Src/SysApAppUi.cpp
coreapplicationuis/SysAp/Src/SysApFeatureManager.cpp
coreapplicationuis/SysAp/Src/sysapdefaultkeyhandler.cpp
coreapplicationuis/advancedtspcontroller/data/keyevent.rul
coreapplicationuis/advancedtspcontroller/tsrc/mt_atspc/group/envrecall.cmd
coreapplicationuis/advancedtspcontroller/tsrc/mt_atspc/group/envsetup.cmd
coreapplicationuis/advancedtspcontroller/tsrc/mt_atspc/group/mt_atspc.mmp
coreapplicationuis/advancedtspcontroller/tsrc/mt_atspc/inc/mt_atspc.h
coreapplicationuis/powersaveutilities/batterypopupcontrol/src/batterypopupcontrol.cpp
coreapplicationuis/tsrc/public/basic/MT_PhoneCmdhandler/MT_CPhoneHandler.mmp
coreapplicationuis/tsrc/public/basic/MT_kefmapper/MT_kefmapper.mmp
coreapplicationuis/tsrc/public/basic/group/MT_Rfs.mmp
layers.sysdef.xml
mediakeys/MMKeyBearer/src/MMKeyBearerImplementation.cpp
sysresmonitoring/oodmonitor/oodmonitor2/src/outofdiskglobalnote.cpp
sysresmonitoring/oommonitor/group/oommonitor.mmp
sysresmonitoring/oommonitor/group/oommonitorlib.mmp
sysresmonitoring/oommonitor/src/oomIdletimerule.cpp
sysresmonitoring/oommonitor/src/oomaction.cpp
sysresmonitoring/oommonitor/src/oomactionconfig.cpp
sysresmonitoring/oommonitor/src/oomappclosetimer.cpp
sysresmonitoring/oommonitor/src/oomappclosewatcher.cpp
sysresmonitoring/oommonitor/src/oomapplicationconfig.cpp
sysresmonitoring/oommonitor/src/oomclientrequestqueue.cpp
sysresmonitoring/oommonitor/src/oomcloseappconfig.cpp
sysresmonitoring/oommonitor/src/oomconfig.cpp
sysresmonitoring/oommonitor/src/oomconfigparser.cpp
sysresmonitoring/oommonitor/src/oomforegroundrule.cpp
sysresmonitoring/oommonitor/src/oomglobalconfig.cpp
sysresmonitoring/oommonitor/src/oommemorymonitorserver.cpp
sysresmonitoring/oommonitor/src/oommemorymonitorsession.cpp
sysresmonitoring/oommonitor/src/oommonitor.cpp
sysresmonitoring/oommonitor/src/oommonitorplugin.cpp
sysresmonitoring/oommonitor/src/oommonitorsession.cpp
sysresmonitoring/oommonitor/src/oomoutofmemorywatcher.cpp
sysresmonitoring/oommonitor/src/oompluginwaiter.cpp
sysresmonitoring/oommonitor/src/oomrunpluginconfig.cpp
sysresmonitoring/oommonitor/src/oomsubscribehelper.cpp
sysresmonitoring/oommonitor/src/oomwserveventreceiver.cpp
sysresmonitoring/oommonitor/tsrc/oomtest/t_oomallocserver/group/t_oomallocclient.mmp
sysresmonitoring/oommonitor/tsrc/oomtest/t_oomdummyapp/group/bld.inf
systemsettings/GSAccessoryPlugin/data/gsaccessoryplugin.rss
--- a/appfw/apparchitecture/apfile/apfmimecontentpolicy.cpp	Fri Feb 19 22:58:54 2010 +0200
+++ b/appfw/apparchitecture/apfile/apfmimecontentpolicy.cpp	Fri Mar 12 15:43:21 2010 +0200
@@ -1,4 +1,4 @@
-// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2002-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"
@@ -18,18 +18,53 @@
 // INCLUDE FILES
 #include <apfmimecontentpolicy.h>
 #include <f32file.h> // RFs
-#include <barsread.h>
-#include <barsc.h> 
-#include <apfmimecontentpolicy.rsg>
 #include <caf/content.h>
 #include <e32base.h>
 #include <apgcli.h>    // For RApaLsSession 
+#include <centralrepository.h>
+#include <apmstd.h>
 
-// Resource file name.
-_LIT(KCEResourceFile, "z:\\resource\\apps\\apfmimecontentpolicy.rsc"); 
 
-// This is needed for resource reading.
-const TInt KCCMask(0x00000fff);
+/* Closed content and extension information is stored in central repository with UID 0x10003A3F.
+ * Keys of the Closed Content and Extension information repository is divided into two parts.
+ * Most significant byte is used for identifying the type,i.e. whether it is Mimetype or extension, 
+ * and the least significant 3 bytes are used for uniquely identifying the entry within that type. 
+ * 
+ * |-------------------- Key (32-bits) ---------------------|
+ *  --------------------------------------------------------
+ * | type (8-bits)  |            sequence number(24-bits)   |
+ *  --------------------------------------------------------
+ * 
+ *  The type part is used for differentiating Content type and extension keys.
+ *  The value can be 
+ *     0x0 - For content type key
+ *     0x1 - For extension key
+ *     
+ * Sequence number part is used to uniquely identifying the entry within that type. 
+ *  
+ *  Examples: 
+ *  
+ *  0x00000000 - Content type key with sequence number 0x0
+ *  0x00000001 - Content type key with sequence number 0x1
+ *  0x01000000 - Extension type key with sequence number 0x0
+ *  0x01000001 - Extension type key with sequence number 0x1
+ *  0x01000002 - Extension type key with sequence number 0x2
+ */
+
+
+
+//Partial key for finding MIME type keys in the repository
+const TUint32 KClosedContentTypePartialKey=0x0;
+
+//Partial key for finding extension type keys in the repository
+const TUint32 KClosedExtensionTypePartialKey=0x01000000;
+
+//Mask for finding the type (MIME or extension)of a key
+const TUint32 KClosedTypeKeyMask=0xFF000000;
+
+
+//Closed content and extension information repository UID
+const TUid KClosedContentAndExtensionInfoRepositoryUID={0x10003A3F};
 
 
 NONSHARABLE_CLASS(CApfMimeContentPolicyImpl) : public CBase
@@ -52,8 +87,9 @@
 	void ConstructL();
     void ConstructL(RFs& aFs);
 	TBool IsClosedFileL(RFile& aFileHandle, const TDesC& aFileName) const;
-	void ReadResourcesL(RFs& aFs);
-
+	void ReadResourcesL();
+	TBool IsValidExtension(TDesC& extension);	
+    TBool IsValidMimeType(TDesC& extension);
 private:
 	CDesCArrayFlat* iCcl;	// Closed content list.
 	CDesCArrayFlat* iExtList;	// Closed extensions list.
@@ -249,7 +285,7 @@
 	iFsConnected = ETrue;
 	
 	User::LeaveIfError(iFs.ShareProtected());
-	ReadResourcesL(iFs);
+	ReadResourcesL();
 	}
 	
 /**
@@ -260,7 +296,7 @@
 	{
 	iFsConnected = EFalse;
 	iFs = aFs;	
-	ReadResourcesL(iFs);
+	ReadResourcesL();
 	}
 
 /**
@@ -490,31 +526,56 @@
 Called by constructor.
 @param aFs A handle to a shared file server session. 
 */
-void CApfMimeContentPolicyImpl::ReadResourcesL(RFs& aFs)
+void CApfMimeContentPolicyImpl::ReadResourcesL()
 	{
-	TResourceReader reader;	
+    ASSERT(!iCcl);
+    ASSERT(!iExtList);
+    
+	CRepository *cenrep=CRepository::NewL(KClosedContentAndExtensionInfoRepositoryUID);	
+	CleanupStack::PushL(cenrep);
+	
+	RArray<TUint32> keyArray;
+	CleanupClosePushL(keyArray);
+	
+    TBuf<KMaxDataTypeLength> keyData;
+    //Find the extenstion type keys in the repository 
+	cenrep->FindL(KClosedExtensionTypePartialKey, KClosedTypeKeyMask, keyArray);
+	int keyCount=keyArray.Count();
 
-	// Resource reading is done without coe & eikon env.
-	RResourceFile rsFile;
-	rsFile.OpenL(aFs, KCEResourceFile);
-	CleanupClosePushL(rsFile);
+	iExtList=new (ELeave) CDesCArrayFlat(keyCount);
 
-	// Read closed content list.
-	// Remove offset from id
-    HBufC8* rBuffer = rsFile.AllocReadLC(R_COMMONENG_CLOSED_CONTENT_LIST & KCCMask);
-	reader.SetBuffer(rBuffer);
-	ASSERT(!iCcl);
-	iCcl = reader.ReadDesCArrayL();
-	CleanupStack::PopAndDestroy(rBuffer); // rBuffer
-
-	// Read closed extensions list.
-	// Remove offset from id
-    rBuffer = rsFile.AllocReadLC(R_COMMONENG_CLOSED_EXTENSIONS_LIST & KCCMask); 
-	reader.SetBuffer(rBuffer);
-	ASSERT(!iExtList);
-	iExtList = reader.ReadDesCArrayL();
-	CleanupStack::PopAndDestroy(2); // rBuffer, rsFile 
-	    
+	TInt valid;
+	TInt index;
+	//Get each extension type key value and store in iExtList array
+	for(index=0; index<keyCount; index++)
+	    {
+	    cenrep->Get(keyArray[index], keyData);
+        //Check validity of the extension. If its invalid it will not be added to list.	    
+	    valid=IsValidExtension(keyData);
+	    if(valid)
+	        iExtList->AppendL(keyData);
+	    }
+	
+	keyArray.Reset();
+	
+    //Find the content type keys in the repository 	
+    cenrep->FindL(KClosedContentTypePartialKey, KClosedTypeKeyMask, keyArray);
+    keyCount=keyArray.Count();
+    
+    iCcl=new (ELeave) CDesCArrayFlat(keyCount);
+    
+    //Get each content type key value and store in iCcl array
+    for(index=0; index<keyCount; index++)
+        {
+        cenrep->Get(keyArray[index], keyData);  
+        //Check validity of the mime type. If its invalid it will not be added to list.
+        valid=IsValidMimeType(keyData);
+        if(valid)        
+            iCcl->AppendL(keyData);
+        }
+    
+    CleanupStack::PopAndDestroy(2, cenrep);
+	
     // Sort lists to enable binary find
     iCcl->Sort();
     iExtList->Sort();
@@ -524,3 +585,55 @@
 	User::LeaveIfError(iLs.Connect());
 	}
 
+
+//Checks the given extension is valid or invalid. The extension should start with a ".".
+TBool CApfMimeContentPolicyImpl::IsValidExtension(TDesC& extension)
+    {
+     TChar dot='.';
+     //Check whether extension should start with "."
+     return(extension.Locate(dot)==0);
+    }
+
+//Checks the given mime type is valid or not.
+//The mime type will be in the following format type/subtype. Ex: "application/vnd.oma.drm.message"
+//Mime type should posses the following properties. Otherewise those are considered as invalid.
+//1. Only one front slash should exist. That should be followed by the type field.
+//2. There should not be any backslashes.
+
+TBool CApfMimeContentPolicyImpl::IsValidMimeType(TDesC& mimeType)
+    {
+    TChar backslash='\\';            
+    TChar forwardslash='/';
+    
+    //Check any backslash is used
+    TBool found=mimeType.Locate(backslash);
+    if(found!=KErrNotFound)
+        return(EFalse);
+
+    //Locate forward slash position
+    found=mimeType.Locate(forwardslash);
+    
+    //There should be at least one forward slash
+    if(found==KErrNotFound)
+        {
+        return EFalse;
+        }
+    else
+        {
+        //Forward slash position should not at first or last position of the mime type
+        if(found==0||(found==mimeType.Length()-1))
+            return EFalse;
+        
+        //There should not be more than one forward slash
+        found=mimeType.Mid(found+1).Locate(forwardslash);
+        if(found!=KErrNotFound)
+            {
+            return(EFalse);       
+            }
+        else
+            {
+            //MIME format is valid
+            return(ETrue);
+            }
+        }
+    }
--- a/appfw/apparchitecture/aplist/aplapplistitem.cpp	Fri Feb 19 22:58:54 2010 +0200
+++ b/appfw/apparchitecture/aplist/aplapplistitem.cpp	Fri Mar 12 15:43:21 2010 +0200
@@ -1,4 +1,4 @@
-// Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2006-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"
@@ -1206,9 +1206,6 @@
 	aWriteStream.WriteUint32L(I64HIGH(iTimeStamp.Int64()));
 	aWriteStream.WriteUint32L(I64LOW(iTimeStamp.Int64()));
 
-	aWriteStream.WriteUint32L(I64HIGH(iIconFileTimeStamp.Int64()));
-	aWriteStream.WriteUint32L(I64LOW(iIconFileTimeStamp.Int64()));
-	aWriteStream << *iCaption;	// Caption
 	if (iIconFileNameFromResourceFile)
 		{
 		aWriteStream.WriteUint32L(I64HIGH(iIconFileTimeStampFromResourceFile.Int64()));
--- a/appfw/apparchitecture/aplist/aplappregfinder.cpp	Fri Feb 19 22:58:54 2010 +0200
+++ b/appfw/apparchitecture/aplist/aplappregfinder.cpp	Fri Mar 12 15:43:21 2010 +0200
@@ -1,4 +1,4 @@
-// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2004-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"
@@ -186,9 +186,14 @@
 			TParse regFileNameParser;
 			const TDriveName driveName = currentDrive.iUnit.Name();
 			regFileNameParser.Set(entry.iName, &appFolderOnDrive, &driveName);
-
-			// If the appliation is located on a removable drive...
-			if (currentDrive.iAttribs&KDriveAttRemovable)
+			
+			// Apparc will call sidchecker to verify if an application is a valid registered application. 
+			// Apparc will call sidchecker in the following conditions
+			// 1. If the current drive is a removable drive
+			// 2. If the current drive is not 
+			//		a) an internal read-only drive
+			// 		b) the system drive
+			if(currentDrive.iAttribs&KDriveAttRemovable || ((currentDrive.iUnit != iFs.GetSystemDrive()) && (currentDrive.iAttribs&KDriveAttInternal) && !(currentDrive.iAttribs&KDriveAttRom)))
 				{
 				// ...then verify that there is a valid Secure ID (SID) for the appliation
 				// to protect against untrusted applications.
Binary file appfw/apparchitecture/conf/apparchitecture_closedcontentextinfo.confml has changed
Binary file appfw/apparchitecture/conf/apparchitecture_closedcontentextinfo_10003a3f.crml has changed
--- a/appfw/apparchitecture/group/APFILE.MMP	Fri Feb 19 22:58:54 2010 +0200
+++ b/appfw/apparchitecture/group/APFILE.MMP	Fri Mar 12 15:43:21 2010 +0200
@@ -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"
@@ -43,12 +43,8 @@
 
 library         euser.lib efsrv.lib apparc.lib apgrfx.lib bafl.lib apserv.lib ecom.lib 
 library			apmime.lib caf.lib
-
+library			centralrepository.lib
 
-START RESOURCE ../apfile/apfmimecontentpolicy.rss
-HEADER  
-TARGETPATH   /resource/apps
-END
 
 START WINS
 	baseaddress	0x43000000
--- a/appfw/apparchitecture/group/BLD.INF	Fri Feb 19 22:58:54 2010 +0200
+++ b/appfw/apparchitecture/group/BLD.INF	Fri Mar 12 15:43:21 2010 +0200
@@ -1,4 +1,4 @@
-// Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 1999-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"
@@ -100,6 +100,8 @@
 // ConfML files
 ../conf/apparchitecture.confml          		MW_LAYER_EXPORTS_CONFML(apparchitecture.confml)
 ../conf/apparchitecture_1028583d.crml   		MW_LAYER_EXPORTS_CRML(apparchitecture_1028583d.crml)
+../conf/apparchitecture_closedcontentextinfo.confml          		MW_LAYER_EXPORTS_CONFML(apparchitecture_closedcontentextinfo.confml)
+../conf/apparchitecture_closedcontentextinfo_10003a3f.crml   		MW_LAYER_EXPORTS_CRML(apparchitecture_closedcontentextinfo_10003a3f.crml)
 
 PRJ_MMPFILES
 
@@ -346,6 +348,7 @@
 ../tdata/mimecontentpolicy/propelli.jpg	 		/epoc32/data/z/system/data/propelli.jpg
 ../tdata/mimecontentpolicy/type-r.jpg			/epoc32/data/z/system/data/type-r.jpg
 ../tdata/1028583d.txt 							/epoc32/data/z/private/10202be9/1028583d.txt //test Central Repository initialisation file
+../tdata/10003a3f.txt 							/epoc32/data/z/private/10202be9/10003a3f.txt //Test repository file contains closed content and extension information
 
 // WINSCW UDEB
 ../tef/tstappviewneg.xyz									/epoc32/release/winscw/udeb/z/resource/apps/tstappviewneg.xyz
@@ -385,6 +388,7 @@
 ../tdata/mimecontentpolicy/propelli.jpg	 		/epoc32/release/winscw/udeb/z/system/data/propelli.jpg
 ../tdata/mimecontentpolicy/type-r.jpg			/epoc32/release/winscw/udeb/z/system/data/type-r.jpg
 ../tdata/1028583d.txt 							/epoc32/release/winscw/udeb/z/private/10202be9/1028583d.txt //test Central Repository initialisation file
+../tdata/10003a3f.txt 							/epoc32/release/winscw/udeb/z/private/10202be9/10003a3f.txt //Test repository file contains closed content and extension information
 ../tdata/testupdregappuninstallation_reg.rsc			/epoc32/release/winscw/udeb/z/system/data/testupdregappuninstallation_reg.rsc
 ../tdata/testupgradeupdregappuninstallation_reg.rsc			/epoc32/release/winscw/udeb/z/system/data/testupgradeupdregappuninstallation_reg.rsc
 
@@ -422,6 +426,7 @@
 ../tdata/mimecontentpolicy/propelli.jpg	 		/epoc32/release/winscw/urel/z/system/data/propelli.jpg
 ../tdata/mimecontentpolicy/type-r.jpg			/epoc32/release/winscw/urel/z/system/data/type-r.jpg
 ../tdata/1028583d.txt 							/epoc32/release/winscw/urel/z/private/10202be9/1028583d.txt //test Central Repository initialisation file
+../tdata/10003a3f.txt 							/epoc32/release/winscw/urel/z/private/10202be9/10003a3f.txt //Test repository file contains closed content and extension information
 ../tdata/testupdregappuninstallation_reg.rsc			/epoc32/release/winscw/urel/z/system/data/testupdregappuninstallation_reg.rsc
 ../tdata/testupgradeupdregappuninstallation_reg.rsc			/epoc32/release/winscw/urel/z/system/data/testupgradeupdregappuninstallation_reg.rsc
 
--- a/appfw/apparchitecture/group/apparc.iby	Fri Feb 19 22:58:54 2010 +0200
+++ b/appfw/apparchitecture/group/apparc.iby	Fri Mar 12 15:43:21 2010 +0200
@@ -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"
@@ -27,7 +27,6 @@
 file=ABI_DIR\BUILD_DIR\apsexe.exe			System\Programs\apsexe.exe
 file=ABI_DIR\BUILD_DIR\ServiceRegistry.dll	System\Libs\ServiceRegistry.dll
 
-data=MULTI_LINGUIFY(RSC ZRESOURCE\APPS\ApfMimeContentPolicy	Resource\Apps\ApfMimeContentPolicy)
 
 
 #ifndef SYMBIAN_SYSTEM_STATE_MANAGEMENT
--- a/appfw/apparchitecture/group/apparcTest.iby	Fri Feb 19 22:58:54 2010 +0200
+++ b/appfw/apparchitecture/group/apparcTest.iby	Fri Mar 12 15:43:21 2010 +0200
@@ -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"
@@ -135,6 +135,7 @@
 data=EPOCROOTepoc32\data\Z\private\10003a3f\apps\TCtrlPnlApp_reg.RSC						private\10003a3f\apps\TCtrlPnlApp_reg.RSC
 
 data=EPOCROOTepoc32\data\Z\private\10202be9\1028583d.txt				         private\10202be9\1028583d.txt
+data=EPOCROOTepoc32\data\Z\private\10202be9\10003a3f.txt				         private\10202be9\10003a3f.txt
 
 
 // Change for Control panel Start
Binary file appfw/apparchitecture/tdata/10003a3f.txt has changed
--- a/appfw/apparchitecture/tef/scripts/apparctest_t_mimecontentpolicy.script	Fri Feb 19 22:58:54 2010 +0200
+++ b/appfw/apparchitecture/tef/scripts/apparctest_t_mimecontentpolicy.script	Fri Mar 12 15:43:21 2010 +0200
@@ -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"
@@ -19,7 +19,7 @@
 //! @SYMTestCaseDesc 		Tests IsClosedType() method for different mime types
 //! @SYMTestPriority 		High
 //! @SYMTestStatus 		3. Released
-//! @SYMTestActions 		Closed types are the mime types which are listed in the ApfMimeContentPolicy.rss file.
+//! @SYMTestActions 		Closed types are the mime types which are listed in the 10003a3f repository.
 //!				Calls CApfMimeContentPolicy::IsClosedType(const TDesC& aMimeType); for different closed and non-closed mime types.
 //! @SYMTestExpectedResults 	The test checks whether IsClosedType returns ETrue for the Closed Mime types and EFalse for non-closed Mime types
 
--- a/appfw/apparchitecture/tef/t_mimecontentpolicystep.cpp	Fri Feb 19 22:58:54 2010 +0200
+++ b/appfw/apparchitecture/tef/t_mimecontentpolicystep.cpp	Fri Mar 12 15:43:21 2010 +0200
@@ -1,4 +1,4 @@
-// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2007-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"
@@ -20,6 +20,11 @@
 */
 
 #include "t_mimecontentpolicystep.h"
+#include <centralrepository.h>
+#include <apmstd.h>
+
+//Closed content and extension information repository UID
+const TUid KClosedContentAndExtensionInfoRepositoryUID={0x10003A3F};
 
 _LIT(KPathjpg1, "z:\\system\\data\\type-r.jpg");
 _LIT(KPathjpg2, "z:\\system\\data\\propelli.jpg");
@@ -76,6 +81,7 @@
 	HEAP_TEST_LS_SESSION(iApaLsSession, 0, 0, CCPTestIsDRMEnvelopeFileHandleL(), NO_CLEANUP);
 	HEAP_TEST_LS_SESSION(iApaLsSession, 0, 0, CCPTestIsClosedFileFileHandleL(), iApaLsSession.FlushRecognitionCache());
 	HEAP_TEST_LS_SESSION(iApaLsSession, 0, 0, CCPOOMTestL(), iApaLsSession.FlushRecognitionCache());
+	HEAP_TEST_LS_SESSION(iApaLsSession, 0, 0, CCPTestIsClosedContentAndExtenstionInfoRepositoryReadOnlyL(), NO_CLEANUP);
 	}
 
 /**
@@ -89,8 +95,9 @@
  
    @SYMTestStatus Implemented
   
-   @SYMTestActions Closed types are the mime types which are listed in the ApfMimeContentPolicy.rss file.
+   @SYMTestActions Closed types are the mime types which are listed in the 10003a3f repository file.
    Calls CApfMimeContentPolicy::IsClosedType(const TDesC& aMimeType); for different closed and non-closed mime types.
+   And also it tests whether invalid mime types are not added to the list.
   
    @SYMTestExpectedResults The test checks whether IsClosedType returns ETrue for the Closed Mime types and EFalse for non-closed Mime types
  */
@@ -120,7 +127,17 @@
 	_LIT(KMimeType20, "video/mpeg");
 	_LIT(KMimeType21, "video/quicktime");
 	_LIT(KMimeType22, "video/mpeg4-generic");
-								    
+		
+    //Invalid mime types
+    _LIT(KMimeType23, "/test");
+    _LIT(KMimeType24, "test");
+    _LIT(KMimeType25, "test/");
+    _LIT(KMimeType26, "/test/");
+    _LIT(KMimeType27, "test/testmime/");
+    _LIT(KMimeType28, "/test/testmime");
+    _LIT(KMimeType29, "test\\testmime");      
+
+    
   
 	INFO_PRINTF1(_L("Tests the MIME types found on closed content list"));
     
@@ -192,6 +209,27 @@
   	
   	TEST(!iCcp->IsClosedType(KMimeType22));
   	INFO_PRINTF2(_L("%S is not Closed Type"), &KMimeType22);
+  	
+    TEST(!iCcp->IsClosedType(KMimeType23));
+    INFO_PRINTF2(_L("%S is not Closed Type"), &KMimeType23);
+   
+    TEST(!iCcp->IsClosedType(KMimeType24));
+    INFO_PRINTF2(_L("%S is not Closed Type"), &KMimeType24);
+  
+    TEST(!iCcp->IsClosedType(KMimeType25));
+    INFO_PRINTF2(_L("%S is not Closed Type"), &KMimeType25);
+
+    TEST(!iCcp->IsClosedType(KMimeType26));
+    INFO_PRINTF2(_L("%S is not Closed Type"), &KMimeType26);
+
+    TEST(!iCcp->IsClosedType(KMimeType27));
+    INFO_PRINTF2(_L("%S is not Closed Type"), &KMimeType27);
+    
+    TEST(!iCcp->IsClosedType(KMimeType28));
+    INFO_PRINTF2(_L("%S is not Closed Type"), &KMimeType28); 
+    
+    TEST(!iCcp->IsClosedType(KMimeType29));
+    INFO_PRINTF2(_L("%S is not Closed Type"), &KMimeType29);    
   	}
 
 /**
@@ -205,8 +243,9 @@
  
    @SYMTestStatus Implemented
   
-   @SYMTestActions Closed file extensions are the file extensions which are listed in the ApfMimeContentPolicy.rss file.
+   @SYMTestActions Closed file extensions are the file extensions which are listed in the 10003a3f repository.
    Calls CApfMimeContentPolicy::IsClosedExtension(const TDesC& aFileExtension); for different closed and non-closed File Extensions.
+   And also it tests whether invalid closed extensions are not added to the list.
   
    @SYMTestExpectedResults The test checks whether IsClosedExtension returns ETrue for the Closed File Extensions and EFalse for non-closed File Extensions.
  */
@@ -229,6 +268,9 @@
 	_LIT(KExtension14, ".sis7");
 	_LIT(KExtension15, ".0sis");
 	_LIT(KExtension16, ".gif");
+	
+	//Invalid extension
+    _LIT(KExtension17, "tst");	
 
     INFO_PRINTF1(_L("Tests the extensions found on closed content list"));
 	
@@ -282,6 +324,9 @@
 	
 	TEST(!iCcp->IsClosedExtension(KExtension16));
 	INFO_PRINTF2(_L("%S is not Closed Extension"), &KExtension16);
+	
+    TEST(!iCcp->IsClosedExtension(KExtension17));
+    INFO_PRINTF2(_L("%S is not Closed Extension"), &KExtension17);	
 	}
 
 /**
@@ -322,7 +367,7 @@
  
    @SYMTestStatus Implemented
   
-   @SYMTestActions Closed files are files whose file extensions are listed in the ApfMimeContentPolicy.rss file.
+   @SYMTestActions Closed files are files whose file extensions are listed in the 10003a3f repository.
    Calls CApfMimeContentPolicy::IsClosedFileL(const TDesC& aFileName); for different Closed and non-closed files.
    Calls CApfMimeContentPolicy::IsClosedFileL(const TDesC& aFileName); with file which is already open and checks whether \n
    call succeeds.
@@ -427,7 +472,7 @@
  
    @SYMTestStatus Implemented
   
-   @SYMTestActions Closed files are files whose file extensions are listed in the ApfMimeContentPolicy.rss file.
+   @SYMTestActions Closed files are files whose file extensions are listed in the 10003a3f repository.
    Calls CApfMimeContentPolicy::IsClosedFileL(RFile& aFileHandle); for different Closed and non-closed files.
      
    @SYMTestExpectedResults The test checks whether IsClosedFileL() returns EFalse for Files which are not closed and\n
@@ -509,3 +554,58 @@
 	INFO_PRINTF1(_L("OOM test Completed"));	
 	}
 
+
+/**
+   @SYMTestCaseID APPFWK-APPARC-0108
+
+   @SYMREQ REQ410-2692
+ 
+   @SYMTestCaseDesc Tests Closed content and extension information repository is not writable.
+  
+   @SYMTestPriority High 
+ 
+   @SYMTestStatus Implemented
+  
+   @SYMTestActions Calls create, get, set, reset, delete functions on the repository. Checks only read operations are allowed.
+     
+   @SYMTestExpectedResults Tests should complete without any failure.
+ */
+
+void CT_MimeContentPolicyStep::CCPTestIsClosedContentAndExtenstionInfoRepositoryReadOnlyL()
+    {
+    INFO_PRINTF1(_L("Testcase CCPTestIsClosedContentAndExtenstionInfoRepositoryReadOnly...."));   
+    CRepository *cenrep=CRepository::NewL(KClosedContentAndExtensionInfoRepositoryUID);  
+    CleanupStack::PushL(cenrep);
+    TInt newKeyValue=0x00010000;
+    //This key already exists in the default Closed content and extension information repository
+    TInt existingKey=0x1;
+    TBuf<KMaxDataTypeLength> keyData;
+    TInt err=KErrNone;
+    
+    INFO_PRINTF1(_L("Testing creation of key in the repository"));
+    err=cenrep->Create(newKeyValue, 0);
+    TEST(err==KErrPermissionDenied);
+    INFO_PRINTF2(_L("Error code while creating a key: %d"), err);
+    
+    INFO_PRINTF1(_L("Testing setting value of an existing key in the repository"));    
+    err=cenrep->Set(existingKey, 0);
+    TEST(err==KErrPermissionDenied);
+    INFO_PRINTF2(_L("Error code while setting a value of an existing key: %d"), err);
+    
+    INFO_PRINTF1(_L("Testing getting value of an existing key in the repository"));
+    err=cenrep->Get(existingKey, keyData);
+    TEST(err==KErrNone);
+    INFO_PRINTF2(_L("Error code while getting a value of an existing key: %d"), err);
+    
+    INFO_PRINTF1(_L("Testing resetting value of an existing key in the repository"));
+    err=cenrep->Reset(existingKey);
+    TEST(err==KErrPermissionDenied);
+    INFO_PRINTF2(_L("Error code while reseting a value of existing key: %d"), err);
+
+    INFO_PRINTF1(_L("Testing deleting an existing key in the repository"));
+    err=cenrep->Delete(existingKey);
+    TEST(err==KErrPermissionDenied);
+    INFO_PRINTF2(_L("Error code while deleting an existing key: %d"), err);
+    CleanupStack::PopAndDestroy(cenrep);
+    INFO_PRINTF1(_L("Testcase CCPTestIsClosedContentAndExtenstionInfoRepositoryReadOnly completed...."));    
+    }
--- a/appfw/apparchitecture/tef/t_mimecontentpolicystep.h	Fri Feb 19 22:58:54 2010 +0200
+++ b/appfw/apparchitecture/tef/t_mimecontentpolicystep.h	Fri Mar 12 15:43:21 2010 +0200
@@ -1,4 +1,4 @@
-// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2007-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"
@@ -46,6 +46,7 @@
     // aIsDRMEnvelope is ETrue for DRM Envelope and EFalse for ClosedFile
     TBool DoCCPTestUsingFileHandleL(const TDesC &aName, TBool aIsDRMEnvelope);
     void CCPOOMTestL();
+    void CCPTestIsClosedContentAndExtenstionInfoRepositoryReadOnlyL();
 
 private:
 	CApfMimeContentPolicy* iCcp;
--- a/commonappservices/alarmserver/ConsoleAlarmAlertServer/Source/ConsoleAlarmAlertSession.cpp	Fri Feb 19 22:58:54 2010 +0200
+++ b/commonappservices/alarmserver/ConsoleAlarmAlertServer/Source/ConsoleAlarmAlertSession.cpp	Fri Mar 12 15:43:21 2010 +0200
@@ -1,4 +1,4 @@
-// Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 1999-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"
@@ -16,7 +16,7 @@
 #include "ConsoleAlarmAlertSession.h"
 #include <e32svr.h>
 #include <asaltdefs.h>
-#include <test/consoleantestclient.h>
+#include "test/consoleantestclient.h"
 #include "ConsoleAlarmAlertSession.h"
 #include "ConsoleAlarmAlertConsole.h"
 #include "ConsoleAlarmAlertLEDFlasher.h"
--- a/commonappservices/alarmserver/Test/group/consolealarmalertserver.mmp	Fri Feb 19 22:58:54 2010 +0200
+++ b/commonappservices/alarmserver/Test/group/consolealarmalertserver.mmp	Fri Mar 12 15:43:21 2010 +0200
@@ -1,4 +1,4 @@
-// Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 1999-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"
@@ -30,7 +30,7 @@
 USERINCLUDE				../../ConsoleAlarmAlertServer/Include
 USERINCLUDE				../../AlarmAlert/Shared
 USERINCLUDE				../../Shared/Include
-USERINCLUDE				..
+USERINCLUDE				../..
 
 MW_LAYER_SYSTEMINCLUDE_SYMBIAN
 APP_LAYER_SYSTEMINCLUDE_SYMBIAN
--- a/coreapplicationuis/ATCmdPlugin/data/2001A273.rss	Fri Feb 19 22:58:54 2010 +0200
+++ b/coreapplicationuis/ATCmdPlugin/data/2001A273.rss	Fri Mar 12 15:43:21 2010 +0200
@@ -37,7 +37,7 @@
 					implementation_uid = KUidATCmdEcomImpl1;
 					version_no = 1;
 					display_name = " CKPD command Imp";
-					default_data = "PAT+CKPD|PAT+CTSA|PAT+CBKLT?|PAT+CBKLT";
+					default_data = "PAT+CKPD|PAT+CTSA|PAT+CBKLT";
 					opaque_data = "";
 					}
 				};
--- a/coreapplicationuis/SysAp/Inc/SysApAppUi.h	Fri Feb 19 22:58:54 2010 +0200
+++ b/coreapplicationuis/SysAp/Inc/SysApAppUi.h	Fri Mar 12 15:43:21 2010 +0200
@@ -1425,7 +1425,21 @@
         */
         CSysApCenRepLogsObserver& CSysApAppUi::LogsObserverL();
 
-    private: //Data members
+    /**
+     * Adds MMC removal item(s) to power menu.
+     * 
+     * @since S60 5.2
+     * 
+     * @param aProfileNameCDesCArray Array holding menu item labels
+     * @param aItemIdArray Item labels for cover ui
+     * @param aPowerMenuItemIndex last used index in power menue 
+     */
+    void AddMmcMenuItemsL( CDesCArray*& aProfileNameCDesCArray,
+                           RArray<TInt>& aItemIdArray, 
+                           TInt& aPowerMenuItemIndex );
+
+private:
+    //Data members
 
         /*****************************************************
          * Series 60 Customer / DOS
@@ -1649,15 +1663,18 @@
         */
         CSysApBatteryInfoController* iSysApBatteryInfoController;
 
-		        /**
-         * Returns whether a de/encrypting operation is ongoing
-         *
-     	* @since S60 3.1
-     	* @return TBool ETrue if a de/encrypting operation is in progress
-     	*/
-         TBool IsEncryptionOperationOngoingL() const;
-		 TInt iKeyBoardRepeatCount;
-		 TBool iFlagForRmvMmcFrmShortPwrKey;
+    /**
+     * Returns whether a de/encrypting operation is ongoing
+     *
+     * @since S60 3.1
+     * @return TBool ETrue if a de/encrypting operation is in progress
+     */
+    TBool IsEncryptionOperationOngoingL() const;
+    TInt iKeyBoardRepeatCount;
+    TBool iFlagForRmvMmcFrmShortPwrKey;
+
+    //Offset of profile-related menu items in power key menu
+    TInt iProfileItemsOffset;
     };
 
 #endif      // SYSAPAPPUI_H
--- a/coreapplicationuis/SysAp/Inc/SysApFeatureManager.h	Fri Feb 19 22:58:54 2010 +0200
+++ b/coreapplicationuis/SysAp/Inc/SysApFeatureManager.h	Fri Mar 12 15:43:21 2010 +0200
@@ -253,6 +253,16 @@
     * @return ETrue if feature is supported
     */
     TBool FmTxRdsTextSupported() const;
+    
+    
+    /**
+     * Returns whether a short press of the power key
+     * triggers the keylock
+     * 
+     * @since S60 5.2
+     * @return ETrue if feature is supported 
+     */
+    TBool PowerKeyIsLockKey() const;
 
 private:
 
@@ -373,6 +383,12 @@
     * FM TX RDS Text support status.
     */
     TBool iFmTxRdsTextSupported;
+    
+    
+    /**
+     * Short press of power key invokes keylock
+     */
+    TBool iPowerKeyIsLockKey;
 };
 
 #endif // SYSAPFEATUREMANAGER_H
--- a/coreapplicationuis/SysAp/Src/SysApAppUi.cpp	Fri Feb 19 22:58:54 2010 +0200
+++ b/coreapplicationuis/SysAp/Src/SysApAppUi.cpp	Fri Mar 12 15:43:21 2010 +0200
@@ -620,6 +620,9 @@
             }
 #endif // _DEBUG
 
+        TBool haveStatusPane = ( StatusPane()== NULL ) ? EFalse : StatusPane()->IsVisible();
+        TRACES( RDebug::Print( _L("CSysApAppUi::HandleKeyEventL: haveStatusPane = %d" ) ) );
+        
         TKeyResponse response( EKeyWasNotConsumed );
         if (iSysApKeyManagement && aKeyEvent.iCode != EKeyPowerOff && aKeyEvent.iCode != 'E')
             {
@@ -642,7 +645,14 @@
                         {
                         TRACES( RDebug::Print(_L("CSysApAppUi::HandleKeyEventL, Short powerkey") ) );
                         iLastPowerKeyWasShort = ETrue;
-                        HandleShortPowerKeyPressedL();
+                        if ( iPowerKeyPopupMenuActive || !iSysApFeatureManager->PowerKeyIsLockKey() || (iSysApFeatureManager->PowerKeyIsLockKey() && haveStatusPane ))
+                            {
+                            //do this only if the power key menu is active (handles item navigation)
+                            //or if the power key is not the lock key (default)
+                             HandleShortPowerKeyPressedL();
+                            }
+                        
+                        
                         iIgnoreNextPowerKeyRepeats = EFalse;
                         }
                     //Long power key press
@@ -651,7 +661,18 @@
                         iKeyBoardRepeatCount = -1;
                         TRACES( RDebug::Print(_L("CSysApAppUi::HandleKeyEventL, Long powerkey") ) );
                         iLastPowerKeyWasShort = EFalse;
-                        HandleLongPowerKeyPressedL();
+                        if ( !haveStatusPane && !iPowerKeyPopupMenuActive && iSysApFeatureManager->PowerKeyIsLockKey() && !iIgnoreNextPowerKeyRepeats )
+                            {
+                            if ( !iGlobalListQuery )
+                                {
+                                HandleShortPowerKeyPressedL();
+                                }
+                            }
+                        else
+                            {
+                            HandleLongPowerKeyPressedL();
+                            }
+                        
                         }
                     break;
 
@@ -671,36 +692,46 @@
                     break;
                 }
             }
-        else if( aType == EEventKeyUp )
-            {
-            if( aKeyEvent.iScanCode == EStdKeyDevice2 )
+        else if ( aType == EEventKeyUp )
+            {
+            TRACES( RDebug::Print( _L( "CSysApAppUi::HandleKeyEventL(): aType == EEventKeyUp, PowerKeyIsLockKey = %d, iLastPowerKeyWasShort = %d, iPowerKeyPopupMenuActive = %d, iCharging = %d" ), iSysApFeatureManager->PowerKeyIsLockKey(), iLastPowerKeyWasShort, iPowerKeyPopupMenuActive, iCharging ) );
+            if ( iSysApFeatureManager->PowerKeyIsLockKey()
+                    && iLastPowerKeyWasShort && !iPowerKeyPopupMenuActive && !haveStatusPane )
                 {
-                if ( iIgnoreNextPowerKeyUpEvent )
+                //if the power key is the lock key && the last keypress was short && the power menu is not active
+                //then lock the phone
+                KeyLock().EnableWithoutNote();
+                }
+            else
+                {
+                if ( aKeyEvent.iScanCode == EStdKeyDevice2 )
                     {
-                    if ( !iPowerKeyPopupMenuDismissed ) // If the popup menu has been dismissed, do nothing
+                    if ( iIgnoreNextPowerKeyUpEvent )
                         {
-                        iPowerKeyPopupMenuActive = ETrue;
-                        iIgnoreNextPowerKeyUpEvent = EFalse;
+                        if ( !iPowerKeyPopupMenuDismissed ) // If the popup menu has been dismissed, do nothing
+                            {
+                            iPowerKeyPopupMenuActive = ETrue;
+                            iIgnoreNextPowerKeyUpEvent = EFalse;
+                            }
                         }
-                    }
-                else if( iLastPowerKeyWasShort )
-                    {
-                    if ( iPowerKeyPopupMenuActive )
+                    else if ( iLastPowerKeyWasShort )
                         {
-                        if ( iGlobalListQuery )
+                        if ( iPowerKeyPopupMenuActive )
                             {
-                            if ( iSysApFeatureManager->NoPowerKeySupported() )
+                            if ( iGlobalListQuery )
                                 {
-                            	CancelGlobalListQuery();
+                                if ( iSysApFeatureManager->NoPowerKeySupported() )
+                                    {
+                                    CancelGlobalListQuery();
+                                    }
+                                else
+                                    {
+                                    iGlobalListQuery->MoveSelectionDown();
+                                    }
                                 }
-                            else
-                                {
-                                iGlobalListQuery->MoveSelectionDown();	
-                                }                            
                             }
                         }
                     }
-
                 }
             }
 
@@ -3510,6 +3541,89 @@
     return iProfileEngine->ActiveProfileId();
     }
 
+
+// ----------------------------------------------------------------------------
+// CSysApAppUi::AddMmcMenuItemsL()
+// ----------------------------------------------------------------------------
+//
+void CSysApAppUi::AddMmcMenuItemsL( CDesCArray*& aProfileNameCDesCArray, RArray<TInt>& aItemIdArray,
+                                    TInt& aPowerMenuItemIndex )
+    {
+    TInt propertyValue( StateOfProperty( KPSUidUsbWatcher,
+            KUsbWatcherSelectedPersonality ) );
+
+    HBufC* itemStringBuf;
+#ifndef RD_MULTIPLE_DRIVE
+    iPowerkeyMenuEjectSelection = KErrAccessDenied;
+    if ( !IsEncryptionOperationOngoingL() )
+        {
+        if ( iSysApFeatureManager->MmcHotSwapSupported() &&
+                iMMCInserted &&
+                iSysApFeatureManager->EjectRequiredInPowerMenu() &&
+                propertyValue != KUsbPersonalityIdMS )
+            {
+            iPowerkeyMenuEjectShown = ETrue;
+            TRACES( RDebug::Print(_L("CSysApAppUi::AddMmcMenuItemsL: adding \"Eject\"" ) ) );
+            itemStringBuf = StringLoader::LoadLC( R_QTN_PWRC_EJECT_MMC, iEikonEnv );
+            aProfileNameCDesCArray->AppendL( itemStringBuf->Des() );
+            CleanupStack::PopAndDestroy(); // itemStringBuf
+            if ( iSysApFeatureManager->CoverDisplaySupported() )
+                {
+                aItemIdArray.AppendL(SecondaryDisplay::EPwrMenuItemEjectMMC);
+                }
+            iPowerkeyMenuEjectShown = ETrue;
+            iPowerkeyMenuEjectSelection = aPowerMenuItemIndex;
+            aPowerMenuItemIndex++;
+            }
+        }
+
+#else // RD_MULTIPLE_DRIVE
+    iPowerkeyMenuEjectSelectionBase = KErrAccessDenied;
+    if ( !IsEncryptionOperationOngoingL() )
+        {
+        if ( iSysApFeatureManager->MmcHotSwapSupported()
+                && iSysApFeatureManager->EjectRequiredInPowerMenu()
+                && propertyValue != KUsbPersonalityIdMS )
+            {
+            // Reset old eject status and dialog
+            iSysApDriveList->ResetDrivesToEject();
+            if ( iSysApConfirmationQuery )
+                {
+                if ( iSysApConfirmationQuery->CurrentQuery() == ESysApEjectMmcQuery )
+                    {
+                    iSysApConfirmationQuery->Cancel();
+                    }
+                }
+
+            // Append memory cards for eject selection
+            TInt count( iInsertedMemoryCards.Count() );
+            for ( TInt i( 0 ); i < count; ++i )
+                {
+                itemStringBuf = iSysApDriveList->GetFormattedDriveNameLC(
+                        iInsertedMemoryCards[ i ].iDrive,
+                        R_QTN_PWRC_EJECT_MEMORY_STORAGE );
+                aProfileNameCDesCArray->AppendL( *itemStringBuf );
+                CleanupStack::PopAndDestroy( itemStringBuf );
+
+                if ( iSysApFeatureManager->CoverDisplaySupported() )
+                    {
+                    aItemIdArray.AppendL(
+                            SecondaryDisplay::EPwrMenuItemEjectItemBase + i );
+                    }
+                }
+            if ( count > 0 )
+                {
+                TRACES( RDebug::Print(_L("CSysApAppUi::AddMmcMenuItemsL: added \"Eject\"" ) ) );
+                iPowerkeyMenuEjectShown = ETrue;
+                iPowerkeyMenuEjectSelectionBase = aPowerMenuItemIndex;
+                aPowerMenuItemIndex += count;
+                }
+            }
+        }
+#endif // RD_MULTIPLE_DRIVE
+    }
+
+
 // ----------------------------------------------------------------------------
 // CSysApAppUi::ShowPowerKeyPopUpMenuL()
 // ----------------------------------------------------------------------------
@@ -3572,7 +3686,7 @@
         profileNameCDesCArray->Reset();
         HBufC* itemStringBuf;
 
-        TInt powerMenuItemIndex( 0 );
+        TInt powerMenuItemIndex = 0;
 
         // "Switch off" menu item
         if ( !IsEncryptionOperationOngoingL() )
@@ -3630,16 +3744,19 @@
 					if ( iSysApFeatureManager->CoverDisplaySupported() )
 						{
 						itemIdArray.AppendL(SecondaryDisplay::EPwrMenuItemLockKeypad);
-						}
-					iPowerkeyMenuLockKeypadShown = ETrue;
-					iPowerkeyMenuLockKeypadSelection = powerMenuItemIndex;
-					powerMenuItemIndex++;
-					}
-				}
-			}
-
-        // "Exit SIM access profile" menu item
-
+                        }
+                    iPowerkeyMenuLockKeypadShown = ETrue;
+                    iPowerkeyMenuLockKeypadSelection = powerMenuItemIndex;
+                    powerMenuItemIndex++;
+                    }
+                }
+            }
+        if ( iSysApFeatureManager->PowerKeyIsLockKey() )
+            {
+            AddMmcMenuItemsL( profileNameCDesCArray,
+                    itemIdArray, powerMenuItemIndex );
+            }
+	    // "Exit SIM access profile" menu item
         if ( BtSapEnabled() )
             {
             TRACES( RDebug::Print(_L( "CSysApAppUi::ShowPowerKeyPopUpMenuL: show \"Exit SIM access profile\" item" ) ) );
@@ -3656,8 +3773,8 @@
             }
 
         // Profile menu items
-
-        TInt arrayIndex ( 0 );
+        iProfileItemsOffset = powerMenuItemIndex;
+        TInt arrayIndex( 0 );
         TBufC<KMaxProfileNameLength> profileName;
 
         for ( arrayIndex = 0; arrayIndex < iNumberOfProfileNamesInPowerKeyMenu; arrayIndex++ )
@@ -3698,76 +3815,10 @@
             iPowerkeyMenuLockSystemSelection = powerMenuItemIndex;
             powerMenuItemIndex++;
             }
-
-        // "Eject MMC" menu item
-
-        TInt propertyValue( StateOfProperty( KPSUidUsbWatcher, KUsbWatcherSelectedPersonality ) );
-
-#ifndef RD_MULTIPLE_DRIVE
-			if ( !IsEncryptionOperationOngoingL() )
-			{
-        if ( iSysApFeatureManager->MmcHotSwapSupported() &&
-             iMMCInserted &&
-             iSysApFeatureManager->EjectRequiredInPowerMenu() &&
-             propertyValue != KUsbPersonalityIdMS )
-            {
-            iPowerkeyMenuEjectShown = ETrue;
-            TRACES( RDebug::Print(_L("CSysApAppUi::ShowPowerKeyPopUpMenuL: adding \"Eject\"" ) ) );
-            itemStringBuf = StringLoader::LoadLC( R_QTN_PWRC_EJECT_MMC, iEikonEnv );
-            profileNameCDesCArray->AppendL( itemStringBuf->Des() );
-            CleanupStack::PopAndDestroy(); // itemStringBuf
-            if ( iSysApFeatureManager->CoverDisplaySupported() )
-                {
-                itemIdArray.AppendL(SecondaryDisplay::EPwrMenuItemEjectMMC);
-                }
-            iPowerkeyMenuEjectShown = ETrue;
-            iPowerkeyMenuEjectSelection = powerMenuItemIndex;
-            powerMenuItemIndex++;
-            }
-        }
-
-#else // RD_MULTIPLE_DRIVE
-			if ( !IsEncryptionOperationOngoingL() )
-			{
-        if ( iSysApFeatureManager->MmcHotSwapSupported() &&
-             iSysApFeatureManager->EjectRequiredInPowerMenu() &&
-             propertyValue != KUsbPersonalityIdMS )
-            {
-            // Reset old eject status and dialog
-            iSysApDriveList->ResetDrivesToEject();
-            if ( iSysApConfirmationQuery )
-                {
-                if ( iSysApConfirmationQuery->CurrentQuery() == ESysApEjectMmcQuery )
-                    {
-                    iSysApConfirmationQuery->Cancel();
-                    }
-                }
-
-            // Append memory cards for eject selection
-            TInt count( iInsertedMemoryCards.Count() );
-            for ( TInt i( 0 ); i < count; ++i )
-                {
-                itemStringBuf = iSysApDriveList->GetFormattedDriveNameLC(
-                    iInsertedMemoryCards[ i ].iDrive,
-                    R_QTN_PWRC_EJECT_MEMORY_STORAGE );
-                profileNameCDesCArray->AppendL( *itemStringBuf );
-                CleanupStack::PopAndDestroy( itemStringBuf );
-
-                if ( iSysApFeatureManager->CoverDisplaySupported() )
-                    {
-                    itemIdArray.AppendL( SecondaryDisplay::EPwrMenuItemEjectItemBase + i );
-                    }
-                }
-            if ( count > 0 )
-                {
-                TRACES( RDebug::Print(_L("CSysApAppUi::ShowPowerKeyPopUpMenuL: added \"Eject\"" ) ) );
-                iPowerkeyMenuEjectShown = ETrue;
-                iPowerkeyMenuEjectSelectionBase = powerMenuItemIndex;
-                powerMenuItemIndex += count;
-                }
-            }
-				}
-#endif // RD_MULTIPLE_DRIVE
+        if ( !iSysApFeatureManager->PowerKeyIsLockKey() )
+            {
+                AddMmcMenuItemsL( profileNameCDesCArray, itemIdArray, powerMenuItemIndex );
+            }
         
         // Activate/deactive power save mode
         if ( iSysApPsmController ) // variable feature, not create if power save is not used
@@ -3850,33 +3901,32 @@
         }
     else
         {
-        TInt firstProfileItemIndex( 1 + Max( 0, iPowerkeyMenuLockKeypadSelection, iPowerkeyMenuExitSapSelection ) ); // index of "General" profile
-
+        // first menu item <=> Switch off
         if ( aSelection == KPowerKeyMenuSelectionSwitchOff )
             {
             TRACES( RDebug::Print(_L("CSysApAppUi::PowerKeyPopUpMenuSelectionDoneL: \"Switch off\" selected" ) ) );
             DoShutdownL( EFalse, KDummyReason );
             }
-
+        // 2nd menu item: lock display & keys
         else if ( iPowerkeyMenuLockKeypadShown && aSelection == iPowerkeyMenuLockKeypadSelection )
             {
             TRACES( RDebug::Print(_L("CSysApAppUi::PowerKeyPopUpMenuSelectionDoneL: \"Lock keypad\" selected" ) ) );
             KeyLock().EnableKeyLock();
             }
-
+        // BT
         else if ( iPowerkeyMenuExitSapShown && aSelection == iPowerkeyMenuExitSapSelection )
             {
             TRACES( RDebug::Print(_L("CSysApAppUi::PowerKeyPopUpMenuSelectionDoneL: \"Exit SAP\" selected" ) ) );
             ShowQueryL( ESysApBtSapDisconnectQuery );
             }
-
-        else if ( aSelection < firstProfileItemIndex + iNumberOfProfileNamesInPowerKeyMenu )
+        // Profile Items
+        else if ( ( aSelection >= iProfileItemsOffset ) && ( aSelection < iProfileItemsOffset + iNumberOfProfileNamesInPowerKeyMenu ) )
             {
             __ASSERT_DEBUG( iProfileNamesArray, User::Invariant() );
 
             if ( iProfileNamesArray )
                 {
-                iProfileToBeActivated = ( iProfileNamesArray->ProfileName( aSelection - firstProfileItemIndex ) )->Id();
+                iProfileToBeActivated = ( iProfileNamesArray->ProfileName( aSelection - iProfileItemsOffset ) )->Id();
 
                 TRACES( RDebug::Print(_L("CSysApAppUi::PowerKeyPopUpMenuSelectionDoneL: profile id: %d selected" ), iProfileToBeActivated ) );
                 if ( ! iSysApOfflineModeController->OfflineModeActive() ||
@@ -3891,19 +3941,21 @@
                     }
                 }
             }
-
+        // device lock
         else if ( iPowerkeyMenuLockSystemShown && aSelection == iPowerkeyMenuLockSystemSelection )
             {
             TRACES( RDebug::Print(_L("CSysApAppUi::PowerKeyPopUpMenuSelectionDoneL: \"Lock system\" selected" ) ) );
             iSysApSystemLock->SetLockedL();
             }
 #ifndef RD_MULTIPLE_DRIVE
+        //eject single MMC
         else if ( iPowerkeyMenuEjectShown && aSelection == iPowerkeyMenuEjectSelection )
             {
             TRACES( RDebug::Print(_L("CSysApAppUi::PowerKeyPopUpMenuSelectionDoneL: \"Eject\" selected" ) ) );
             ShowQueryL( ESysApEjectMmcQuery );
             }
 #else // RD_MULTIPLE_DRIVE
+        //eject nth MMC
         else if ( iPowerkeyMenuEjectShown &&
                 aSelection >= iPowerkeyMenuEjectSelectionBase &&
                 aSelection < iPowerkeyMenuEjectSelectionBase + iInsertedMemoryCards.Count() )
@@ -3929,6 +3981,8 @@
 
     delete iProfileNamesArray;
     iProfileNamesArray = NULL;
+    delete iGlobalListQuery;
+    iGlobalListQuery = NULL;
 
     TRACES( RDebug::Print(_L("CSysApAppUi::PowerKeyPopUpMenuSelectionDoneL: END" ) ) );
     }
--- a/coreapplicationuis/SysAp/Src/SysApFeatureManager.cpp	Fri Feb 19 22:58:54 2010 +0200
+++ b/coreapplicationuis/SysAp/Src/SysApFeatureManager.cpp	Fri Mar 12 15:43:21 2010 +0200
@@ -112,6 +112,9 @@
     iFmTxRdsTextSupported = FeatureManager::FeatureSupported( KFeatureIdFfFmtxRdsText );
     TRACES( RDebug::Print( _L("CSysApFeatureManager::ConstructL: FM TX RDS-TEXT supported=%d"), iFmTxRdsTextSupported ) );
     
+    iPowerKeyIsLockKey = FeatureManager::FeatureSupported( KFeatureIdFfPowerKeyAsKeyguard );
+    TRACES( RDebug::Print( _L("CSysApFeatureManager::ConstructL: Power Key as keyguard supported=%d"), iPowerKeyIsLockKey ) );
+    
     CRepository* repository = NULL;
     
     TRAPD( err, repository = CRepository::NewL( KCRUidCoreApplicationUIsConf ) );
@@ -188,7 +191,8 @@
                                                iPenEnabled( EFalse ),
                                                iVmbxCallDivertIconSupported( EFalse ),
                                                iTouchUnlockStrokeSupported( EFalse ),
-                                               iFmTxRdsTextSupported( EFalse )
+                                               iFmTxRdsTextSupported( EFalse ),
+                                               iPowerKeyIsLockKey ( EFalse )
 
     {
     }
@@ -428,6 +432,15 @@
     return iFmTxRdsTextSupported;
     }
 
+//-----------------------------------------------------------------------------
+// CSysApFeatureManager::PowerKeyIsLockKey()
+//-----------------------------------------------------------------------------
+//
+TBool CSysApFeatureManager::PowerKeyIsLockKey() const
+    {
+    return iPowerKeyIsLockKey;
+    }
+
 // End of File
 
 
--- a/coreapplicationuis/SysAp/Src/sysapdefaultkeyhandler.cpp	Fri Feb 19 22:58:54 2010 +0200
+++ b/coreapplicationuis/SysAp/Src/sysapdefaultkeyhandler.cpp	Fri Mar 12 15:43:21 2010 +0200
@@ -20,27 +20,27 @@
 #include <eikon.hrh>
 #include <coemain.h>
 #include <aknkeylock.h>
-#include <akntasklist.h>
+#include <AknTaskList.h>
 #include <apgtask.h>
 #include <apgcli.h>
 #include <apgwgnam.h>
 #include <apacmdln.h>
-#include <aiwpocparameters.h>
-#include <aiwservicehandler.h>
+#include <AiwPoCParameters.h>
+#include <AiwServiceHandler.h>
 #include <featmgr.h>
 #include <coreapplicationuisdomainpskeys.h>
-#include <psvariables.h>
+#include <PSVariables.h>
 #include <startupdomainpskeys.h>
 #include <hwrmdomainpskeys.h>
 #include <u32hal.h>
-#include <sysap.rsg>
+#include <SysAp.rsg>
 #include <centralrepository.h> //for CRepository
 #include <settingsinternalcrkeys.h>
 #include <keylockpolicyapi.h>
 #include "sysapdefaultkeyhandler.h"
 #include "sysapcallback.h"
 #include "SysAp.hrh"
-#include "aknsgcc.h"
+#include "AknSgcc.h"
 
 
 const TInt KModifierMask( 0 );
--- a/coreapplicationuis/advancedtspcontroller/data/keyevent.rul	Fri Feb 19 22:58:54 2010 +0200
+++ b/coreapplicationuis/advancedtspcontroller/data/keyevent.rul	Fri Mar 12 15:43:21 2010 +0200
@@ -22,9 +22,9 @@
             />
             
             <Tsp
-            routingTable='01'
+            routingTable='01'            
+            ruleForeground='01'
             ruleActiveAudio='00'
-            ruleForeground='01'
             ruleLastPlayedAudio='03'
             ruleDefaultApp='02'
             defaultApplicationPhone='100058B3'
--- a/coreapplicationuis/advancedtspcontroller/tsrc/mt_atspc/group/envrecall.cmd	Fri Feb 19 22:58:54 2010 +0200
+++ b/coreapplicationuis/advancedtspcontroller/tsrc/mt_atspc/group/envrecall.cmd	Fri Mar 12 15:43:21 2010 +0200
@@ -25,16 +25,7 @@
 @echo Cleaning advanced tsp test stub... Finished
 
 @echo Restoring remcon...
-pushd \sf\os\devicesrv\accessoryservices\remotecontrolfw\server\group
-call bldmake bldfiles
-call abld cleanexport
-call abld export
-popd
-pushd \sf\os\devicesrv\accessoryservices\remotecontrolfw\targetselectorplugin\group
-call bldmake bldfiles
-call abld reallyclean
-call abld build
-popd
+move remconservercaps_orig.mmh \epoc32\include\remcon\remconservercaps.mmh
 @echo Restoring remcon... Finished
 
 @echo Restoring advanced tsp
--- a/coreapplicationuis/advancedtspcontroller/tsrc/mt_atspc/group/envsetup.cmd	Fri Feb 19 22:58:54 2010 +0200
+++ b/coreapplicationuis/advancedtspcontroller/tsrc/mt_atspc/group/envsetup.cmd	Fri Mar 12 15:43:21 2010 +0200
@@ -16,6 +16,8 @@
 REM
 @echo on
 
+@echo Copying remconservercaps.mmh to safe place for envrecall
+copy \epoc32\include\remcon\remconservercaps.mmh remconservercaps_orig.mmh
 
 @echo Setting up advanced tsp test stub...
 pushd ..\..\stub\group
@@ -23,9 +25,4 @@
 call abld test reallyclean
 call abld test build
 popd
-pushd \sf\os\devicesrv\accessoryservices\remotecontrolfw\targetselectorplugin\group
-call bldmake bldfiles
-call abld reallyclean
-call abld build
-popd
 @echo Setting up advanced tsp test stub... Finished
--- a/coreapplicationuis/advancedtspcontroller/tsrc/mt_atspc/group/mt_atspc.mmp	Fri Feb 19 22:58:54 2010 +0200
+++ b/coreapplicationuis/advancedtspcontroller/tsrc/mt_atspc/group/mt_atspc.mmp	Fri Mar 12 15:43:21 2010 +0200
@@ -32,7 +32,7 @@
 
 USERINCLUDE ../inc
 
-SYSTEMINCLUDE           /epoc32/include/Digia/EUnit
+SYSTEMINCLUDE           /epoc32/include/platform/Digia/EUnit
 MW_LAYER_SYSTEMINCLUDE
 
 LIBRARY                 EUnit.lib
--- a/coreapplicationuis/advancedtspcontroller/tsrc/mt_atspc/inc/mt_atspc.h	Fri Feb 19 22:58:54 2010 +0200
+++ b/coreapplicationuis/advancedtspcontroller/tsrc/mt_atspc/inc/mt_atspc.h	Fri Mar 12 15:43:21 2010 +0200
@@ -82,6 +82,16 @@
          virtual void MrctspoDoOutgoingResponsePermitted(TBool /*aIsPermitted*/) {}
          virtual void MrctspoDoIncomingNotifyAddressed(TClientInfo* /*aClientInfo*/, TInt aError ) { iObserverResponse = aError; }
          virtual void MrctspoDoReAddressNotifies() {}
+         
+         
+         virtual TInt MrctspoSetLocalAddressedClient(const TUid& aBearerUid, const TClientInfo& aClientInfo){ return 0; }
+         virtual void MrctspoDoIncomingNotifyPermitted(TBool aIsPermitted){ }
+
+         virtual void MrctspoDoIncomingCommandPermitted(TBool aIsPermitted) { }
+
+         virtual void MrctspoDoOutgoingNotifyCommandPermitted(TBool aIsPermitted){ }
+
+         virtual void MrctspoDoOutgoingNotifyCommandAddressed(TRemConAddress* aConnection, TInt aError) { }
 
 public: // from MCFListener         
     void ContextIndicationL( const CCFContextIndication& aChangedContext ) {}
--- a/coreapplicationuis/powersaveutilities/batterypopupcontrol/src/batterypopupcontrol.cpp	Fri Feb 19 22:58:54 2010 +0200
+++ b/coreapplicationuis/powersaveutilities/batterypopupcontrol/src/batterypopupcontrol.cpp	Fri Mar 12 15:43:21 2010 +0200
@@ -557,7 +557,15 @@
                 iHighlightedItem = EFalse; 
                 }
             }
-				}
+        else
+            {
+            if ( iHighlightedItem )
+                {         
+                iHighlightedItem = EFalse;             
+                DrawNow( iLinkRect );
+                }
+            }
+        }
     }
 // -----------------------------------------------------------------------------
 // CBatteryPopupControl::CreateIconL()
--- a/coreapplicationuis/tsrc/public/basic/MT_PhoneCmdhandler/MT_CPhoneHandler.mmp	Fri Feb 19 22:58:54 2010 +0200
+++ b/coreapplicationuis/tsrc/public/basic/MT_PhoneCmdhandler/MT_CPhoneHandler.mmp	Fri Mar 12 15:43:21 2010 +0200
@@ -35,7 +35,7 @@
 
 MW_LAYER_SYSTEMINCLUDE
 
-SYSTEMINCLUDE           /epoc32/include/Digia/EUnit
+SYSTEMINCLUDE           /epoc32/include/platform/Digia/EUnit
 
 LIBRARY                 EUnit.lib
 LIBRARY                 EUnitUtil.lib
--- a/coreapplicationuis/tsrc/public/basic/MT_kefmapper/MT_kefmapper.mmp	Fri Feb 19 22:58:54 2010 +0200
+++ b/coreapplicationuis/tsrc/public/basic/MT_kefmapper/MT_kefmapper.mmp	Fri Mar 12 15:43:21 2010 +0200
@@ -35,7 +35,7 @@
 
 MW_LAYER_SYSTEMINCLUDE
 
-SYSTEMINCLUDE           /epoc32/include/Digia/EUnit
+SYSTEMINCLUDE           /epoc32/include/platform/Digia/EUnit
 
 
 LIBRARY                 EUnit.lib
--- a/coreapplicationuis/tsrc/public/basic/group/MT_Rfs.mmp	Fri Feb 19 22:58:54 2010 +0200
+++ b/coreapplicationuis/tsrc/public/basic/group/MT_Rfs.mmp	Fri Mar 12 15:43:21 2010 +0200
@@ -32,8 +32,7 @@
 USERINCLUDE             ../MT_Rfs/Src .
 
 MW_LAYER_SYSTEMINCLUDE
-
-SYSTEMINCLUDE           /epoc32/include/Digia/EUnit
+SYSTEMINCLUDE           /epoc32/include/platform/Digia/EUnit
 
 LIBRARY                 EUnit.lib
 LIBRARY                 EUnitUtil.lib
--- a/layers.sysdef.xml	Fri Feb 19 22:58:54 2010 +0200
+++ b/layers.sysdef.xml	Fri Mar 12 15:43:21 2010 +0200
@@ -12,7 +12,7 @@
       <module name="">
         <unit unitID="sydo.appsupport.appsupport_plat.flash_mmi_service_interface_custom_api" name="sydo_appsupport_appsupport_plat_flash_mmi_service_interface_custom_api" bldFile="&layer_real_source_path;/appsupport_plat/flash_mmi_service_interface_custom_api/group" mrp="" filter="!sf_build" />
         <unit unitID="sydo.appsupport.appsupport_plat.flash_netscape_plugin_command_api" name="sydo_appsupport_appsupport_plat_flash_netscape_plugin_command_api" bldFile="&layer_real_source_path;/appsupport_plat/flash_netscape_plugin_command_api/group" mrp="" filter="!sf_build" />
-        <unit unitID="sydo.appsupport.coreapplicationuis.atcmdplugin" name="sydo_appsupport_appsupport_coreapplicationuis_atcmdplugin" bldFile="&layer_real_source_path;/coreapplicationuis/atcmdplugin/group" mrp="" filter="sf_build" />
+        <unit unitID="sydo.appsupport.coreapplicationuis.atcmdplugin" name="sydo_appsupport_appsupport_coreapplicationuis_atcmdplugin" bldFile="&layer_real_source_path;/coreapplicationuis/atcmdplugin/group" mrp="" filter="!oem_build" />
       </module>
     </layer>
   </systemModel>
--- a/mediakeys/MMKeyBearer/src/MMKeyBearerImplementation.cpp	Fri Feb 19 22:58:54 2010 +0200
+++ b/mediakeys/MMKeyBearer/src/MMKeyBearerImplementation.cpp	Fri Mar 12 15:43:21 2010 +0200
@@ -359,7 +359,7 @@
 
     // Check for keypadlock if the events are from device keypad
     // If events are from accessory device,then do not check for keypadlock
-    if (aKeyType != EAccessoryVolumeKeys)
+    if (aKeyType != EAccessoryVolumeKeys && aKeyType != ESideVolumeKeys )
         {
         TBool keysLocked = EFalse;
         if (!(iAknServerConnected))  // Connect to server for first time
@@ -368,36 +368,18 @@
                 {
                 iAknServerConnected = ETrue;
                 }
-            else                   // If connection fails, then return
+            else if (aKeyType == EMediaKeys)                 // If connection fails, then return
                 {
-                //Start the listener once again
-               if (aKeyType == ESideVolumeKeys)
-                    {
-                    iMMKeyBearerObserver->Start();
-                    }
-                if (aKeyType == EMediaKeys)
-                    {
-                    iMediaKeyObserver->Start();
-                    }
-                return ;
+                iMediaKeyObserver->Start();
+	    	return ;
                 }
             }
         iAknServer.ShowKeysLockedNote(keysLocked);
 
-        if (keysLocked)
+        if (keysLocked && aKeyType == EMediaKeys)
             {
             // Device is locked , Discard the key event
-
-            //Start the listener once again
-            if (aKeyType == ESideVolumeKeys)
-                {
-                iMMKeyBearerObserver->Start();
-                }
-            if (aKeyType == EMediaKeys)
-                {
-                iMediaKeyObserver->Start();
-                }
-
+            iMediaKeyObserver->Start();
             return;
             }
         }
--- a/sysresmonitoring/oodmonitor/oodmonitor2/src/outofdiskglobalnote.cpp	Fri Feb 19 22:58:54 2010 +0200
+++ b/sysresmonitoring/oodmonitor/oodmonitor2/src/outofdiskglobalnote.cpp	Fri Mar 12 15:43:21 2010 +0200
@@ -240,7 +240,10 @@
                 }
             }
         resReader.SetBuffer(str);
-	    HBufC* message( FormatStringL(resReader.ReadHBufCL()->Des(), *strings));
+	    HBufC* resHandle = resReader.ReadHBufCL();
+        CleanupStack::PushL( resHandle );
+        HBufC* message(FormatStringL(resHandle->Des(),*strings));
+        CleanupStack::PushL( message );
 	    TRACES1("COutOfDiskMonitor::ShowGlobalQueryL: txt: %S",message);
         DisplayL(message->Des());
 
@@ -252,8 +255,10 @@
 
         iNoteInfo.iStatus = aStatus;
         iNoteInfo.iDrive = aDrive;        
+        CleanupStack::PopAndDestroy(message);
+        CleanupStack::PopAndDestroy(resHandle);
         CleanupStack::PopAndDestroy( str );
-        CleanupStack::PopAndDestroy( strings );
+        CleanupStack::PopAndDestroy( strings ); 
         iOutOfDiskMonitor->SetAsDisplayedL(aDrive, aStatus);
         }
     TRACES("COutOfDiskGlobalNote::ShowGlobalQueryL: End");
--- a/sysresmonitoring/oommonitor/group/oommonitor.mmp	Fri Feb 19 22:58:54 2010 +0200
+++ b/sysresmonitoring/oommonitor/group/oommonitor.mmp	Fri Mar 12 15:43:21 2010 +0200
@@ -29,9 +29,9 @@
 
 NOEXPORTLIBRARY
 #ifdef WINS
-DEFFILE         ../bwins/oommonitor.def
+DEFFILE         ../bwins/oommonitor.DEF
 #else
-DEFFILE         ../eabi/oommonitor.def
+DEFFILE         ../eabi/oommonitor.DEF
 #endif
 
 CAPABILITY      CAP_GENERAL_DLL
--- a/sysresmonitoring/oommonitor/group/oommonitorlib.mmp	Fri Feb 19 22:58:54 2010 +0200
+++ b/sysresmonitoring/oommonitor/group/oommonitorlib.mmp	Fri Mar 12 15:43:21 2010 +0200
@@ -20,7 +20,7 @@
 UID             0x1000008D 0x10282DBF
 
 #ifdef WINS
- DEFFILE         ../bwins/oommonitor.def
+ DEFFILE         ../bwins/oommonitor.DEF
 #else
- DEFFILE         ../eabi/oommonitor.def
+ DEFFILE         ../eabi/oommonitor.DEF
 #endif
--- a/sysresmonitoring/oommonitor/src/oomIdletimerule.cpp	Fri Feb 19 22:58:54 2010 +0200
+++ b/sysresmonitoring/oommonitor/src/oomIdletimerule.cpp	Fri Mar 12 15:43:21 2010 +0200
@@ -17,7 +17,7 @@
 
 #include "oomidletimerule.h"
 #include "oomwindowgrouplist.h"
-#include "oomtraces.h"
+#include "OomTraces.h"
 
 COomIdleTimeRule* COomIdleTimeRule::NewL(TTimeIntervalSeconds aIdleTime, TInt aPriority)
     {
--- a/sysresmonitoring/oommonitor/src/oomaction.cpp	Fri Feb 19 22:58:54 2010 +0200
+++ b/sysresmonitoring/oommonitor/src/oomaction.cpp	Fri Mar 12 15:43:21 2010 +0200
@@ -18,7 +18,7 @@
 
 #include "oomaction.h"
 #include "oomactionlist.h"
-#include "oomtraces.h"
+#include "OomTraces.h"
 
 COomAction::~COomAction()
     {
--- a/sysresmonitoring/oommonitor/src/oomactionconfig.cpp	Fri Feb 19 22:58:54 2010 +0200
+++ b/sysresmonitoring/oommonitor/src/oomactionconfig.cpp	Fri Mar 12 15:43:21 2010 +0200
@@ -19,7 +19,7 @@
 
 #include "oomactionconfig.h"
 #include "oomruleconfig.h"
-#include "oomtraces.h"
+#include "OomTraces.h"
 
 // Add a rule
 // This class takes ownership of the given rule
--- a/sysresmonitoring/oommonitor/src/oomappclosetimer.cpp	Fri Feb 19 22:58:54 2010 +0200
+++ b/sysresmonitoring/oommonitor/src/oomappclosetimer.cpp	Fri Mar 12 15:43:21 2010 +0200
@@ -18,7 +18,7 @@
 
 #include "oomappclosetimer.h"
 #include "oomcloseapp.h"
-#include "oomtraces.h"
+#include "OomTraces.h"
 
 COomAppCloseTimer* COomAppCloseTimer::NewL(COomCloseApp& aMonitor)
     {
--- a/sysresmonitoring/oommonitor/src/oomappclosewatcher.cpp	Fri Feb 19 22:58:54 2010 +0200
+++ b/sysresmonitoring/oommonitor/src/oomappclosewatcher.cpp	Fri Mar 12 15:43:21 2010 +0200
@@ -19,7 +19,7 @@
 
 #include "oomappclosewatcher.h"
 #include "oomcloseapp.h"
-#include "oomtraces.h"
+#include "OomTraces.h"
 
 COomAppCloseWatcher::COomAppCloseWatcher(COomCloseApp& aMonitor) : CActive(CActive::EPriorityStandard), iMonitor(aMonitor)
     {
--- a/sysresmonitoring/oommonitor/src/oomapplicationconfig.cpp	Fri Feb 19 22:58:54 2010 +0200
+++ b/sysresmonitoring/oommonitor/src/oomapplicationconfig.cpp	Fri Mar 12 15:43:21 2010 +0200
@@ -20,7 +20,7 @@
 #include "oomapplicationconfig.h"
 #include "oomconstants.hrh"
 #include "oomcloseappconfig.h"
-#include "oomtraces.h"
+#include "OomTraces.h"
 
 COomApplicationConfig* COomApplicationConfig::NewL(TUint aApplicationId)
     {
--- a/sysresmonitoring/oommonitor/src/oomclientrequestqueue.cpp	Fri Feb 19 22:58:54 2010 +0200
+++ b/sysresmonitoring/oommonitor/src/oomclientrequestqueue.cpp	Fri Mar 12 15:43:21 2010 +0200
@@ -18,7 +18,7 @@
 
 
 #include "oomclientrequestqueue.h"
-#include "oomtraces.h"
+#include "OomTraces.h"
 #include "oomsubscribehelper.h"
 #include "oompanic.h"
 #include "oommemorymonitor.h"
--- a/sysresmonitoring/oommonitor/src/oomcloseappconfig.cpp	Fri Feb 19 22:58:54 2010 +0200
+++ b/sysresmonitoring/oommonitor/src/oomcloseappconfig.cpp	Fri Mar 12 15:43:21 2010 +0200
@@ -18,7 +18,7 @@
 
 
 #include "oomcloseappconfig.h"
-#include "oomtraces.h"
+#include "OomTraces.h"
 
 COomCloseAppConfig* COomCloseAppConfig::NewL(TInt32 aId)
     {
--- a/sysresmonitoring/oommonitor/src/oomconfig.cpp	Fri Feb 19 22:58:54 2010 +0200
+++ b/sysresmonitoring/oommonitor/src/oomconfig.cpp	Fri Mar 12 15:43:21 2010 +0200
@@ -24,7 +24,7 @@
 #include "oomapplicationconfig.h"
 #include "oomrunpluginconfig.h"
 #include "oomcloseappconfig.h"
-#include "oomtraces.h"
+#include "OomTraces.h"
 
 COomConfig* COomConfig::NewL()
     {
--- a/sysresmonitoring/oommonitor/src/oomconfigparser.cpp	Fri Feb 19 22:58:54 2010 +0200
+++ b/sysresmonitoring/oommonitor/src/oomconfigparser.cpp	Fri Mar 12 15:43:21 2010 +0200
@@ -19,7 +19,7 @@
 
 #include "oomconfigparser.h"
 #include "oompanic.h"
-#include "oomtraces.h"
+#include "OomTraces.h"
 #include "oomidletimerule.h"
 #include "oomforegroundrule.h"
 #include "oomconstants.hrh"
--- a/sysresmonitoring/oommonitor/src/oomforegroundrule.cpp	Fri Feb 19 22:58:54 2010 +0200
+++ b/sysresmonitoring/oommonitor/src/oomforegroundrule.cpp	Fri Mar 12 15:43:21 2010 +0200
@@ -18,7 +18,7 @@
 
 #include "oomforegroundrule.h"
 #include "oomwindowgrouplist.h"
-#include "oomtraces.h"
+#include "OomTraces.h"
 
 // If the specified target app is in the foreground then apply the specified priority
 COomForegroundRule::COomForegroundRule(TInt aTargetAppId, TInt aPriority) : iTargetAppId(aTargetAppId), iPriority(aPriority)
--- a/sysresmonitoring/oommonitor/src/oomglobalconfig.cpp	Fri Feb 19 22:58:54 2010 +0200
+++ b/sysresmonitoring/oommonitor/src/oomglobalconfig.cpp	Fri Mar 12 15:43:21 2010 +0200
@@ -18,7 +18,7 @@
 
 
 #include "oomglobalconfig.h"
-#include "oomtraces.h"
+#include "OomTraces.h"
 
 COomGlobalConfig::~COomGlobalConfig()
     {
--- a/sysresmonitoring/oommonitor/src/oommemorymonitorserver.cpp	Fri Feb 19 22:58:54 2010 +0200
+++ b/sysresmonitoring/oommonitor/src/oommemorymonitorserver.cpp	Fri Mar 12 15:43:21 2010 +0200
@@ -21,7 +21,7 @@
 #include "oommonitorclientserver.h"
 #include "oommemorymonitorsession.h"
 #include "oommemorymonitor.h"
-#include "oomtraces.h"
+#include "OomTraces.h"
 
 #ifdef CLIENT_REQUEST_QUEUE        
 CMemoryMonitorServer* CMemoryMonitorServer::NewL(COomClientRequestQueue& aQueue)
--- a/sysresmonitoring/oommonitor/src/oommemorymonitorsession.cpp	Fri Feb 19 22:58:54 2010 +0200
+++ b/sysresmonitoring/oommonitor/src/oommemorymonitorsession.cpp	Fri Mar 12 15:43:21 2010 +0200
@@ -20,7 +20,7 @@
 #include "oommemorymonitorsession.h"
 #include "oommemorymonitor.h"
 #include "oommemorymonitorserver.h"
-#include "oomtraces.h"
+#include "OomTraces.h"
 #include "oomclientrequestqueue.h"
 
 CMemoryMonitorSession::CMemoryMonitorSession()
--- a/sysresmonitoring/oommonitor/src/oommonitor.cpp	Fri Feb 19 22:58:54 2010 +0200
+++ b/sysresmonitoring/oommonitor/src/oommonitor.cpp	Fri Mar 12 15:43:21 2010 +0200
@@ -21,7 +21,7 @@
 #include "oommonitor.h"
 #include "oommemorymonitor.h"
 #include "oommonitorclientserver.h"
-#include "oomtraces.h"
+#include "OomTraces.h"
 
 const TInt KStackSize = 0x2000;
 
--- a/sysresmonitoring/oommonitor/src/oommonitorplugin.cpp	Fri Feb 19 22:58:54 2010 +0200
+++ b/sysresmonitoring/oommonitor/src/oommonitorplugin.cpp	Fri Mar 12 15:43:21 2010 +0200
@@ -19,7 +19,7 @@
 #include <apgwgnam.h>
 #include "oommonitorplugin.h"
 #include "oommemorymonitor.h"
-#include "oomtraces.h"
+#include "OomTraces.h"
 
 // TLS is used to store the CMemoryMonitor pointer, CMemoryMonitor
 // being the main object in the OOM monitor thread. This allows
--- a/sysresmonitoring/oommonitor/src/oommonitorsession.cpp	Fri Feb 19 22:58:54 2010 +0200
+++ b/sysresmonitoring/oommonitor/src/oommonitorsession.cpp	Fri Mar 12 15:43:21 2010 +0200
@@ -20,7 +20,7 @@
 #include <oommonitorsession.h>
 #include "oommonitorclientserver.h"
 #include "oompanic.h"
-#include "oomtraces.h"
+#include "OomTraces.h"
 
 EXPORT_C TInt ROomMonitorSession::Connect()
     {
--- a/sysresmonitoring/oommonitor/src/oomoutofmemorywatcher.cpp	Fri Feb 19 22:58:54 2010 +0200
+++ b/sysresmonitoring/oommonitor/src/oomoutofmemorywatcher.cpp	Fri Mar 12 15:43:21 2010 +0200
@@ -19,7 +19,7 @@
 
 #include "oomoutofmemorywatcher.h"
 #include "oommemorymonitor.h"
-#include "oomtraces.h"
+#include "OomTraces.h"
 
 // ======================================================================
 // class COutOfMemoryWatcher
--- a/sysresmonitoring/oommonitor/src/oompluginwaiter.cpp	Fri Feb 19 22:58:54 2010 +0200
+++ b/sysresmonitoring/oommonitor/src/oompluginwaiter.cpp	Fri Mar 12 15:43:21 2010 +0200
@@ -18,7 +18,7 @@
 
 #include "oompluginwaiter.h"
 #include "oomrunplugin.h"
-#include "oomtraces.h"
+#include "OomTraces.h"
 #include "oomconstants.hrh"
 
 COomPluginWaiter* COomPluginWaiter::NewL(TInt aMillisecondsToWait, COomRunPlugin& aCallbackClass)
--- a/sysresmonitoring/oommonitor/src/oomrunpluginconfig.cpp	Fri Feb 19 22:58:54 2010 +0200
+++ b/sysresmonitoring/oommonitor/src/oomrunpluginconfig.cpp	Fri Mar 12 15:43:21 2010 +0200
@@ -18,7 +18,7 @@
 
 #include "oomrunpluginconfig.h"
 #include "oomwindowgrouplist.h"
-#include "oomtraces.h"
+#include "OomTraces.h"
 
 COomRunPluginConfig* COomRunPluginConfig::NewL(TUint aPluginId, TOomPluginType aPluginType)
     {
--- a/sysresmonitoring/oommonitor/src/oomsubscribehelper.cpp	Fri Feb 19 22:58:54 2010 +0200
+++ b/sysresmonitoring/oommonitor/src/oomsubscribehelper.cpp	Fri Mar 12 15:43:21 2010 +0200
@@ -17,7 +17,7 @@
 
 #include <e32property.h>
 #include "oomsubscribehelper.h"
-#include "oomtraces.h"
+#include "OomTraces.h"
 
 // ---------------------------------------------------------
 //
--- a/sysresmonitoring/oommonitor/src/oomwserveventreceiver.cpp	Fri Feb 19 22:58:54 2010 +0200
+++ b/sysresmonitoring/oommonitor/src/oomwserveventreceiver.cpp	Fri Mar 12 15:43:21 2010 +0200
@@ -19,7 +19,7 @@
 #include <apgwgnam.h>
 #include "oomwserveventreceiver.h"
 #include "oommemorymonitor.h"
-#include "oomtraces.h"
+#include "OomTraces.h"
 #include "oomconstants.hrh"
 
 #include "apgwgnam.h"
--- a/sysresmonitoring/oommonitor/tsrc/oomtest/t_oomallocserver/group/t_oomallocclient.mmp	Fri Feb 19 22:58:54 2010 +0200
+++ b/sysresmonitoring/oommonitor/tsrc/oomtest/t_oomallocserver/group/t_oomallocclient.mmp	Fri Mar 12 15:43:21 2010 +0200
@@ -33,7 +33,7 @@
 USERINCLUDE ../../inc
 
 //project server
-sourcepath ..\clisrc\
+sourcepath ../clisrc/
 
 source client.cpp
 
--- a/sysresmonitoring/oommonitor/tsrc/oomtest/t_oomdummyapp/group/bld.inf	Fri Feb 19 22:58:54 2010 +0200
+++ b/sysresmonitoring/oommonitor/tsrc/oomtest/t_oomdummyapp/group/bld.inf	Fri Mar 12 15:43:21 2010 +0200
@@ -25,6 +25,5 @@
 PRJ_TESTMMPFILES
 
 gnumakefile icons_scalable_dc.mk
-//gnumakefile ..\help\build_help.mk 
 
 t_oomdummyapp.mmp
--- a/systemsettings/GSAccessoryPlugin/data/gsaccessoryplugin.rss	Fri Feb 19 22:58:54 2010 +0200
+++ b/systemsettings/GSAccessoryPlugin/data/gsaccessoryplugin.rss	Fri Mar 12 15:43:21 2010 +0200
@@ -68,11 +68,10 @@
             {
             menu_pane = r_gs_menu_item_help;
             },
-    //fix for single click and removing "set as default" from option in menu
-    /*    MENU_TITLE 
+        MENU_TITLE 
             {
             menu_pane = r_acc_menu_item_set_as_default;
-            },*/
+            },
         MENU_TITLE
             {
             menu_pane = r_gs_menu_item_open;
@@ -84,8 +83,7 @@
 // R_ACC_MENU_ITEM_SET_AS_DEFAULT
 //----------------------------------------------------------------------------
 //
-//fix for single click and removing "set as default" from option in menu
-/* RESOURCE MENU_PANE r_acc_menu_item_set_as_default  
+ RESOURCE MENU_PANE r_acc_menu_item_set_as_default  
     {
     items =
         {
@@ -96,7 +94,7 @@
 	    flags = EEikMenuItemSpecific;
             }
         };
-    } */
+    } 
 
 //----------------------------------------------------------------------------
 // R_ACC_MAIN_VIEW_CAPTION