1.Changed appcontrol parameters of contacts 2.GUI changes 3.Changes to alert tone...
[apps/osp/Call.git] / src / CallPresentationModel.cpp
index a0b98a1..baff300 100644 (file)
@@ -411,6 +411,22 @@ CallPresentationModel::RejectCall(int callHandle, bool sendMsg, const String& co
        return true;
 }
 
+void CallPresentationModel::OnAppForeground(void)
+{
+       if (__isMessageAppControlRunning == true)
+       {
+               //This comes here, when Message AppControl is finished working.
+               __isMessageAppControlRunning = false;
+               //Check if this was the last call, then terminate application.
+               //And if any calls are active, then those cases are already handled from Other places.
+               if( GetCurrentCallCount() == 0)
+               {
+                       CallApp* pPhoneApp = static_cast<CallApp*>(UiApp::GetInstance());
+                       pPhoneApp->Terminate();
+               }
+       }
+}
+
 void
 CallPresentationModel::OnAppControlCompleteResponseReceived(const AppId& appId, const String& operationId, AppCtrlResult appControlResult, const IMap* pExtraData)
 {