Nabi issue fix 35354
authorchitta ranjan <chitta.rs@samsung.com>
Fri, 19 Apr 2013 11:26:46 +0000 (20:26 +0900)
committerchitta ranjan <chitta.rs@samsung.com>
Fri, 19 Apr 2013 11:26:46 +0000 (20:26 +0900)
Change-Id: If85799c2a6b0799bf8e5e32c2a73127172cec32b
Signed-off-by: chitta ranjan <chitta.rs@samsung.com>
src/VpVideoPlayerForm.cpp

index 3bbdc6c..f194967 100644 (file)
@@ -119,6 +119,7 @@ void
 VideoPlayerForm::Initialize(void)
 {
        AppLogDebug("Initialize");
+
        Construct(L"IDL_MAIN_FORM");
 }
 
@@ -308,7 +309,7 @@ VideoPlayerForm::OnInitializing(void)
 
        __pVideoPlayerPresentationModel->SetOverlayPanel(__pOverlayPanel);
 
-       __pVideoPlayerPresentationModel->InitializePlayer();
+       r = __pVideoPlayerPresentationModel->InitializePlayer();
        TryCatch(r == E_SUCCESS, , "InitializePlayer() failed : %s", GetErrorMessage(r));
 
        __pVideoPlayerPresentationModel->SetVideoPlayerEventListener(this);
@@ -470,6 +471,7 @@ result
 VideoPlayerForm::OnTerminating(void)
 {
        AppLogDebug("OnTerminating");
+
        DeleteTimer();
        DestroyPresentationModelInstance();
 
@@ -489,6 +491,7 @@ void
 VideoPlayerForm::OnSceneActivatedN(const SceneId& previousSceneId, const SceneId& currentSceneId, IList* pArgs)
 {
        result r = E_FAILURE;
+
        AppLogDebug("OnSceneActivatedN");
 
        String totalTime;
@@ -968,7 +971,12 @@ VideoPlayerForm::OnActionPerformed(const Control& source, int actionId)
                        pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_PATH), pList);
                        pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_MESSAGE_TYPE), new (std::nothrow) String(APPCONTROL_DATA_MMS));
 
-                       pAppControl->Start(null, null, pDataList, this);
+                       r = pAppControl->Start(null, null, pDataList, this);
+
+                       if (r == E_SUCCESS)
+                       {
+                               __pShareButton->RemoveActionEventListener(*this);
+                       }
 
                        delete pAppControl;
                }
@@ -990,7 +998,12 @@ VideoPlayerForm::OnActionPerformed(const Control& source, int actionId)
                        pList->Add(new (std::nothrow) String(filePath));
                        pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_PATH), pList);
 
-                       pAppControl->Start(null, null, pDataList, this);
+                       r = pAppControl->Start(null, null, pDataList, this);
+
+                       if (r == E_SUCCESS)
+                       {
+                               __pShareButton->RemoveActionEventListener(*this);
+                       }
 
                        delete pAppControl;
                }
@@ -1492,6 +1505,8 @@ VideoPlayerForm::ShowControlByFrameActivated(void)
 {
        AppLogDebug("ShowControlByFrameActivated");
 
+       __pShareButton->AddActionEventListener(*this);
+
        CheckCallStatus();
        CheckLowBatteryStatus();
 }