# HG changeset patch # User Dremov Kirill (Nokia-D-MSW/Tampere) # Date 1284489088 -10800 # Node ID e8965914fac7e8e0eab206b34ab7c0f6c587bc26 # Parent 8b7f4e561641efc94b44a0aac179538ed54abb8c Revision: 201033 Kit: 201035 diff -r 8b7f4e561641 -r e8965914fac7 appinstaller/AppinstUi/Client/Src/SWInstLauncher.cpp --- a/appinstaller/AppinstUi/Client/Src/SWInstLauncher.cpp Wed Sep 01 12:22:02 2010 +0100 +++ b/appinstaller/AppinstUi/Client/Src/SWInstLauncher.cpp Tue Sep 14 21:31:28 2010 +0300 @@ -25,6 +25,7 @@ #include "SWInstDefs.h" #include "SWInstCommon.h" + using namespace SwiUI; // ================= MEMBER FUNCTIONS ======================= @@ -48,16 +49,17 @@ // EXPORT_C TInt RSWInstLauncher::Connect() { + TInt result( KErrNone ); if ( !iConnected ) { if ( CEikonEnv::Static() ) - { + { TRAP( result, ConnectChainedAppL( KUidSWInstSvr ) ); } else - { + { TRAP( result, REikAppServiceBase::ConnectNewAppL( KUidSWInstSvr ) ); } @@ -78,12 +80,22 @@ // ----------------------------------------------------------------------------- // EXPORT_C void RSWInstLauncher::Close() - { + { if ( iConnected ) { - RAknAppServiceBase::Close(); + if ( CEikonEnv::Static() ) + { + // Note this will crash if non ui application like SWI Daemon. + RAknAppServiceBase::Close(); + } + else + { + // Use EikAppServiceBase if non UI application. + REikAppServiceBase::Close(); + } + iConnected = EFalse; - } + } } // ----------------------------------------------------------------------------- diff -r 8b7f4e561641 -r e8965914fac7 appinstaller/AppinstUi/Client/Src/SWInstSilentLauncher.cpp --- a/appinstaller/AppinstUi/Client/Src/SWInstSilentLauncher.cpp Wed Sep 01 12:22:02 2010 +0100 +++ b/appinstaller/AppinstUi/Client/Src/SWInstSilentLauncher.cpp Tue Sep 14 21:31:28 2010 +0300 @@ -56,7 +56,7 @@ // ----------------------------------------------------------------------------- // EXPORT_C TInt RSWInstSilentLauncher::Connect() - { + { TInt result( KErrNone ); TUint differentiator = 0; diff -r 8b7f4e561641 -r e8965914fac7 iaupdate/IAD/api/client/src/iaupdateclient.cpp --- a/iaupdate/IAD/api/client/src/iaupdateclient.cpp Wed Sep 01 12:22:02 2010 +0100 +++ b/iaupdate/IAD/api/client/src/iaupdateclient.cpp Tue Sep 14 21:31:28 2010 +0300 @@ -143,7 +143,7 @@ { IAUPDATE_TRACE("[IAUPDATE] RIAUpdateClient::Close() begin"); // Let the parent handle closing. - RAknAppServiceBase::Close(); + REikAppServiceBase::Close(); iConnected = EFalse; delete iData; iData = NULL; diff -r 8b7f4e561641 -r e8965914fac7 iaupdate/IAD/engine/controller/src/iaupdateutils.cpp --- a/iaupdate/IAD/engine/controller/src/iaupdateutils.cpp Wed Sep 01 12:22:02 2010 +0100 +++ b/iaupdate/IAD/engine/controller/src/iaupdateutils.cpp Tue Sep 14 21:31:28 2010 +0300 @@ -302,7 +302,7 @@ // ----------------------------------------------------------------------------- EXPORT_C TBool IAUpdateUtils::IsWidgetInstalledL(const TDesC& aIdentifier, TIAUpdateVersion& aVersion ) - { + { RWidgetRegistryClientSession widgetRegistry; User::LeaveIfError( widgetRegistry.Connect() ); @@ -317,15 +317,29 @@ { CWidgetInfo* widgetInfo( widgetInfoArr[i] ); - CWidgetPropertyValue* BundleId = widgetRegistry.GetWidgetPropertyValueL(widgetInfo->iUid, EBundleIdentifier ); + CWidgetPropertyValue* BundleId = + widgetRegistry.GetWidgetPropertyValueL(widgetInfo->iUid, EBundleIdentifier ); CleanupStack::PushL( BundleId ); if( aIdentifier.Compare( *(BundleId->iValue.s) )== 0 ) { - CWidgetPropertyValue* version = widgetRegistry.GetWidgetPropertyValueL(widgetInfo->iUid, EBundleVersion ); + // Get version + CWidgetPropertyValue* version = + widgetRegistry.GetWidgetPropertyValueL(widgetInfo->iUid, EBundleVersion ); CleanupStack::PushL( version ); - DesToVersionL(*(version->iValue.s), aVersion.iMajor, aVersion.iMinor, aVersion.iBuild ); + // Convert version + if (version->iValue.s) + { + DesToVersionL(*(version->iValue.s), aVersion.iMajor, aVersion.iMinor, aVersion.iBuild ); + } + else + { + // version does not exist, set default (0.0.1) + aVersion.iMajor = 0; + aVersion.iMinor = 0; + aVersion.iBuild = 1; + } CleanupStack::PopAndDestroy( version ); CleanupStack::PopAndDestroy( BundleId ); diff -r 8b7f4e561641 -r e8965914fac7 installationservices/swi/source/sisregistry/server_legacy/sisregistryserversession.cpp --- a/installationservices/swi/source/sisregistry/server_legacy/sisregistryserversession.cpp Wed Sep 01 12:22:02 2010 +0100 +++ b/installationservices/swi/source/sisregistry/server_legacy/sisregistryserversession.cpp Tue Sep 14 21:31:28 2010 +0300 @@ -1758,7 +1758,11 @@ { // First boot detected. Add the first boot marker file as well as the format marker on the drive. SisRegistryUtil::CreateFileWithAttributesL(iFs, firstBootMarkerFilePath); - SisRegistryUtil::CreateFileWithAttributesL(iFs, formatMarkerPath, fileAttributes); + TRAPD(err,SisRegistryUtil::CreateFileWithAttributesL(iFs, formatMarkerPath, fileAttributes);) + if (err != KErrNone && err != KErrAlreadyExists) + { + User::LeaveIfError(err); + } } else { diff -r 8b7f4e561641 -r e8965914fac7 ncdengine/provider/deviceinteraction/src/ncdinstallationserviceimpl.cpp --- a/ncdengine/provider/deviceinteraction/src/ncdinstallationserviceimpl.cpp Wed Sep 01 12:22:02 2010 +0100 +++ b/ncdengine/provider/deviceinteraction/src/ncdinstallationserviceimpl.cpp Tue Sep 14 21:31:28 2010 +0300 @@ -2359,7 +2359,20 @@ CWidgetPropertyValue* version = iWidgetRegistry.GetWidgetPropertyValueL(aUid, EBundleVersion ); CleanupStack::PushL( version ); - TCatalogsVersion::ConvertL( aVersion, *(version->iValue.s) ); + + // Convert version + if (version->iValue.s) + { + TCatalogsVersion::ConvertL( aVersion, *(version->iValue.s) ); + } + else + { + // version does not exist, set default (0.0.1) + aVersion.iMajor = 0; + aVersion.iMinor = 0; + aVersion.iBuild = 1; + } + CleanupStack::PopAndDestroy( version ); return (ETrue); } @@ -2403,11 +2416,24 @@ if( aIdentifier.Compare( *(bundleId->iValue.s) )== 0 ) { + // Get version CWidgetPropertyValue* version = iWidgetRegistry.GetWidgetPropertyValueL (widgetInfo->iUid, EBundleVersion ); CleanupStack::PushL( version ); - TCatalogsVersion::ConvertL( aVersion, *(version->iValue.s) ); + + // Convert version + if (version->iValue.s) + { + TCatalogsVersion::ConvertL( aVersion, *(version->iValue.s) ); + } + else + { + // version does not exist, set default (0.0.1) + aVersion.iMajor = 0; + aVersion.iMinor = 0; + aVersion.iBuild = 1; + } CleanupStack::PopAndDestroy( version ); CleanupStack::PopAndDestroy( bundleId );