add to resume event
[apps/osp/Internet.git] / src / IntInternetApp.cpp
index 526a45d..a864d7f 100644 (file)
@@ -2,7 +2,7 @@
 
 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
 //
-// Licensed under the Flora License, Version 1.0 (the License);
+// Licensed under the Flora License, Version 1.1 (the License);
 // you may not use this file except in compliance with the License.
 // You may obtain a copy of the License at
 //
@@ -187,34 +187,29 @@ InternetApp::OnAppTerminating(AppRegistry& appRegistry, bool forcedTermination)
 {
        AppLogDebug("Internet::OnAppTerminating");
 
+       SettingInfo::RemoveSettingEventListener(*this);
+
        return true;
 }
 
 void
 InternetApp::OnForeground(void)
 {
-       AppLog("InternetApp::OnForeground called");
-       Frame* pCurrentFrame = null;
-       pCurrentFrame =  Application::GetInstance()->GetAppFrame()->GetFrame();
-
-       if (pCurrentFrame != null)
+       Form* pCurrentForm = (SceneManager::GetInstance()->GetCurrentScene()->GetForm());
+       if (pCurrentForm)
        {
-               pCurrentFrame->SetEnabled(true);
+               pCurrentForm->SendUserEvent(FORE_GROUND_APP_EVENT, NULL);
        }
 }
 
 void
 InternetApp::OnBackground(void)
 {
-
-       Frame* pCurrentFrame = null;
-       pCurrentFrame =  Application::GetInstance()->GetAppFrame()->GetFrame();
-
-       if (pCurrentFrame != null)
+       Form* pCurrentForm = (SceneManager::GetInstance()->GetCurrentScene()->GetForm());
+       if(pCurrentForm)
        {
-               pCurrentFrame->SetEnabled(false);
+               pCurrentForm->SendUserEvent(BACK_GROUND_APP_EVENT, NULL);
        }
-
 }
 
 void