activityfw/storage/server/src/afobservertask.cpp
changeset 119 50e220be30d1
parent 112 dbfb5e38438b
--- a/activityfw/storage/server/src/afobservertask.cpp	Mon Sep 13 13:26:33 2010 +0300
+++ b/activityfw/storage/server/src/afobservertask.cpp	Mon Sep 20 10:22:22 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;
     }
 }