--- a/homescreenpluginsrv/hspsmanager/src/hspsrominstaller.cpp Wed Mar 31 22:04:35 2010 +0300
+++ b/homescreenpluginsrv/hspsmanager/src/hspsrominstaller.cpp Wed Apr 14 16:16:44 2010 +0300
@@ -105,6 +105,43 @@
}
// -----------------------------------------------------------------------------
+// ChspsRomInstaller::InstallL()
+// -----------------------------------------------------------------------------
+//
+void ChspsRomInstaller::InstallL()
+ {
+ RPointerArray<HBufC> pluginFolders;
+ CleanupClosePushL( pluginFolders );
+
+ // Find UDA and ROM widgets to be installed
+ FindInstallationFilesL( pluginFolders );
+
+ // Install the manifest files
+ for( TInt index=0; index < pluginFolders.Count(); index++ )
+ {
+ TPtrC namePtr( pluginFolders[index]->Des() );
+
+ // Synchronous method
+ ThspsServiceCompletedMessage ret = EhspsInstallThemeFailed;
+ TRAP_IGNORE( ret = InstallThemeL( namePtr ) );
+ if ( ret != EhspsInstallThemeSuccess )
+ {
+// User::Leave( KErrAbort );
+ }
+ }
+
+ if ( pluginFolders.Count() == 0 )
+ {
+ // Mandatory plugins were missing
+ User::Leave( KErrCorrupt );
+ }
+
+ pluginFolders.ResetAndDestroy();
+ CleanupStack::PopAndDestroy( 1, &pluginFolders );
+ }
+
+
+// -----------------------------------------------------------------------------
// ChspsRomInstaller::FindInstallationFilesL()
// -----------------------------------------------------------------------------
//
@@ -160,6 +197,11 @@
manifest.Append( KBackslash );
manifest.Append( KManifest );
+ if( !BaflUtils::FileExists( iFsSession, manifest ) )
+ {
+ continue;
+ }
+
// Check for duplicates
TBool isShadowed = EFalse;
TParsePtrC manifestPtr( manifest );
@@ -254,7 +296,9 @@
// Start installation by reading the manifest file
iRet = iInstallationHandler->hspsInstallTheme( aFileName, iHeaderData );
if ( iRet == EhspsInstallThemeSuccess && !IsActive() )
- {
+ {
+ iRet = EhspsInstallThemeFailed;
+
// Continue with remaining installation phases
SetActive();
iInstallationHandler->hspsInstallNextPhaseL( iHeaderData, iStatus );
@@ -332,6 +376,7 @@
//
TInt ChspsRomInstaller::RunError( TInt /*aError*/ )
{
+ iRet = EhspsInstallThemeFailed;
// Called when error occurred in asynchronous request
CActiveScheduler::Stop();
return KErrNone;