activityfw/storage/server/src/afobservertask.cpp
changeset 124 e36b2f4799c0
parent 115 3ab5c078b490
--- a/activityfw/storage/server/src/afobservertask.cpp	Fri Sep 17 08:32:18 2010 +0300
+++ b/activityfw/storage/server/src/afobservertask.cpp	Mon Oct 04 00:38:31 2010 +0300
@@ -79,12 +79,20 @@
  * Interface implementation
  * @see CActivityTask::BroadcastReceivedL(const RMessage2&)
  */
-void CAfObserverTask::BroadcastReceivedL(const RMessage2& msg)
+void CAfObserverTask::BroadcastReceivedL(const RMessage2& msg, TBool applicationUninstalled)
 {
-    if(EFalse != mMsg.IsNull()) {
+    if (!applicationUninstalled && mMsg.IsNull()) {
         mGlobalStorage.Pop(this);//
         mLocalStorage.Pop(this);
         delete this;
+    } else if(NotifyChange == mMsg.Function() &&
+              (applicationUninstalled ||
+               SaveActivity == msg.Function() ||
+               RemoveActivity == msg.Function() ||
+               RemoveApplicationActivities == msg.Function())){
+        mMsg.Complete(KErrNone);
+        mGlobalStorage.Pop(this);
+        delete this;
     } else if (WaitActivity == mMsg.Function() &&
                LaunchActivity == msg.Function()) {
                
@@ -113,15 +121,6 @@
         mGlobalStorage.Pop(this);
         mMsg.Complete(KErrCancel);
         delete this;
-    } else if(NotifyChange == mMsg.Function() &&
-              (AddActivity == msg.Function() ||
-               UpdateActivity == msg.Function() ||
-               SaveActivity == msg.Function() ||
-               RemoveActivity == msg.Function() ||
-               RemoveApplicationActivities == msg.Function())){
-        mMsg.Complete(KErrNone);
-        mGlobalStorage.Pop(this);
-        delete this;
     }
 }