Fix N_SE-48032 N_SE-48035 tizen 2.2_release submit/tizen/20131031.214452 submit/tizen_2.2/20130814.085706 submit/tizen_2.2/20130814.101526
authorAbhismita Ghosh <g.abhismita@samsung.com>
Fri, 2 Aug 2013 10:58:45 +0000 (19:58 +0900)
committerAbhismita Ghosh <g.abhismita@samsung.com>
Fri, 2 Aug 2013 12:22:35 +0000 (21:22 +0900)
Change-Id: I297500dc3451ba20f13d7e1f94b2e0902acb011a

inc/VpVideoPlayerForm.h
src/VpVideoPlayerForm.cpp
src/VpVideoPlayerPresentationModel.cpp

index f7a8272..53aca9c 100755 (executable)
@@ -42,6 +42,7 @@ class VideoPlayerForm
        , public Tizen::Ui::Controls::ISliderEventListener
        , public Tizen::Ui::IActionEventListener
        , public Tizen::Ui::IAdjustmentEventListener
+       , public Tizen::Ui::IFocusEventListener
        , public Tizen::Ui::IKeyEventListener
        , public Tizen::Ui::IOrientationEventListener
        , public Tizen::Ui::ITouchEventListener
@@ -84,6 +85,9 @@ public:
 
        virtual void OnAdjustmentValueChanged(const Tizen::Ui::Control& source, int adjustment);
 
+       virtual void OnFocusGained(const Tizen::Ui::Control& source){}
+       virtual void OnFocusLost(const Tizen::Ui::Control& source);
+
        virtual void OnKeyPressed(const Tizen::Ui::Control& source, Tizen::Ui::KeyCode keyCode);
        virtual void OnKeyReleased(const Tizen::Ui::Control& source, Tizen::Ui::KeyCode keyCode);
        virtual void OnKeyLongPressed(const Tizen::Ui::Control& source, Tizen::Ui::KeyCode keyCode);
index 19a82bd..ee9d828 100644 (file)
@@ -497,6 +497,7 @@ VideoPlayerForm::InitializeController(void)
        __pFastRewindButton ->AddActionEventListener(*this);
        __pFastRewindButton->AddTouchEventListener(*this);
        __pFastRewindButton->AddKeyEventListener(*this);
+       __pFastRewindButton->AddFocusEventListener(*this);
 
        __pFastForwardButton = static_cast<Button*>(__pControllerPanel->GetControl(IDC_BUTTON_FASTFORWARD));
        TryCatch(__pFastForwardButton != null, r = E_SYSTEM, "__pFastForwardButton is null");
@@ -504,6 +505,7 @@ VideoPlayerForm::InitializeController(void)
        __pFastForwardButton->AddActionEventListener(*this);
        __pFastForwardButton->AddTouchEventListener(*this);
        __pFastForwardButton->AddKeyEventListener(*this);
+       __pFastForwardButton->AddFocusEventListener(*this);
 
        SetFormBackEventListener(this);
 
@@ -1339,6 +1341,19 @@ VideoPlayerForm::OnAdjustmentValueChanged(const Control& source, int adjustment)
 }
 
 void
+VideoPlayerForm::OnFocusLost(const Tizen::Ui::Control& source)
+{
+       AppLogDebug("OnFocusLost Control : %ls, KeyCode : %d", source.GetName().GetPointer());
+
+       if ((&source == __pFastForwardButton
+               || &source == __pFastRewindButton)
+               && __actionTouchLongPressed == true)
+       {
+               __pVideoPlayerPresentationModel->StopFastForwardRewind();
+       }
+}
+
+void
 VideoPlayerForm::OnKeyPressed(const Tizen::Ui::Control& source, Tizen::Ui::KeyCode keyCode)
 {
        __pUiControlTimer->Cancel();
index 480604a..cdc0c8e 100644 (file)
@@ -473,7 +473,7 @@ CATCH:
 result
 VideoPlayerPresentationModel::PausePlay(void)
 {
-       result r = E_FAILURE;
+       result r = E_SUCCESS;
        PlayerState playState = GetState();
        AppLogDebug("PausePlay : %d", playState);