homescreenpluginsrv/hspsmanager/src/hspsrominstaller.cpp
branchRCL_3
changeset 22 1b207dd38b72
parent 19 edd621764147
child 27 2c7f27287390
--- a/homescreenpluginsrv/hspsmanager/src/hspsrominstaller.cpp	Tue May 11 16:30:05 2010 +0300
+++ b/homescreenpluginsrv/hspsmanager/src/hspsrominstaller.cpp	Tue May 25 13:01:39 2010 +0300
@@ -69,26 +69,17 @@
 // -----------------------------------------------------------------------------
 ChspsRomInstaller* ChspsRomInstaller::NewL( 
 		ChspsThemeServer& aThemeServer,
-		RFs& aFsSession )
-    {
-    ChspsRomInstaller* self = NewLC( aThemeServer, aFsSession );
+		RFs& aFsSession,
+		const TBool aInstallUdaEmmc )
+    {    
+    ChspsRomInstaller* self = 
+            new ( ELeave ) ChspsRomInstaller( aThemeServer, aFsSession, aInstallUdaEmmc );
+    CleanupStack::PushL( self );
+    self->ConstructL();
     CleanupStack::Pop( self );
     return( self ) ;
     }
 
-// -----------------------------------------------------------------------------
-// ChspsRomInstaller::NewLC()
-// Two-phased constructor.
-// -----------------------------------------------------------------------------
-ChspsRomInstaller* ChspsRomInstaller::NewLC( 
-		ChspsThemeServer& aThemeServer,
-		RFs& aFsSession)
-    {
-    ChspsRomInstaller* self = new ( ELeave ) ChspsRomInstaller( aThemeServer, aFsSession );
-    CleanupStack::PushL( self );
-    self->ConstructL();
-    return self;
-    }
 
 // -----------------------------------------------------------------------------
 // ChspsRomInstaller::ConstructL()
@@ -101,6 +92,12 @@
     
     // Prevent notifications from ROM based installations
     iInstallationHandler->DisableNotifications();
+    
+    // Skip UDA and eMMC drives if restoring plug-ins
+    if( !iInstallUdaEmmc )
+        {
+        iInstallationHandler->DisableUdaEmmcInstallations();
+        }
     }
 
 // -----------------------------------------------------------------------------
@@ -109,11 +106,13 @@
 // -----------------------------------------------------------------------------
 ChspsRomInstaller::ChspsRomInstaller(
 		ChspsThemeServer& aThemeServer,
-        RFs& aFsSession )
-		: CActive(EPriorityStandard), 
-		    iThemeServer(aThemeServer), 
-		    iFsSession(aFsSession),
-		    iRet(EhspsInstallThemeFailed)
+        RFs& aFsSession,
+        const TBool aInstallUdaEmmc )
+		: CActive( EPriorityStandard ), 
+		    iThemeServer( aThemeServer ), 
+		    iFsSession( aFsSession ),
+		    iRet( EhspsInstallThemeFailed ),
+            iInstallUdaEmmc( aInstallUdaEmmc )
     {
     CActiveScheduler::Add( this );
     }
@@ -138,7 +137,7 @@
     RPointerArray<HBufC> fileArray;
     CleanupResetAndDestroyPushL( fileArray );
             
-    // Find UDA and ROM widgets to be installed     
+    // Find the manifest files     
     FindInstallationFilesL( fileArray );
             
     // Install the manifest files    
@@ -174,8 +173,14 @@
     {
     __ASSERT_DEBUG( aFileArray.Count() == 0, User::Leave( KErrArgument ) );
                     
-    DoFindInstallationFilesL( aFileArray, KPrivateInstallE );
-    DoFindInstallationFilesL( aFileArray, KPrivateInstallC );    
+    if( iInstallUdaEmmc )
+        {
+        // Handle installation of the imaker exports 
+        DoFindInstallationFilesL( aFileArray, KPrivateInstallE );    
+        DoFindInstallationFilesL( aFileArray, KPrivateInstallC );  
+        }
+    
+    // ROM
     DoFindInstallationFilesL( aFileArray, KPrivateInstallZ );    
     }