Remerge Symbian Foundation splashscreen changes, including new bitmap from Bug 2414 RCL_3
authorWilliam Roberts <williamr@symbian.org>
Fri, 02 Apr 2010 17:08:57 +0100
branchRCL_3
changeset 18 cf376912743d
parent 17 d440d4c7e9b4 (diff)
parent 16 753ffcc92fb5 (current diff)
child 22 c82a39b81a38
Remerge Symbian Foundation splashscreen changes, including new bitmap from Bug 2414
--- a/appfw/apparchitecture/apfile/apfmimecontentpolicy.cpp	Thu Apr 01 16:44:54 2010 +0100
+++ b/appfw/apparchitecture/apfile/apfmimecontentpolicy.cpp	Fri Apr 02 17:08:57 2010 +0100
@@ -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/apfile/apfmimecontentpolicy.rss	Thu Apr 01 16:44:54 2010 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,79 +0,0 @@
-// Copyright (c) 2002-2009 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"
-// which accompanies this distribution, and is available
-// at the URL "http://www.eclipse.org/legal/epl-v10.html".
-//
-// Initial Contributors:
-// Nokia Corporation - initial contribution.
-//
-// Contributors:
-//
-// Description:
-//
-
-
-
-NAME CCLS
-
-#include <uikon.rh>
-
-RESOURCE RSS_SIGNATURE { }
-
-RESOURCE TBUF { buf=""; }
-
-//----------------------------------------------------
-//    r_commoneng_closed_content_list
-//	  Contains all MIME types in closed content list.	    
-//----------------------------------------------------
-//
-RESOURCE ARRAY r_commoneng_closed_content_list
-    {
-    items=
-        {	
-        LBUF { txt="application/vnd.oma.drm.message"; },
-		LBUF { txt="application/vnd.oma.drm.rights+xml"; },
-		LBUF { txt="application/vnd.oma.drm.rights+wbxml"; },
-		LBUF { txt="application/vnd.nokia.ringing-tone"; },
-		LBUF { txt="audio/amr-wb"; },
-		LBUF { txt="audio/sp-midi"; },
-		LBUF { txt="image/vnd.nok.3Dscreensaver"; },
-		LBUF { txt="image/vnd.nok-wallpaper"; },
-		LBUF { txt="image/vnd.nok-oplogo"; },
-		LBUF { txt="image/vnd.nok-oplogo-color"; },
-		LBUF { txt="application/java"; },
-		LBUF { txt="application/java-archive"; },
-		LBUF { txt="application/x-java-archive"; },
-		LBUF { txt="text/vnd.sun.j2me.app-descriptor"; },
-		LBUF { txt="application/x-NokiaGameData"; },
-		LBUF { txt="application/vnd.symbian.install"; },
-		LBUF { txt="x-epoc/x-sisx-app"; }  
-        };
-    }
-
-//----------------------------------------------------
-//    r_commoneng_closed_extensions_list
-//	  List of closed file extensions.	
-//----------------------------------------------------
-//
-RESOURCE ARRAY r_commoneng_closed_extensions_list
-    {
-    items=
-        {
-		LBUF { txt=".dm"; },
-		LBUF { txt=".dr"; },
-		LBUF { txt=".drc"; },
-		LBUF { txt=".ott"; },
-		LBUF { txt=".awb"; },
-		LBUF { txt=".mid"; },
-		LBUF { txt=".c3d"; },
-		LBUF { txt=".jar"; },
-		LBUF { txt=".ngd"; },
-		LBUF { txt=".sis"; },
-		LBUF { txt=".sisx"; }
-        };
-    }
-
-
-// End of file
--- a/appfw/apparchitecture/aplist/aplapplistitem.cpp	Thu Apr 01 16:44:54 2010 +0100
+++ b/appfw/apparchitecture/aplist/aplapplistitem.cpp	Fri Apr 02 17:08:57 2010 +0100
@@ -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	Thu Apr 01 16:44:54 2010 +0100
+++ b/appfw/apparchitecture/aplist/aplappregfinder.cpp	Fri Apr 02 17:08:57 2010 +0100
@@ -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	Thu Apr 01 16:44:54 2010 +0100
+++ b/appfw/apparchitecture/group/APFILE.MMP	Fri Apr 02 17:08:57 2010 +0100
@@ -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/APGRFX.MMP	Thu Apr 01 16:44:54 2010 +0100
+++ b/appfw/apparchitecture/group/APGRFX.MMP	Fri Apr 02 17:08:57 2010 +0100
@@ -47,6 +47,7 @@
 library         apserv.lib apfile.lib
 
 #ifdef USE_IH_RAISE_EVENT
+APP_LAYER_SYSTEMINCLUDE_SYMBIAN
 LIBRARY			instrumentationhandler.lib
 #endif // USE_IH_RAISE_EVENT
 
--- a/appfw/apparchitecture/group/APLIST.MMP	Thu Apr 01 16:44:54 2010 +0100
+++ b/appfw/apparchitecture/group/APLIST.MMP	Fri Apr 02 17:08:57 2010 +0100
@@ -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"
@@ -62,6 +62,7 @@
 //library         	apserv.lib apfile.lib apparc.lib 
 
 #ifdef USE_IH_RAISE_EVENT
+APP_LAYER_SYSTEMINCLUDE_SYMBIAN
 LIBRARY			instrumentationhandler.lib
 #endif // USE_IH_RAISE_EVENT
 
--- a/appfw/apparchitecture/group/BLD.INF	Thu Apr 01 16:44:54 2010 +0100
+++ b/appfw/apparchitecture/group/BLD.INF	Fri Apr 02 17:08:57 2010 +0100
@@ -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	Thu Apr 01 16:44:54 2010 +0100
+++ b/appfw/apparchitecture/group/apparc.iby	Fri Apr 02 17:08:57 2010 +0100
@@ -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	Thu Apr 01 16:44:54 2010 +0100
+++ b/appfw/apparchitecture/group/apparcTest.iby	Fri Apr 02 17:08:57 2010 +0100
@@ -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	Thu Apr 01 16:44:54 2010 +0100
+++ b/appfw/apparchitecture/tef/scripts/apparctest_t_mimecontentpolicy.script	Fri Apr 02 17:08:57 2010 +0100
@@ -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	Thu Apr 01 16:44:54 2010 +0100
+++ b/appfw/apparchitecture/tef/t_mimecontentpolicystep.cpp	Fri Apr 02 17:08:57 2010 +0100
@@ -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	Thu Apr 01 16:44:54 2010 +0100
+++ b/appfw/apparchitecture/tef/t_mimecontentpolicystep.h	Fri Apr 02 17:08:57 2010 +0100
@@ -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/appfw/uiftestfw/inc/appfwk_test_AppUi.h	Thu Apr 01 16:44:54 2010 +0100
+++ b/appfw/uiftestfw/inc/appfwk_test_AppUi.h	Fri Apr 02 17:08:57 2010 +0100
@@ -1,4 +1,4 @@
-// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2005-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 @@
 
 #include <test/testexecutestepbase.h>
 
-#include "appfwk_tmsteststep.h"
+#include <test/appfwk_tmsteststep.h>
 
 // user panic descriptors
 _LIT(KPanicNullPointer,"Null pointer");
--- a/appsupport_plat/ood_threshold_api/inc/UiklafInternalCRKeys.h	Thu Apr 01 16:44:54 2010 +0100
+++ b/appsupport_plat/ood_threshold_api/inc/UiklafInternalCRKeys.h	Fri Apr 02 17:08:57 2010 +0100
@@ -63,6 +63,13 @@
  */
 const TUint32 KUikOODDiskFreeSpaceWarningNoteLevel = 0x00000006;
 
+/**
+ * Threshold for disk space warning note level for mass memory.
+ * Read-only key. Default value: 20971520
+ */
+const TUint32 KUikOODDiskFreeSpaceWarningNoteLevelMassMemory = 0x00000007;
+
+
 #endif __UIKLAF_INTERNAL_CR_KEYS_H__
 
 // End of file
--- a/commonappservices/alarmserver/ConsoleAlarmAlertServer/Source/ConsoleAlarmAlertSession.cpp	Thu Apr 01 16:44:54 2010 +0100
+++ b/commonappservices/alarmserver/ConsoleAlarmAlertServer/Source/ConsoleAlarmAlertSession.cpp	Fri Apr 02 17:08:57 2010 +0100
@@ -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	Thu Apr 01 16:44:54 2010 +0100
+++ b/commonappservices/alarmserver/Test/group/consolealarmalertserver.mmp	Fri Apr 02 17:08:57 2010 +0100
@@ -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/contenthandling/webrecognisers/group/BLD.INF	Thu Apr 01 16:44:54 2010 +0100
+++ b/contenthandling/webrecognisers/group/BLD.INF	Fri Apr 02 17:08:57 2010 +0100
@@ -24,8 +24,6 @@
 // If there's no destination then the source file will be copied
 // to the same name in /epoc32/include
 
-../eBookmark/ebookmark.doc /epoc32/engdoc/ebookmark/ebookmark.doc
-
 ../group/recognisers.iby /epoc32/rom/include/recognisers.iby
 
 ../waprecogniser/wapmime.h SYMBIAN_MW_LAYER_PLATFORM_EXPORT_PATH(wapmime.h)
--- a/contenthandling/webrecognisers/group/application-protocols_recognisers.mrp	Thu Apr 01 16:44:54 2010 +0100
+++ b/contenthandling/webrecognisers/group/application-protocols_recognisers.mrp	Fri Apr 02 17:08:57 2010 +0100
@@ -2,7 +2,6 @@
 source	\sf\mw\appsupport\contenthandling\webrecognisers
 binary	\sf\mw\appsupport\contenthandling\webrecognisers\group	all
 exports	\sf\mw\appsupport\contenthandling\webrecognisers\group
--export_file	\sf\mw\appsupport\contenthandling\webrecognisers\eBookmark\ebookmark.doc	\epoc32\engdoc\ebookmark\eBookmark.doc
 notes_source	\component_defs\release.src
 
 
--- a/contextframework/cfwplugins/ApplicationStateSourcePlugIn/inc/ApplicationStateSourcePlugin.h	Thu Apr 01 16:44:54 2010 +0100
+++ b/contextframework/cfwplugins/ApplicationStateSourcePlugIn/inc/ApplicationStateSourcePlugin.h	Fri Apr 02 17:08:57 2010 +0100
@@ -29,7 +29,7 @@
 #include <cfcontextsourceplugin.h>
 #include <cfcontextobject.h>
 #include <cenrepnotifyhandler.h>
-#include <w32std.h>
+
 #include <apgwgnam.h>
 #include "cfapplicationstatesettings.h"
 #include "uidorientationpair.h"
@@ -37,22 +37,7 @@
 // FORWARD DECLARATIONS
 class CRepository;
 class CCenRepNotifyHandler;
-// FORWARD DECLARATIONS
-class CWsEventHandler;
 
-NONSHARABLE_CLASS( MWsEventObserver )
-    {
-public:
-
-    /**
-     * Handles window server event.
-     * 
-     * @since S60 5.0
-     * @param aEvent New window server event.
-     * @return None.
-     */
-    virtual void HandleWsEventL( RWsSession& aWsSession ) = 0;    
-    };
 // CLASS DECLARATION
 
 /**
@@ -66,7 +51,7 @@
  */
 NONSHARABLE_CLASS( CApplicationStateSourcePlugIn ): 
 	public CCFContextSourcePlugIn,
-	public MWsEventObserver,
+	public MVwsSessionWrapperObserver,
 	public MCenRepNotifyHandlerCallback
     {
 public: // Constructors and destructor
@@ -91,7 +76,10 @@
     // @see CCFContextSourcePlugIn
     void InitializeL();
 
+public: // From MVwsSessionWrapperObserver
 
+    // @see MVwsSessionWrapperObserver
+    void HandleViewEventL( const TVwsViewEvent& aEvent );
 
 public: // From MCenRepNotifyHandlerCallback
 
@@ -123,7 +111,7 @@
     
     // Initialize the fg application context
     void InitializeFgApplicationL();
-    void HandleWsEventL( RWsSession& aWsSession );
+    
     // Handles the view server event
     void DoHandleViewEventL( const TVwsViewEvent& aEvent );
     
@@ -161,7 +149,7 @@
 
     // Foreground application setting list
     RApplicationStateSettingsPointerArray iApplicationSettings;
-    CWsEventHandler* iWsEventHandler;
+    
     
     // Previous foreground application orientation
     TPtrC iPreviousOrientation;
@@ -178,67 +166,5 @@
     // KCRUidDefaultAppOrientation listener
     CCenRepNotifyHandler* iCRAppOrientationListener;
     };
-/**
- * Listens events from window server and forwards them to observer.
- */
-NONSHARABLE_CLASS( CWsEventHandler ): public CActive
-    {
-public:
 
-    /**
-     * Symbian two phased constructors.
-     *
-     * @since S60 5.0
-     * @param None.
-     * @return CDisplayServiceUILayout
-     */
-    static CWsEventHandler* NewL( MWsEventObserver& aObserver );
-    static CWsEventHandler* NewLC( MWsEventObserver& aObserver );
-
-    /**
-     * C++ destructor.
-     */
-    virtual ~CWsEventHandler();
-    
-public:
-    
-    /**
-     * Start event listening.
-     * 
-     * @since S60 5.0
-     * @param None.
-     * @return None.
-     */
-    void IssueRequest();
-    
-protected:
-    
-    // @see CActive
-    virtual void RunL();
-    
-    // @see CActive
-    virtual void DoCancel(); 
-    
-    // @see CActive
-    virtual TInt RunError( TInt aError ); 
-    
-private:
-
-    CWsEventHandler( MWsEventObserver& aObserver );
-    void ConstructL();
-
-private: // Data
-    
-    /** Observer */
-    MWsEventObserver& iObserver;
-
-    /** Window server session */
-    RWsSession iWsSession;
-    
-    /** Window group for receiving window server events */
-    RWindowGroup* iWindowGroup;
-    
-    /** Window group name to hide it from the task manager */
-    CApaWindowGroupName* iWindowGroupName;
-    };
 #endif // C_APPLICATIONSTATESOURCEPLUGIN_H
--- a/contextframework/cfwplugins/ApplicationStateSourcePlugIn/src/ApplicationStateSourcePlugin.cpp	Thu Apr 01 16:44:54 2010 +0100
+++ b/contextframework/cfwplugins/ApplicationStateSourcePlugIn/src/ApplicationStateSourcePlugin.cpp	Fri Apr 02 17:08:57 2010 +0100
@@ -26,7 +26,6 @@
 #include <apgwgnam.h>
 #include <applicationorientation.h>
 #include <aknappui.h>
-#include <coedef.h>
 #ifdef SYMBIAN_ENABLE_SPLIT_HEADERS
 #include <vwsdefpartner.h>
 #endif
@@ -82,8 +81,7 @@
     iDefaultAppName = KApplicationStateDefaultValue().AllocL();
     iDefaultViewName = KApplicationStateDefaultValue().AllocL();
     iContext = CCFContextObject::NewL();
-    iWsEventHandler = CWsEventHandler::NewL( *this );
-    iWsEventHandler->IssueRequest();
+    
     }
 
 // -----------------------------------------------------------------------------
@@ -133,7 +131,7 @@
     delete iCRAppOrientation;
     iApplicationSettings.ResetAndDestroy();
     delete iSettings;
-    
+    delete iVws;
     delete iDefaultViewName;
     delete iDefaultAppName;
     delete iApplDefaultState;
@@ -225,7 +223,8 @@
         iSettings = NULL;
         }
 
-    
+    iVws = CVwsSessionWrapper::NewL( *this );
+    iVws->NotifyNextActivation();
     }
 
 // -----------------------------------------------------------------------------
@@ -352,7 +351,33 @@
         }
     }
 
+// -----------------------------------------------------------------------------
+// CApplicationStateSourcePlugIn::HandleViewEventL
+// Maps view activations to contexts.
+// -----------------------------------------------------------------------------
+//
+void CApplicationStateSourcePlugIn::HandleViewEventL(
+    const TVwsViewEvent& aEvent )
+    {
+    FUNC_LOG;
 
+    // Renew listening
+    iVws->NotifyNextActivation();
+
+    // Handle the view server event
+    DoHandleViewEventL( aEvent );
+
+    // Log event members!
+    INFO_1( "HandleViewEventL: eventType: [%d]", aEvent.iEventType );
+    
+    INFO_2( "HandleViewEventL: viewOne [appUid:%S] [viewUid%S]",
+        &(const TDesC&)aEvent.iViewOneId.iAppUid.Name(),
+        &(const TDesC&)aEvent.iViewOneId.iViewUid.Name() );
+    
+    INFO_2( "HandleViewEventL: viewTwo [appUid:%S] [viewUid%S]",
+        &(const TDesC&)aEvent.iViewTwoId.iAppUid.Name(),
+        &(const TDesC&)aEvent.iViewTwoId.iViewUid.Name() );
+    }
 
 //------------------------------------------------------------------------------
 // CApplicationStateSourcePlugIn::HandleNotifyGeneric
@@ -720,223 +745,6 @@
         }
     return index;
     }
-void CApplicationStateSourcePlugIn::HandleWsEventL( RWsSession& aWsSession )
-	{
-	TUid appUid( TUid::Null() );
-    TPtrC bgApp( *iDefaultAppName );
-    TPtrC fgApp( *iDefaultAppName );
-    TPtrC fgView( *iDefaultViewName );
-
-	TInt focWndGrp( aWsSession.GetFocusWindowGroup() );
-    CApaWindowGroupName* wndGrpName = CApaWindowGroupName::NewL( aWsSession );
-    CleanupStack::PushL( wndGrpName );
-    wndGrpName->ConstructFromWgIdL( focWndGrp );
-    appUid = wndGrpName->AppUid();
-
-    for ( TInt i = 0; i < iApplicationSettings.Count(); ++i )
-        {
-        CCFApplicationStateSettings* appSettings = iApplicationSettings[ i ];
-        if ( appUid == appSettings->Uid() )
-            {
-            fgApp.Set( appSettings->Name() );
-            appSettings->GetViewName( appUid, fgView );
-            bgApp.Set( iPreviousForegroundApplication );
-            break;
-            }
-        }
-    TBool publishFgApp( EFalse );
-    TBool publishFgView( EFalse );
-    TBool publishBgApp( EFalse );
-
-    if ( iPreviousForegroundApplication.Compare( fgApp ) != 0 )
-        {
-        publishFgApp = ETrue;
-        }
-    else if ( iPreviousForegroundView.Compare( fgView ) != 0 )
-        {
-        publishFgView = ETrue;
-        }
-
-    if ( bgApp != fgApp )
-        {
-        publishBgApp = ETrue;
-        }
-
-    iPreviousForegroundApplication.Set( fgApp ); // Store for next round
-    iPreviousForegroundView.Set( fgView );
-
-   RThread thread;
-
-    if ( publishFgApp )
-        {
-        iContext->SetTypeL( KApplicationStateForegroundApplicationType );
-        iContext->SetValueL( fgApp );
-        iCF.PublishContext( *iContext, thread );
-        }
-
-    if ( publishFgApp || publishFgView )
-        {
-        iContext->SetTypeL( KApplicationStateForegroundApplicationViewType );
-        iContext->SetValueL( fgView );
-        iCF.PublishContext( *iContext, thread );
-        }
-
-    if ( publishBgApp )
-        {
-        iContext->SetTypeL( KApplicationStateBackgroundApplicationType );
-        iContext->SetValueL( bgApp );
-        iCF.PublishContext( *iContext, thread );
-        }
-	
-	thread.Close();
-    CleanupStack::PopAndDestroy( wndGrpName );
-
-	}
-
-// ======================== CWsEventHandler ========================
-
-// ---------------------------------------------------------------------------
-// C++ constructor.
-// ---------------------------------------------------------------------------
-//
-CWsEventHandler::CWsEventHandler( MWsEventObserver& aObserver ):
-    CActive( CActive::EPriorityStandard ),
-    iObserver( aObserver )
-    {
-    CActiveScheduler::Add( this );
-    }
-
-// ---------------------------------------------------------------------------
-// Symbian 2nd phase constructor.
-// ---------------------------------------------------------------------------
-//
-void CWsEventHandler::ConstructL()
-    {
-    // Connect to window server server
-    User::LeaveIfError( iWsSession.Connect() );
-    
-    // Construct window group
-    iWindowGroup = new( ELeave ) RWindowGroup( iWsSession );
-    User::LeaveIfError( iWindowGroup->Construct( (TUint32)this, EFalse ) );
-    User::LeaveIfError( iWindowGroup->EnableGroupChangeEvents() );
-    iWindowGroup->SetOrdinalPosition( 0, ECoeWinPriorityNeverAtFront );
-    iWindowGroup->EnableReceiptOfFocus( EFalse );
-    
-    // Hide the invisible window from the task manager
-    iWindowGroupName = CApaWindowGroupName::NewL( iWsSession );
-    iWindowGroupName->SetHidden( ETrue );
-    iWindowGroupName->SetWindowGroupName( *iWindowGroup );
-
-    }
-// ---------------------------------------------------------------------------
-// Symbian two phased constructor.
-// ---------------------------------------------------------------------------
-//
-CWsEventHandler* CWsEventHandler::NewL( MWsEventObserver& aObserver )
-    {
-    CWsEventHandler* self = CWsEventHandler::NewLC( aObserver );
-    CleanupStack::Pop( self );
-    
-    return self;
-    }
-
-// ---------------------------------------------------------------------------
-// Symbian two phased constructor.
-// Leaves pointer in the cleanup stack.
-// ---------------------------------------------------------------------------
-//
-CWsEventHandler* CWsEventHandler::NewLC( MWsEventObserver& aObserver )
-    {
-    CWsEventHandler* self = new ( ELeave ) CWsEventHandler( aObserver );
-    CleanupStack::PushL( self );
-    self->ConstructL();
-    
-    return self;
-    }
-
-// ---------------------------------------------------------------------------
-// C++ destructor.
-// ---------------------------------------------------------------------------
-//
-CWsEventHandler::~CWsEventHandler()
-    {
-    Cancel();
-        
-    // Cleanup window group name
-    delete iWindowGroupName;
-       
-    // Cleanup window group
-    if( iWindowGroup )
-        {
-        iWindowGroup->DisableGroupChangeEvents();
-        iWindowGroup->Close();
-        delete iWindowGroup;
-        }
-    
-    // Cleanup window server session
-    iWsSession.Close();
-    }
-
-//------------------------------------------------------------------------------
-// CWsEventHandler::IssueRequest
-//------------------------------------------------------------------------------
-//
-void CWsEventHandler::IssueRequest()
-    {
-    // Request events from window server
-    iWsSession.EventReady( &iStatus );
-    SetActive();
-    }
 
 
-//------------------------------------------------------------------------------
-// CWsEventHandler::RunL
-//------------------------------------------------------------------------------
-//
-void CWsEventHandler::RunL()
-    {
-    TInt err = iStatus.Int();
-    if( err == KErrNone )
-        {
-        // No errors occured, fetch event
-        TWsEvent wsEvent;
-        iWsSession.GetEvent( wsEvent );
-        
-        // Continue listening
-        IssueRequest();
-		switch (wsEvent.Type()) 
-			{
-		case EEventWindowGroupsChanged :
-	       // Forward event to observer
-	       iObserver.HandleWsEventL( iWsSession );
-			break;
-		default:
-			break;
-			}
-        }
-    }
-
-//------------------------------------------------------------------------------
-// CWsEventHandler::DoCancel
-//------------------------------------------------------------------------------
-//
-void CWsEventHandler::DoCancel()
-    {
-    // Cancel event ready from window server
-    iWsSession.EventReadyCancel();
-    }
-
-//------------------------------------------------------------------------------
-// CWsEventHandler::RunError
-//------------------------------------------------------------------------------
-//
-TInt CWsEventHandler::RunError( TInt /*aError*/ )
-    {
-    // Issue a new request, other error handling is not performed since the
-    // problem has occured in the observer code
-    IssueRequest();
-    
-    return KErrNone;
-    }
-
 	
--- a/coreapplicationuis/ATCmdPlugin/data/2001A273.rss	Thu Apr 01 16:44:54 2010 +0100
+++ b/coreapplicationuis/ATCmdPlugin/data/2001A273.rss	Fri Apr 02 17:08:57 2010 +0100
@@ -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/ATCmdPlugin/src/atcmdplugin.cpp	Thu Apr 01 16:44:54 2010 +0100
+++ b/coreapplicationuis/ATCmdPlugin/src/atcmdplugin.cpp	Fri Apr 02 17:08:57 2010 +0100
@@ -17,7 +17,7 @@
 
 
 // INCLUDES
-#include <HWRMLightDomainCRKeys.h>
+#include <hwrmlightdomaincrkeys.h>
 #include <coreapplicationuisdomainpskeys.h>
 #include <hal.h>
 #include <atcmdpluginresource.rsg>
--- a/coreapplicationuis/SysAp/Inc/SysApAppUi.h	Thu Apr 01 16:44:54 2010 +0100
+++ b/coreapplicationuis/SysAp/Inc/SysApAppUi.h	Fri Apr 02 17:08:57 2010 +0100
@@ -525,6 +525,13 @@
         * @return void
         */
         void ConstructL();
+	
+	    /**
+        * Deactivate PSM on reboot if battery level is above threshold value.
+        * @param None
+        * @return void
+        */
+	    void DeactivatePSMifBatteryNotLowL();
 
     private:
 
@@ -1425,7 +1432,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 +1670,17 @@
         */
         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;
+ 
+    //Offset of profile-related menu items in power key menu
+    TInt iProfileItemsOffset;
     };
 
 #endif      // SYSAPAPPUI_H
--- a/coreapplicationuis/SysAp/Inc/SysApFeatureManager.h	Thu Apr 01 16:44:54 2010 +0100
+++ b/coreapplicationuis/SysAp/Inc/SysApFeatureManager.h	Fri Apr 02 17:08:57 2010 +0100
@@ -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/Inc/sysapbatteryinfocontroller.h	Thu Apr 01 16:44:54 2010 +0100
+++ b/coreapplicationuis/SysAp/Inc/sysapbatteryinfocontroller.h	Fri Apr 02 17:08:57 2010 +0100
@@ -101,6 +101,12 @@
      */
      void BatteryStatusUpdated( const TInt aValue );
 
+     /**
+     * Check if battery status is above the threshold level 
+     *
+     */
+     TBool IsBatteryInfoAboveThreshold() const;
+
 private:
 
     /**
--- a/coreapplicationuis/SysAp/Src/SysApAppUi.cpp	Thu Apr 01 16:44:54 2010 +0100
+++ b/coreapplicationuis/SysAp/Src/SysApAppUi.cpp	Fri Apr 02 17:08:57 2010 +0100
@@ -264,8 +264,7 @@
     BaseConstructL( EAknEnableSkin );
     TRACES( RDebug::Print( _L("CSysApAppUi::ConstructL: BaseConstructL() OK") ) );
     
-    iFlagForRmvMmcFrmShortPwrKey = EFalse;
-
+ 
     /*SysAp is set as system application (Symbian terminology). This means some special privilege compared
       to other applications. For example it does not get closed when system is asked to close applications
     */
@@ -347,7 +346,8 @@
 
     // Define P&S keys "owned" by SysAp
     RProperty::Define( KPSUidUikon, KUikMMCInserted, RProperty::EInt, KAlwaysPassPolicy, KWriteDeviceDataPolicy );
-    
+    //initially set the value as 0 assuming mmc is not inserted
+    RProperty::Set( KPSUidUikon, KUikMMCInserted, 0 );
     TDriveInfo driveInfo;
     TInt driveNumber; 
     TInt err;    
@@ -355,11 +355,11 @@
     for ( driveNumber = EDriveD; driveNumber < EDriveZ; driveNumber++ )
          {
 	  err = fileServer.Drive(driveInfo,driveNumber);
-          if(err == KErrNone && driveInfo.iType == EMediaHardDisk &&  driveInfo.iDriveAtt & KDriveAttRemovable)     
+          if(driveNumber==EDriveF && err == KErrNone && driveInfo.iType == EMediaHardDisk &&  driveInfo.iDriveAtt & KDriveAttRemovable)     
         	{     
-        	TRACES( RDebug::Print( _L("CSysApAppUi::ConstructL: err = %d, driveInfo.iType = %d, driveInfo.iDriveAtt %d, KDriveAttRemovable = %d "),err,driveInfo.iType,driveInfo.iDriveAtt,KDriveAttRemovable) );     
+          TRACES( RDebug::Print( _L("CSysApAppUi::ConstructL: err = %d, driveInfo.iType = %d, driveInfo.iDriveAtt %d, KDriveAttRemovable = %d "),err,driveInfo.iType,driveInfo.iDriveAtt,KDriveAttRemovable) );     
         	RProperty::Set( KPSUidUikon, KUikMMCInserted, 1 );
-                break;  // Memory card drive found...     
+               break;  // Memory card drive found...     
       		}
          } 
 
@@ -485,10 +485,48 @@
     // Create HAC setting observer now because telephony state may change before entering to normal state
     TRACES( RDebug::Print( _L("CCSysApAppUi::ConstructL  trying CSysApCenRepHacSettingObserver::NewL") ) );
     iSysApCenRepHacSettingObserver = CSysApCenRepHacSettingObserver::NewL( *this );
-
+    
+    DeactivatePSMifBatteryNotLowL ();
+    
     TRACES( RDebug::Print( _L("CSysApAppUi::ConstructL: END") ) );
     }
 
+
+// ----------------------------------------------------------------------------
+// CSysApAppUi::DeactivatePSMifBatteryNotLow()
+// ----------------------------------------------------------------------------
+ void CSysApAppUi::DeactivatePSMifBatteryNotLowL ()
+    {
+    TRACES( RDebug::Print( _L("CSysApAppUi::DeactivatePSMifBatteryNotLow: Start") ) );
+    if ( iSysApFeatureManager->PowerSaveSupported()) //&& iSysApFeatureManager->Supported( KSysApFeatureIdBatteryInfoPopup ))
+        {
+        // Create batteruInfoController to get current battery status;
+	if(iSysApBatteryInfoController == NULL)
+	    {
+	    iSysApBatteryInfoController = CSysApBatteryInfoController::NewL( 
+                                                        iSysApCenRepController->GetInt( 
+                                                                KCRUidCoreApplicationUIsConf,
+                                                                KCoreAppUIsBatteryInformationLowThreshold ) );
+	    }
+        //Querry the battery level 
+        TBool status = iSysApBatteryInfoController->IsBatteryInfoAboveThreshold();
+        TRACES( RDebug::Print( _L("CCSysApAppUi::DeactivatePSMifBatteryNotLow  IsBatteryInfoAboveThreshold=%d"), status ) );
+        // Querry to deactivate PSM if PSM is activated and battery status is above threshold
+        if (status)
+            {
+			if(iSysApPsmController == NULL)
+				{
+				iSysApPsmController = CSysApPsmController::NewL( *this );
+				}
+            if ( iSysApPsmController->ShowDeactivateQuery())
+                ShowQueryL( ESysApBattChargingPowerSavingQuery );
+            else
+                iSysApPsmController->DoEnablePartialPsm( EFalse );
+            }
+        }
+    TRACES( RDebug::Print( _L("CSysApAppUi::DeactivatePSMifBatteryNotLow: End") ) );
+    } 
+
 // ----------------------------------------------------------------------------
 // CSysApAppUi::~CSysApAppUi()
 // ----------------------------------------------------------------------------
@@ -620,6 +658,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 +683,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 +699,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 +730,49 @@
                     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  
+                 && ( aKeyEvent.iScanCode == EStdKeyDevice2 ) )
                 {
-                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();	
-                                }                            
                             }
                         }
                     }
-
                 }
             }
 
@@ -1269,7 +1341,6 @@
 void CSysApAppUi::ShowUiNoteL( const TSysApNoteIds aNote ) const
     {
     TRACES( RDebug::Print( _L("CSysApAppUi::ShowUiNoteL aNote: %d"), aNote ) );
-
     TInt tone( EAvkonSIDNoSound );
     TAknGlobalNoteType noteType( EAknGlobalBatteryLowNote );
     CAknGlobalNote* note = CAknGlobalNote::NewLC();
@@ -1368,7 +1439,7 @@
             tone = EAvkonSIDInformationTone;
             break;
         case EPowerSaveModeActivated:
-            noteType = EAknGlobalConfirmationNote;
+        		noteType = EAknGlobalConfirmationNote;
             tone = EAvkonSIDConfirmationTone;
             secondaryDisplayId = SecondaryDisplay::ECmdShowPowerSavingActivatedNote;
             break;
@@ -1475,11 +1546,11 @@
                 break;
                 }
             case EPowerSaveModeActivated:
-                noteStringBuf = StringLoader::LoadLC( R_QTN_POWER_SAVING_ACTIVATED_CONF_NOTE, iEikonEnv );
-                break;
+                noteStringBuf = StringLoader::LoadLC( R_QTN_POWER_SAVING_ACTIVATED_CONF_NOTE,  iEikonEnv );
+                 break;
             case EPowerSaveModeDeactivated:
-                noteStringBuf = StringLoader::LoadLC( R_QTN_POWER_SAVING_DEACTIVATED_CONF_NOTE, iEikonEnv );
-                break;
+                noteStringBuf = StringLoader::LoadLC( R_QTN_POWER_SAVING_DEACTIVATED_CONF_NOTE,  iEikonEnv );
+                 break;
             case ECannotActivatePowerSaveMode:
                 noteStringBuf = StringLoader::LoadLC( R_QTN_POWER_SAVING_FAILED_WARNING_NOTE, iEikonEnv );
                 break;
@@ -3510,6 +3581,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 +3726,7 @@
         profileNameCDesCArray->Reset();
         HBufC* itemStringBuf;
 
-        TInt powerMenuItemIndex( 0 );
+        TInt powerMenuItemIndex = 0;
 
         // "Switch off" menu item
         if ( !IsEncryptionOperationOngoingL() )
@@ -3630,16 +3784,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 +3813,8 @@
             }
 
         // Profile menu items
-
-        TInt arrayIndex ( 0 );
+        iProfileItemsOffset = powerMenuItemIndex;
+        TInt arrayIndex( 0 );
         TBufC<KMaxProfileNameLength> profileName;
 
         for ( arrayIndex = 0; arrayIndex < iNumberOfProfileNamesInPowerKeyMenu; arrayIndex++ )
@@ -3698,76 +3855,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 +3941,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 +3981,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() )
@@ -3914,7 +4006,6 @@
                 _L( "CSysApAppUi::PowerKeyPopUpMenuSelectionDoneL: \"Eject\" selected, drive=%d" ),
                 iDriveToEject ) );
             iSysApDriveList->ResetDrivesToEject();
-            iFlagForRmvMmcFrmShortPwrKey = ETrue;
             RProperty::Set( KPSUidUikon, KUikMMCInserted, 0 );
             EjectMMCL();
             }
@@ -3929,6 +4020,8 @@
 
     delete iProfileNamesArray;
     iProfileNamesArray = NULL;
+    delete iGlobalListQuery;
+    iGlobalListQuery = NULL;
 
     TRACES( RDebug::Print(_L("CSysApAppUi::PowerKeyPopUpMenuSelectionDoneL: END" ) ) );
     }
@@ -4884,8 +4977,11 @@
     
     if ( iSysApFeatureManager->Supported( KSysApFeatureIdBatteryInfoPopup ) )
         {
-        iSysApBatteryInfoController = CSysApBatteryInfoController::NewL( iSysApCenRepController->GetInt( KCRUidCoreApplicationUIsConf, 
+		if( iSysApBatteryInfoController == NULL)
+            {
+			iSysApBatteryInfoController = CSysApBatteryInfoController::NewL( iSysApCenRepController->GetInt( KCRUidCoreApplicationUIsConf, 
                                                                                                      KCoreAppUIsBatteryInformationLowThreshold ) );    
+	    	}
         }
     
 
@@ -5434,11 +5530,7 @@
                     {
                     if ( memoryCardStatus == ESysApMemoryCardInserted )
                         {
-                        if(!iFlagForRmvMmcFrmShortPwrKey)
-                        	{
-                        	RProperty::Set( KPSUidUikon, KUikMMCInserted, 1 );
-                      		}
-                      		iFlagForRmvMmcFrmShortPwrKey = EFalse;
+                       	RProperty::Set( KPSUidUikon, KUikMMCInserted, 1 );
                         }
                     else
                         {
@@ -6605,13 +6697,13 @@
     // cancel any active power saving query because user has changed the state manually
     CancelQuery( ESysApBattChargingPowerSavingQuery );
     CancelQuery( ESysApBattLowPowerSavingQuery );
-    
+
     switch ( aStatus )
         {
         case MSysApPsmControllerNotifyCallback::EPsmActivationComplete:
             UpdateBatteryBarsL( StateOfProperty( KPSUidHWRMPowerState, KHWRMBatteryLevel ) );
             ShowUiNoteL( EPowerSaveModeActivated );
-            break;
+           break;
         
         case MSysApPsmControllerNotifyCallback::EPsmDeactivationComplete:
             UpdateBatteryBarsL( StateOfProperty( KPSUidHWRMPowerState, KHWRMBatteryLevel ) );
--- a/coreapplicationuis/SysAp/Src/SysApFeatureManager.cpp	Thu Apr 01 16:44:54 2010 +0100
+++ b/coreapplicationuis/SysAp/Src/SysApFeatureManager.cpp	Fri Apr 02 17:08:57 2010 +0100
@@ -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/sysapbatteryinfocontroller.cpp	Thu Apr 01 16:44:54 2010 +0100
+++ b/coreapplicationuis/SysAp/Src/sysapbatteryinfocontroller.cpp	Fri Apr 02 17:08:57 2010 +0100
@@ -218,3 +218,13 @@
     User::LeaveIfError( err );
     }
 
+
+// ---------------------------------------------------------------------------
+// CSysApBatteryInfoController::IsBatteryInfoAboveThreshold
+// ---------------------------------------------------------------------------
+//
+TBool CSysApBatteryInfoController::IsBatteryInfoAboveThreshold() const
+        {
+        TInt capacity = iBsUtil->GetBatteryCapacity();
+        return ((capacity <= iThresholdCapacity ? EBatteryInfoBelowThreshold : EBatteryInfoAboveThreshold) == EBatteryInfoAboveThreshold);
+        }
--- a/coreapplicationuis/SysAp/Src/sysapdefaultkeyhandler.cpp	Thu Apr 01 16:44:54 2010 +0100
+++ b/coreapplicationuis/SysAp/Src/sysapdefaultkeyhandler.cpp	Fri Apr 02 17:08:57 2010 +0100
@@ -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	Thu Apr 01 16:44:54 2010 +0100
+++ b/coreapplicationuis/advancedtspcontroller/data/keyevent.rul	Fri Apr 02 17:08:57 2010 +0100
@@ -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	Thu Apr 01 16:44:54 2010 +0100
+++ b/coreapplicationuis/advancedtspcontroller/tsrc/mt_atspc/group/envrecall.cmd	Fri Apr 02 17:08:57 2010 +0100
@@ -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	Thu Apr 01 16:44:54 2010 +0100
+++ b/coreapplicationuis/advancedtspcontroller/tsrc/mt_atspc/group/envsetup.cmd	Fri Apr 02 17:08:57 2010 +0100
@@ -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	Thu Apr 01 16:44:54 2010 +0100
+++ b/coreapplicationuis/advancedtspcontroller/tsrc/mt_atspc/group/mt_atspc.mmp	Fri Apr 02 17:08:57 2010 +0100
@@ -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	Thu Apr 01 16:44:54 2010 +0100
+++ b/coreapplicationuis/advancedtspcontroller/tsrc/mt_atspc/inc/mt_atspc.h	Fri Apr 02 17:08:57 2010 +0100
@@ -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	Thu Apr 01 16:44:54 2010 +0100
+++ b/coreapplicationuis/powersaveutilities/batterypopupcontrol/src/batterypopupcontrol.cpp	Fri Apr 02 17:08:57 2010 +0100
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2007 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"
@@ -287,46 +287,63 @@
 //
 void CBatteryPopupControl::Draw( const TRect& /*aRect*/ ) const
     {
-    FUNC_LOG
+   FUNC_LOG
       	
     CWindowGc& gc = SystemGc();
     MAknsSkinInstance* skin = AknsUtils::SkinInstance();
-    
+
     if( iIcon )
         {
-        CFbsBitmap* bmp = NULL;
         TRgb color( KRgbWhite ); // Default never used
-        bmp = AknsUtils::GetCachedBitmap( skin, KAknsIIDQsnComponentColorBmpCG2 );
+        
         AknsUtils::GetCachedColor( skin, color, 
-            KAknsIIDQsnComponentColors, EAknsCIQsnComponentColorsCG2 );
-
-        AknIconUtils::SetSize( iIcon->Mask(), iBitmapLayout.Rect().Size() );
-        if ( bmp )
-            {
-            iBitmapLayout.DrawImage( gc, bmp, iIcon->Mask() );
-            }
-        else
+                KAknsIIDQsnIconColors, EAknsCIQsnIconColorsCG6  );
+        
+        if (AknIconUtils::IsMifIcon(iIcon->Bitmap()))
             {
-            AknIconUtils::SetSize( iIcon->Bitmap(), iBitmapLayout.Rect().Size() );     
-            bmp = iIcon->Bitmap();
-            iBitmapLayout.DrawImage( gc, bmp, iIcon->Mask() );
+            AknIconUtils::SetIconColor( iIcon->Bitmap(), color );
             }
-        gc.Reset(); 
+
+        AknIconUtils::SetSize( iIcon->Bitmap(), iBitmapLayout.Rect().Size() );
+        iBitmapLayout.DrawImage( gc, iIcon->Bitmap(), iIcon->Mask() );
+
+        gc.Reset();
         }
-    TRgb textColor;
-    AknsUtils::GetCachedColor( skin, textColor, KAknsIIDQsnHighlightColors,
-                               EAknsCIQsnHighlightColorsCG3 );
-
-    gc.SetPenStyle( CGraphicsContext::ESolidPen ); 
-    gc.SetPenColor( textColor );
-
+    
+    gc.SetPenStyle( CGraphicsContext::ESolidPen );
     const CFont* font = iFont;
     if ( !font )
         {
         font = iCoeEnv->NormalFont();
         }
     gc.UseFont( font );
+        
+    if(iText)
+        {
+        TRect rect( iLinkRect );
+        TRgb textContentColor;
+        TInt err = AknsUtils::GetCachedColor( skin, textContentColor, KAknsIIDQsnTextColors, EAknsCIQsnTextColorsCG6 );
+        
+        if (!err)
+            {
+            TRAP_IGNORE( AknLayoutUtils::OverrideControlColorL( *iText,
+                    EColorLabelText, textContentColor ) );
+            }
+        
+        gc.SetPenColor( textContentColor );
+         
+        TInt textBaseLineOffset = 0;
+        textBaseLineOffset = (rect.Height() - font->FontMaxHeight())/2;
+        gc.DrawText( *(iText->Text()), rect, textBaseLineOffset, CGraphicsContext::ELeft );
+        //gc.Reset();
+       
+        }
+    
+    TRgb textColor;
+    AknsUtils::GetCachedColor( skin, textColor, KAknsIIDQsnHighlightColors,
+                               EAknsCIQsnHighlightColorsCG3 );
 
+    gc.SetPenColor( textColor );
     gc.SetUnderlineStyle( EUnderlineOn );
     if(iLinkText)
         {
@@ -557,7 +574,15 @@
                 iHighlightedItem = EFalse; 
                 }
             }
-				}
+        else
+            {
+            if ( iHighlightedItem )
+                {         
+                iHighlightedItem = EFalse;             
+                DrawNow( iLinkRect );
+                }
+            }
+        }
     }
 // -----------------------------------------------------------------------------
 // CBatteryPopupControl::CreateIconL()
--- a/coreapplicationuis/rfsplugins/FormatterRFSPlugin/src/formatterrfsplugin.cpp	Thu Apr 01 16:44:54 2010 +0100
+++ b/coreapplicationuis/rfsplugins/FormatterRFSPlugin/src/formatterrfsplugin.cpp	Fri Apr 02 17:08:57 2010 +0100
@@ -1,5 +1,5 @@
 /*
-* 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"
@@ -44,66 +44,76 @@
 //
 static void FileWriteL(RPointerArray<HBufC> &files)
     {
-    RFs iFs;
-    RFile iFile;
-    User::LeaveIfError(iFs.Connect());
-    TInt err = iFile.Open(iFs,_L("c:\\private\\100059C9\\excludelistcache.txt"),EFileWrite);
-
+    RFs fileSession;
+    RFile file;
+    User::LeaveIfError(fileSession.Connect());
+    TInt err = file.Open(fileSession,_L("c:\\private\\100059C9\\excludelistcache.txt"),EFileWrite|EFileStreamText);
+        
     if ( err != KErrNone )
         {
         RDebug::Print(_L("CFormatterRFSPlugin::ExcludeListNameL , FileWrite : Failed to open the file"));
         return;
         }
-    TBuf8 <1> newLine;
-    newLine.Append('\n');
+
     TInt pos = 0;
-    iFile.Seek(ESeekEnd,pos);
+    file.Seek(ESeekEnd,pos);
     TInt size = files.Count();
+    RBuf filenameBuf;
+
     for ( TInt i=0; i < size; i++)
         {
         HBufC8* fileName = HBufC8::NewLC(files[i]->Size());
         TPtr8 fileNamePtr(fileName->Des());
         fileNamePtr.Copy(*files[i]);
-        iFile.Write(*fileName);
-        iFile.Write(newLine);
+
+        filenameBuf.Create(fileNamePtr.Length());
+        filenameBuf.Copy(fileNamePtr);
+        TFileText fileText ;
+        fileText.Set(file) ;
+        fileText.Seek(ESeekStart);
+        fileText.Write(filenameBuf);
         CleanupStack::PopAndDestroy();//Filename
-        iFile.Flush();
+        file.Flush();
         }
-    iFile.Close();
-    iFs.Close();
-    
+
+    file.Close();
+    fileSession.Close();    
     }
 
 static void MergeFilesL()
     {
     
-    RFs iSession;
-    RFile iExclude;
+    RFs fileSession;
+    RFile excludeFileName;
     
-    RFs iFs;
-    RFile iFile;
+    RFile fileName;
     TInt pos = 0;
     TInt size_of_script( 0 );
     TInt buffer_size( sizeof(TText) );
     TInt number_of_chars;
     
-    User::LeaveIfError(iSession.Connect());
-    TInt ret = iExclude.Open(iSession,_L("c:\\private\\100059C9\\excludelist.txt"),EFileRead);
+    User::LeaveIfError(fileSession.Connect());
+    TInt ret = excludeFileName.Open(fileSession,_L("c:\\private\\100059C9\\excludelist.txt"),EFileRead);
 
-    User::LeaveIfError(iFs.Connect());
-    TInt err1 = iFile.Open(iFs,_L("c:\\private\\100059C9\\excludelistcache.txt"),EFileWrite);
-    
-    iFile.Seek(ESeekEnd,pos);
-    if ( ret != KErrNone || err1 != KErrNone)
+		if(ret != KErrNone)
+			{
+			RDebug::Print(_L("CFormatterRFSPlugin::ExcludeListNameL , MergeFiles : Failed to open the file"));
+			return;
+			}
+    ret = fileName.Open(fileSession,_L("c:\\private\\100059C9\\excludelistcache.txt"),EFileWrite|EFileStreamText);
+    if ( ret != KErrNone)
             {
+            excludeFileName.Close();
             RDebug::Print(_L("CFormatterRFSPlugin::ExcludeListNameL , MergeFiles : Failed to open the file"));
             return;
             }
+    fileName.Seek(ESeekEnd,pos);
+    
     HBufC* buffer = HBufC::NewMaxLC( buffer_size );        
     TPtr8 bufferPtr( (TUint8*)buffer->Ptr(), buffer_size);
     
     TInt err(0);
-    err = iExclude.Size( size_of_script );
+    err = excludeFileName.Size( size_of_script );
     number_of_chars = size_of_script / sizeof(TText);
 
     TInt i(0);
@@ -111,51 +121,48 @@
        {
        if ( err == KErrNone )
             {
-            err = iExclude.Read( bufferPtr);                
+            err = excludeFileName.Read( bufferPtr);                
             }
-        iFile.Write(bufferPtr);
+        fileName.Write(bufferPtr);
         }
-    iFile.Flush();
-    iFile.Close();
-    iFs.Close();
+    fileName.Flush();
+    fileName.Close();
     
-    iExclude.Close();
-    iSession.Close();
+    excludeFileName.Close();
+    fileSession.Close();
+    CleanupStack::PopAndDestroy();//buffer
 
-    CleanupStack::PopAndDestroy();//buffer
-    
     }
 
 static HBufC* ExcludeListNameL( TChar aSystemDrive )
     {
     FUNC_LOG;
-
+		
     RDebug::Print(_L("CFormatterRFSPlugin::ExcludeListNameL"));
     
-    RFs iFs;
-    RFile iFile;
+    RFs fileSession;
+    RFile file;
     
     _LIT8(KFileName, "c:\\private\\100059C9\\excludelistcache.txt\n");
     TBuf8 <50> fileName;
     fileName.Copy(KFileName);
 
-    User::LeaveIfError(iFs.Connect());
+    User::LeaveIfError(fileSession.Connect());
     
     RDir dir;
-    if(dir.Open(iFs,_L("c:\\private\\100059C9\\"),KEntryAttNormal) != KErrNone)
+    if(dir.Open(fileSession,_L("c:\\private\\100059C9\\"),KEntryAttNormal) != KErrNone)
         {
-        iFs.MkDir(_L("c:\\private\\100059C9\\"));
+        User::LeaveIfError(fileSession.MkDir(_L("c:\\private\\100059C9\\")));
         }
     
-    TInt rev = iFile.Replace(iFs,_L("c:\\private\\100059C9\\excludelistcache.txt"),EFileWrite);
+    TInt rev = file.Replace(fileSession,_L("c:\\private\\100059C9\\excludelistcache.txt"),EFileWrite|EFileStreamText);
     
     RDebug::Print(_L("CFormatterRFSPlugin::ExcludeListNameL, Replace returned %d"),rev);
     
-    iFile.Write(fileName);
-    iFile.Flush();
-    iFile.Close();
-    iFs.Close();
-    
+    file.Flush();
+    file.Close();
+    fileSession.Close();
+    dir.Close();
     Swi::RSisRegistrySession session;
     CleanupClosePushL(session);
     User::LeaveIfError(session.Connect());
@@ -171,76 +178,97 @@
     CleanupClosePushL(entry);
     CleanupClosePushL(entry2);
     
-    
-    //No issues until here
-    RPointerArray<HBufC> allfiles;
+    RPointerArray<HBufC> registryFiles;
+    RPointerArray<HBufC> augmentedRegistryFiles;
     RPointerArray<HBufC> nonRemovableFiles;
     RPointerArray<HBufC> nonRemovableAugmentedFiles;
-    CleanupResetAndDestroyPushL(allfiles);
+    CleanupResetAndDestroyPushL(registryFiles);
+    CleanupResetAndDestroyPushL(augmentedRegistryFiles);
     CleanupResetAndDestroyPushL(nonRemovableFiles);
     CleanupResetAndDestroyPushL(nonRemovableAugmentedFiles);
     
-    //Logic starts
-    TInt count;
-    RPointerArray<Swi::CSisRegistryPackage> augmentationPackages;
-    CleanupResetAndDestroyPushL(augmentationPackages);
-    for ( TInt iter=0; iter<uidcount; iter++)
-        {
-        User::LeaveIfError(entry.Open(session,uids[iter]));
-        if(EFalse == entry.RemovableL())
-            {
-            entry.FilesL(nonRemovableFiles);
-            TInt fileCount = nonRemovableFiles.Count(); 
-            for (TInt z=fileCount-1; z>=0;z--)
-                {
-                TPtr firstChar(nonRemovableFiles[z]->Des());
-                if(firstChar.Mid(0,1) == _L("z"))
-                    {
-                    delete nonRemovableFiles[z];
-                    nonRemovableFiles.Remove(z);
-                    }
-                }
-            // Look for augmentations.
-            if(entry.IsAugmentationL())
-                {
-                entry.AugmentationsL(augmentationPackages);
-                count = entry.AugmentationsNumberL();
-                for (TInt i=0; i < count; ++i)
-                    {
-                    User::LeaveIfError(entry2.OpenL(session,*augmentationPackages[i]));
-                    if(EFalse == entry2.RemovableL())
-                        {
-                        entry2.FilesL(nonRemovableAugmentedFiles);
-                        for (TInt c=0; c<nonRemovableAugmentedFiles.Count();c++)
-                              {
-                              TPtr firstChar(nonRemovableAugmentedFiles[c]->Des());
-                              if(firstChar.Mid(0,1) == _L("z"))
-                                  {
-                                  delete nonRemovableAugmentedFiles[c];
-                                  nonRemovableAugmentedFiles.Remove(c);
-                                  }
-                              }
-                        }
-                    entry2.Close();
-                    }
-                }
-            }
-        entry.Close();
-        }
-    RDebug::Print(_L("CFormatterRFSPlugin::ExcludeListNameL Writing the file names to the excludelist.txt"));
+     TInt count;
+     RPointerArray<Swi::CSisRegistryPackage> augmentationPackages;
+     CleanupResetAndDestroyPushL(augmentationPackages);
+     for ( TInt iter=0; iter<uidcount; iter++)
+         {
+         User::LeaveIfError(entry.Open(session,uids[iter]));
+         if(EFalse == entry.RemovableL())
+             {
+             entry.FilesL(nonRemovableFiles);
+             entry.RegistryFilesL(registryFiles);
+             TInt fileCount = nonRemovableFiles.Count(); 
+             for (TInt z=fileCount-1; z>=0;z--)
+                 {
+                 TPtr firstChar(nonRemovableFiles[z]->Des());
+                 if(firstChar.Mid(0,1) == _L("z"))
+                     {
+                     delete nonRemovableFiles[z];
+                     nonRemovableFiles.Remove(z);
+                     }
+                 }
+             // Look for augmentations.
+             if(entry.IsAugmentationL())
+                 {
+                 entry.AugmentationsL(augmentationPackages);
+                 count = entry.AugmentationsNumberL();
+                 for (TInt i=0; i < count; ++i)
+                     {
+                     User::LeaveIfError(entry2.OpenL(session,*augmentationPackages[i]));
+                     if(EFalse == entry2.RemovableL())
+                         {
+                         entry2.FilesL(nonRemovableAugmentedFiles);
+                         entry2.RegistryFilesL(augmentedRegistryFiles);
+                         for (TInt c=0; c<nonRemovableAugmentedFiles.Count();c++)
+                               {
+                               TPtr firstChar(nonRemovableAugmentedFiles[c]->Des());
+                               if(firstChar.Mid(0,1) == _L("z"))
+                                   {
+                                   delete nonRemovableAugmentedFiles[c];
+                                   nonRemovableAugmentedFiles.Remove(c);
+                                   }
+                               }
+											}
+                     	entry2.Close();
+                     	}
+                 }
+             }
+         entry.Close();
+         }
+     RDebug::Print(_L("CFormatterRFSPlugin::ExcludeListNameL Writing the file names to the excludelist.txt"));
+ 
+     MergeFilesL();
+		 FileWriteL(nonRemovableAugmentedFiles);
+		 FileWriteL(augmentedRegistryFiles);
+		 FileWriteL(nonRemovableFiles);
+ 		 FileWriteL(registryFiles);
 
-		FileWriteL(nonRemovableFiles);
-    FileWriteL(nonRemovableAugmentedFiles);
-    MergeFilesL();
-    
-    CleanupStack::PopAndDestroy(8,&session);
+     TInt pos = 0;
+     User::LeaveIfError(fileSession.Connect());
+     User::LeaveIfError(file.Open(fileSession,_L("c:\\private\\100059C9\\excludelistcache.txt"),EFileWrite|EFileStreamText));
+          
+     file.Seek(ESeekEnd,pos);
 
-    HBufC* buf = HBufC::NewLC( KExcludeListcache().Length() + KExcludeListPathNameLenExt );
-    TPtr bufPtr = buf->Des();
-    bufPtr.Append( aSystemDrive );
-    bufPtr.Append( KDriveDelimiter );
-    bufPtr.Append( KExcludeListcache );
-    CleanupStack::Pop( buf );
+     TBuf<KMaxFileName> configurationLine ;
+     TFileText fileText ;
+     fileText.Set(file) ;
+     fileText.Seek(ESeekStart);
+     configurationLine.Format(_L("c:\\private\\100059C9\\excludelistcache.txt")) ;
+     fileText.Write(configurationLine);
+     
+     file.Flush();
+     file.Close();
+     fileSession.Close();
+    
+     
+     CleanupStack::PopAndDestroy(9,&session);
+
+     HBufC* buf = HBufC::NewLC( KExcludeListcache().Length() + KExcludeListPathNameLenExt );
+     TPtr bufPtr = buf->Des();
+     bufPtr.Append( aSystemDrive );
+     bufPtr.Append( KDriveDelimiter );
+     bufPtr.Append( KExcludeListcache );
+     CleanupStack::Pop( buf );
     return buf;
     }
 
--- a/coreapplicationuis/rfsplugins/tsrc/rfspluginstest/msgcentrerfsplugintest/init/msgcentrerfsplugintest.ini	Thu Apr 01 16:44:54 2010 +0100
+++ b/coreapplicationuis/rfsplugins/tsrc/rfspluginstest/msgcentrerfsplugintest/init/msgcentrerfsplugintest.ini	Fri Apr 02 17:08:57 2010 +0100
@@ -19,6 +19,8 @@
 # Comment lines start with '#'-character.
 # See STIF TestFramework users guide.doc for instructions
 
+
+
 # -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
 # Set following test engine settings:
 #	- Set Test Reporting mode. TestReportMode's possible values are:
--- a/coreapplicationuis/sensordatacompensatorplugin/tsrc/sensordatacompensatorplgtest/conf/sensordatacompensatorplgtest.cfg	Thu Apr 01 16:44:54 2010 +0100
+++ b/coreapplicationuis/sensordatacompensatorplugin/tsrc/sensordatacompensatorplgtest/conf/sensordatacompensatorplgtest.cfg	Fri Apr 02 17:08:57 2010 +0100
@@ -16,6 +16,7 @@
 */
 
 
+
 // Publish&Subscribe definitions
 [Define]
 KSensrvChannelTypeIdAccelerometerXYZAxisData 270553214
--- a/coreapplicationuis/tsrc/public/basic/MT_PhoneCmdhandler/MT_CPhoneHandler.mmp	Thu Apr 01 16:44:54 2010 +0100
+++ b/coreapplicationuis/tsrc/public/basic/MT_PhoneCmdhandler/MT_CPhoneHandler.mmp	Fri Apr 02 17:08:57 2010 +0100
@@ -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	Thu Apr 01 16:44:54 2010 +0100
+++ b/coreapplicationuis/tsrc/public/basic/MT_kefmapper/MT_kefmapper.mmp	Fri Apr 02 17:08:57 2010 +0100
@@ -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	Thu Apr 01 16:44:54 2010 +0100
+++ b/coreapplicationuis/tsrc/public/basic/group/MT_Rfs.mmp	Fri Apr 02 17:08:57 2010 +0100
@@ -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	Thu Apr 01 16:44:54 2010 +0100
+++ b/layers.sysdef.xml	Fri Apr 02 17:08:57 2010 +0100
@@ -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	Thu Apr 01 16:44:54 2010 +0100
+++ b/mediakeys/MMKeyBearer/src/MMKeyBearerImplementation.cpp	Fri Apr 02 17:08:57 2010 +0100
@@ -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;
             }
         }
Binary file startupservices/Startup/conf/startup.confml has changed
--- a/startupservices/Startup/src/StartupTone.cpp	Thu Apr 01 16:44:54 2010 +0100
+++ b/startupservices/Startup/src/StartupTone.cpp	Fri Apr 02 17:08:57 2010 +0100
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2005-2007 Nokia Corporation and/or its subsidiary(-ies). 
+* Copyright (c) 2005-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"
@@ -28,7 +28,7 @@
 #include "AudioPreference.h"
 
 #define MIN_VOLUME 0
-#define MAX_VOLUME 10
+#define MAX_VOLUME 10000
 
 //=============================== MEMBER FUNCTIONS ============================
 // ---------------------------------------------------------
--- a/startupservices/startupanimation/sanimctrl/src/sanimstartupctrl.cpp	Thu Apr 01 16:44:54 2010 +0100
+++ b/startupservices/startupanimation/sanimctrl/src/sanimstartupctrl.cpp	Fri Apr 02 17:08:57 2010 +0100
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2007,2008 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"
@@ -30,7 +30,7 @@
 #include "trace.h"
 
 const TInt KMinVolume( 0 );  /** Minimum allowed volume level. */
-const TInt KMaxVolume( 10 ); /** Maximum allowed volume level. */
+const TInt KMaxVolume( 10000 ); /** Maximum allowed volume level. */
 
 const TInt KDefaultRepeatCount( 1 ); /** Default repeat count for animation and tone. */
 const TInt KDefaultVolumeRamp( 0 );  /** Default volume ramp value in microseconds. */
Binary file sysresmonitoring/oodmonitor/conf/uiklaf.confml has changed
Binary file sysresmonitoring/oodmonitor/conf/uiklaf_101F8774.crml has changed
--- a/sysresmonitoring/oodmonitor/oodmonitor2/inc/outofdiskmonitor.h	Thu Apr 01 16:44:54 2010 +0100
+++ b/sysresmonitoring/oodmonitor/oodmonitor2/inc/outofdiskmonitor.h	Fri Apr 02 17:08:57 2010 +0100
@@ -90,6 +90,7 @@
         TInt                        iDefaultMassStorage;
         TInt                        iDefaultRomDrive;
         RResourceFile               iResourceFile;
+        TInt64                      iOODWarningThresholdMassMemory;
     };
 
 #endif // __OUTOFDISKMONITOR_H__
--- a/sysresmonitoring/oodmonitor/oodmonitor2/src/outofdiskglobalnote.cpp	Thu Apr 01 16:44:54 2010 +0100
+++ b/sysresmonitoring/oodmonitor/oodmonitor2/src/outofdiskglobalnote.cpp	Fri Apr 02 17:08:57 2010 +0100
@@ -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/oodmonitor/oodmonitor2/src/outofdiskmonitor.cpp	Thu Apr 01 16:44:54 2010 +0100
+++ b/sysresmonitoring/oodmonitor/oodmonitor2/src/outofdiskmonitor.cpp	Fri Apr 02 17:08:57 2010 +0100
@@ -107,18 +107,22 @@
     CRepository* repository( NULL );
     TInt warningThreshold(0);
     TInt criticalThreshold(0);
+    TInt warningThresholdMassMemory(0);
     TRAPD( err, repository = CRepository::NewL( KCRUidUiklaf ) );
     if ( err == KErrNone )
         {
         err = repository->Get(KUikOODDiskFreeSpaceWarningNoteLevel, warningThreshold);
         err = repository->Get(KUikOODDiskCriticalThreshold, criticalThreshold);
+        err = repository->Get(KUikOODDiskFreeSpaceWarningNoteLevelMassMemory, warningThresholdMassMemory);
         }
     delete repository;
     iOODWarningThreshold = warningThreshold;
     iOODCriticalThreshold = criticalThreshold;
+    iOODWarningThresholdMassMemory = warningThresholdMassMemory;
     
-	TRACES1("COutOfDiskMonitor::ConstructL: Warning threshold: %d percent",iOODWarningThreshold);
+	TRACES1("COutOfDiskMonitor::ConstructL: Warning threshold Phone Memory: %d percent",iOODWarningThreshold);
     TRACES1("COutOfDiskMonitor::ConstructL: Critical threshold: %ld bytes",iOODCriticalThreshold);
+    TRACES1("COutOfDiskMonitor::ConstructL: Warning threshold Mass Memory: %ld bytes",iOODWarningThresholdMassMemory);
     
     iOutOfDiskNotifyObserver = COutOfDiskNotifyObserver::NewL( this, iFs );
     TRACES("COutOfDiskMonitor::ConstructL: End");
@@ -208,8 +212,16 @@
         TRACES1("COutOfDiskMonitor::GetThreshold: Volume size: %ld",volSize);		
 		if ( ret == KErrNone )
 			{
-			TRACES1("COutOfDiskMonitor::GetThreshold: Warning threshold: Used disk space %d percent",iOODWarningThreshold);
-			threshold = ((volSize*(100-iOODWarningThreshold))/100);		
+			if(aDrive == EDriveC)
+			    {
+                TRACES1("COutOfDiskMonitor::GetThreshold: Warning threshold Phone Memory: Used disk space %d percent",iOODWarningThreshold);
+                threshold = ((volSize*(100-iOODWarningThreshold))/100);
+			    }
+			else
+			    {
+                TRACES1("COutOfDiskMonitor::GetThreshold: Warning threshold Mass Memory: %ld bytes",iOODWarningThresholdMassMemory);
+			    threshold = iOODWarningThresholdMassMemory;			                
+			    }
 			}
         }
     else if (aLevel == DISK_SPACE_CRITICAL)
--- a/sysresmonitoring/oommonitor/group/oommonitor.mmp	Thu Apr 01 16:44:54 2010 +0100
+++ b/sysresmonitoring/oommonitor/group/oommonitor.mmp	Fri Apr 02 17:08:57 2010 +0100
@@ -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	Thu Apr 01 16:44:54 2010 +0100
+++ b/sysresmonitoring/oommonitor/group/oommonitorlib.mmp	Fri Apr 02 17:08:57 2010 +0100
@@ -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	Thu Apr 01 16:44:54 2010 +0100
+++ b/sysresmonitoring/oommonitor/src/oomIdletimerule.cpp	Fri Apr 02 17:08:57 2010 +0100
@@ -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	Thu Apr 01 16:44:54 2010 +0100
+++ b/sysresmonitoring/oommonitor/src/oomaction.cpp	Fri Apr 02 17:08:57 2010 +0100
@@ -18,7 +18,7 @@
 
 #include "oomaction.h"
 #include "oomactionlist.h"
-#include "oomtraces.h"
+#include "OomTraces.h"
 
 COomAction::~COomAction()
     {
--- a/sysresmonitoring/oommonitor/src/oomactionconfig.cpp	Thu Apr 01 16:44:54 2010 +0100
+++ b/sysresmonitoring/oommonitor/src/oomactionconfig.cpp	Fri Apr 02 17:08:57 2010 +0100
@@ -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	Thu Apr 01 16:44:54 2010 +0100
+++ b/sysresmonitoring/oommonitor/src/oomappclosetimer.cpp	Fri Apr 02 17:08:57 2010 +0100
@@ -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	Thu Apr 01 16:44:54 2010 +0100
+++ b/sysresmonitoring/oommonitor/src/oomappclosewatcher.cpp	Fri Apr 02 17:08:57 2010 +0100
@@ -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	Thu Apr 01 16:44:54 2010 +0100
+++ b/sysresmonitoring/oommonitor/src/oomapplicationconfig.cpp	Fri Apr 02 17:08:57 2010 +0100
@@ -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	Thu Apr 01 16:44:54 2010 +0100
+++ b/sysresmonitoring/oommonitor/src/oomclientrequestqueue.cpp	Fri Apr 02 17:08:57 2010 +0100
@@ -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	Thu Apr 01 16:44:54 2010 +0100
+++ b/sysresmonitoring/oommonitor/src/oomcloseappconfig.cpp	Fri Apr 02 17:08:57 2010 +0100
@@ -18,7 +18,7 @@
 
 
 #include "oomcloseappconfig.h"
-#include "oomtraces.h"
+#include "OomTraces.h"
 
 COomCloseAppConfig* COomCloseAppConfig::NewL(TInt32 aId)
     {
--- a/sysresmonitoring/oommonitor/src/oomconfig.cpp	Thu Apr 01 16:44:54 2010 +0100
+++ b/sysresmonitoring/oommonitor/src/oomconfig.cpp	Fri Apr 02 17:08:57 2010 +0100
@@ -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	Thu Apr 01 16:44:54 2010 +0100
+++ b/sysresmonitoring/oommonitor/src/oomconfigparser.cpp	Fri Apr 02 17:08:57 2010 +0100
@@ -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	Thu Apr 01 16:44:54 2010 +0100
+++ b/sysresmonitoring/oommonitor/src/oomforegroundrule.cpp	Fri Apr 02 17:08:57 2010 +0100
@@ -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	Thu Apr 01 16:44:54 2010 +0100
+++ b/sysresmonitoring/oommonitor/src/oomglobalconfig.cpp	Fri Apr 02 17:08:57 2010 +0100
@@ -18,7 +18,7 @@
 
 
 #include "oomglobalconfig.h"
-#include "oomtraces.h"
+#include "OomTraces.h"
 
 COomGlobalConfig::~COomGlobalConfig()
     {
--- a/sysresmonitoring/oommonitor/src/oommemorymonitorserver.cpp	Thu Apr 01 16:44:54 2010 +0100
+++ b/sysresmonitoring/oommonitor/src/oommemorymonitorserver.cpp	Fri Apr 02 17:08:57 2010 +0100
@@ -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	Thu Apr 01 16:44:54 2010 +0100
+++ b/sysresmonitoring/oommonitor/src/oommemorymonitorsession.cpp	Fri Apr 02 17:08:57 2010 +0100
@@ -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	Thu Apr 01 16:44:54 2010 +0100
+++ b/sysresmonitoring/oommonitor/src/oommonitor.cpp	Fri Apr 02 17:08:57 2010 +0100
@@ -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	Thu Apr 01 16:44:54 2010 +0100
+++ b/sysresmonitoring/oommonitor/src/oommonitorplugin.cpp	Fri Apr 02 17:08:57 2010 +0100
@@ -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	Thu Apr 01 16:44:54 2010 +0100
+++ b/sysresmonitoring/oommonitor/src/oommonitorsession.cpp	Fri Apr 02 17:08:57 2010 +0100
@@ -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	Thu Apr 01 16:44:54 2010 +0100
+++ b/sysresmonitoring/oommonitor/src/oomoutofmemorywatcher.cpp	Fri Apr 02 17:08:57 2010 +0100
@@ -19,7 +19,7 @@
 
 #include "oomoutofmemorywatcher.h"
 #include "oommemorymonitor.h"
-#include "oomtraces.h"
+#include "OomTraces.h"
 
 // ======================================================================
 // class COutOfMemoryWatcher
--- a/sysresmonitoring/oommonitor/src/oompluginwaiter.cpp	Thu Apr 01 16:44:54 2010 +0100
+++ b/sysresmonitoring/oommonitor/src/oompluginwaiter.cpp	Fri Apr 02 17:08:57 2010 +0100
@@ -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	Thu Apr 01 16:44:54 2010 +0100
+++ b/sysresmonitoring/oommonitor/src/oomrunpluginconfig.cpp	Fri Apr 02 17:08:57 2010 +0100
@@ -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	Thu Apr 01 16:44:54 2010 +0100
+++ b/sysresmonitoring/oommonitor/src/oomsubscribehelper.cpp	Fri Apr 02 17:08:57 2010 +0100
@@ -17,7 +17,7 @@
 
 #include <e32property.h>
 #include "oomsubscribehelper.h"
-#include "oomtraces.h"
+#include "OomTraces.h"
 
 // ---------------------------------------------------------
 //
--- a/sysresmonitoring/oommonitor/src/oomwserveventreceiver.cpp	Thu Apr 01 16:44:54 2010 +0100
+++ b/sysresmonitoring/oommonitor/src/oomwserveventreceiver.cpp	Fri Apr 02 17:08:57 2010 +0100
@@ -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/inc/t_oomclient.h	Thu Apr 01 16:44:54 2010 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,38 +0,0 @@
-/*
-* Copyright (c) 2006 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"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  
-*
-*/
-
-
-
-
-#ifndef __T_CLIENT_H__
-#define __T_CLIENT_H__
-
-#include <e32std.h>
-
-class ROOMAllocSession : public RSessionBase
-	{
-public:
-	IMPORT_C TInt Connect();
-	IMPORT_C TInt Reset();
-	IMPORT_C TInt StartAllocating();
-	IMPORT_C TInt StopAllocating();
-	IMPORT_C TInt Configure(TUid aPlugin, TUint aAllocRate, TUint aAllocInitial, TUint aAllocLimit);
-	IMPORT_C TInt MemoryLow(TUid aPlugin);
-	IMPORT_C TInt MemoryGood(TUid aPlugin);
-	};
-
-#endif
--- a/sysresmonitoring/oommonitor/tsrc/oomtest/inc/t_oomdummyplugin_properties.h	Thu Apr 01 16:44:54 2010 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,36 +0,0 @@
-/*
-* Copyright (c) 2006 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"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  
-*
-*/
-
-
-
-#ifndef DUMMYPLUGIN_PROPETIES_H_
-#define DUMMYPLUGIN_PROPETIES_H_
-
-const TUid KUidOomPropertyCategory = {0x10286A3E};
-
-//The key is the UID of the implementation instance, i.e. 10286A34 To 10286A3D
-const TInt KUidOOMDummyPluginFirstImplementation(0x10286A34);
-const TInt KUidOOMDummyPluginLastImplementation(0x10286A3D);
-
-const TUint KOOMDummyPluginImplementationCount = 10;
-
-const TUint KOOMDummyPluginLowMemoryCount = 0;
-const TUint KOOMDummyPluginGoodMemoryCount = 1 * KOOMDummyPluginImplementationCount;
-const TUint KOOMDummyPluginCurrentAllocationBytes = 2 * KOOMDummyPluginImplementationCount;
-const TUint KOOMDummyPluginBytesRequested = 3 * KOOMDummyPluginImplementationCount;
-
-#endif /* DUMMYPLUGIN_PROPETIES_H_ */
--- a/sysresmonitoring/oommonitor/tsrc/oomtest/inc/t_oomdummyplugin_properties2.h	Thu Apr 01 16:44:54 2010 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,21 +0,0 @@
-/*
-* Copyright (c) 2006 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"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  
-*
-*/
-
-
-
-
-
--- a/sysresmonitoring/oommonitor/tsrc/oomtest/t_oomallocserver/group/t_oomallocclient.mmp	Thu Apr 01 16:44:54 2010 +0100
+++ b/sysresmonitoring/oommonitor/tsrc/oomtest/t_oomallocserver/group/t_oomallocclient.mmp	Fri Apr 02 17:08:57 2010 +0100
@@ -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	Thu Apr 01 16:44:54 2010 +0100
+++ b/sysresmonitoring/oommonitor/tsrc/oomtest/t_oomdummyapp/group/bld.inf	Fri Apr 02 17:08:57 2010 +0100
@@ -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	Thu Apr 01 16:44:54 2010 +0100
+++ b/systemsettings/GSAccessoryPlugin/data/gsaccessoryplugin.rss	Fri Apr 02 17:08:57 2010 +0100
@@ -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
--- a/systemsettings/GSAccessoryPlugin/src/gsacctvoutview.cpp	Thu Apr 01 16:44:54 2010 +0100
+++ b/systemsettings/GSAccessoryPlugin/src/gsacctvoutview.cpp	Fri Apr 02 17:08:57 2010 +0100
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2005-2008 Nokia Corporation and/or its subsidiary(-ies). 
+* Copyright (c) 2005-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"
@@ -262,28 +262,27 @@
 void CGSAccTvoutView::ChangeTvSystemSettingL()
     {
     FUNC_LOG;
-
     TInt currentValue = iServerEngine->TvSystemL();
 
-    // If PALM is not supported, index correction
-    if( !iModel.PalmSupport() && currentValue )
+    // If PALM is not supported only toggle values
+    // pal = 0, palm = 1, ntsc = 2
+    TInt pal = 0;
+    TInt ntsc = 2;
+    if( !iModel.PalmSupport() )
         {
-        currentValue--;
+        iServerEngine->SetTvSystemL( currentValue == pal ? ntsc : pal );
+        UpdateListBoxL( EGSSettIdTvSystem );
+        iSettingChanged = ETrue;
+        return;
         }
 
+    // otherwise when palm is supported and more than two options
+    // available show the dialog
     if ( ShowRadioButtonSettingsPageL(
             R_ACC_TV_SYSTEM_SETTING_PAGE,
-            iModel.PalmSupport() ?
-                R_ACC_TV_SYSTEM_SETTING_PAGE_LBX :
-                R_ACC_TV_SYSTEM_SETTING_PAGE_NO_PALM_LBX,
+            R_ACC_TV_SYSTEM_SETTING_PAGE_LBX,
             currentValue ) )
         {
-        if( !iModel.PalmSupport() && currentValue )
-            {
-            //In case PALM support is missing fix the NTSC value index
-            currentValue++;
-            }
-
         iServerEngine->SetTvSystemL( currentValue );
         UpdateListBoxL( EGSSettIdTvSystem );
         iSettingChanged = ETrue;
--- a/systemsettings/gssensorplugin/group/gssensorplugin.cfg	Thu Apr 01 16:44:54 2010 +0100
+++ b/systemsettings/gssensorplugin/group/gssensorplugin.cfg	Fri Apr 02 17:08:57 2010 +0100
@@ -15,7 +15,6 @@
 *
 */
 
-
 #ifndef GSSENSORPLUGIN_CFG
 #define GSSENSORPLUGIN_CFG