installationservices/swi/source/swis/server/statemachine.cpp
branchRCL_3
changeset 25 7333d7932ef7
parent 19 f8cf9d484c15
child 26 8b7f4e561641
--- a/installationservices/swi/source/swis/server/statemachine.cpp	Thu Aug 19 10:02:49 2010 +0300
+++ b/installationservices/swi/source/swis/server/statemachine.cpp	Tue Aug 31 15:21:33 2010 +0300
@@ -20,6 +20,9 @@
 #include "log.h"
 #include "plan.h"
 #include "swispubsubdefs.h"
+#ifdef SYMBIAN_UNIVERSAL_INSTALL_FRAMEWORK  
+#include <usif/scr/appregentries.h>
+#endif
 
 namespace Swi
 {
@@ -52,11 +55,11 @@
 	Cancel();
 	// close UISS session
 	iUiHandler.Close();
-	delete iProgressPublisher;
 	
 #ifdef SYMBIAN_UNIVERSAL_INSTALL_FRAMEWORK
 	iStsSession.Close();
 	delete iRegistryWrapper;
+	delete iProgressPublisher;
 #else
 	delete iIntegrityServices;
 #endif
@@ -69,12 +72,12 @@
 	{
 	// mark the installation/un-installation operation as unconfirmed to start with
 	iOperationConfirmed = EFalse;
-	iProgressPublisher = Swi::CProgressBarValuePublisher::NewL();
-	iUiHandler.SetProgressBarValuePublisher(iProgressPublisher);
-	
+
 #ifdef SYMBIAN_UNIVERSAL_INSTALL_FRAMEWORK
 	iStsSession.CreateTransactionL();	
 	iRegistryWrapper = CRegistryWrapper::NewL();
+	iProgressPublisher = CProgressBarValuePublisher::NewL();
+	iUiHandler.SetProgressBarValuePublisher(iProgressPublisher);
 #else
 	// Create integrity services, use the current time as transaction ID
 	TTime currentTime;
@@ -347,6 +350,15 @@
 		// re-generate the sisregistry cache .. very time consuming!
 		ResetRegistryCache();
 		}
+#else
+	// Deregister the force registered applications from AppArc
+	DEBUG_PRINTF(_L8("Deregistering the force registered applications with AppArc"));
+	RSisLauncherSession launcher;
+	CleanupClosePushL(launcher);
+	User::LeaveIfError(launcher.Connect());
+	RArray<TAppUpdateInfo> emptyAppRegDataArray;
+	launcher.NotifyNewAppsL(emptyAppRegDataArray);
+	CleanupStack::PopAndDestroy(&launcher);
 #endif
 
 	iMessage.Complete(aError);
@@ -423,10 +435,10 @@
 	{
 	iIsInInfoMode = aOperationalMode;
 	}
-#endif
 
 void CSwisStateMachine::SetFinalProgressBarValue(TInt aValue)
 	{
 	iProgressPublisher->SetFinalProgressBarValue(aValue);
 	}
+#endif
 } // namespace Swi