X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=src%2FCallIncomingCallForm.cpp;h=85b0e36a9b95a4cbc504525fb3342248717f016b;hb=09d56b2439506159bd80c63e2a19be25fcaf310e;hp=f4ec54e78826505a4d07af972daf92e791adeec8;hpb=29213e4295ec2684cd073bb20ee45339bc0e9613;p=apps%2Fosp%2FCall.git diff --git a/src/CallIncomingCallForm.cpp b/src/CallIncomingCallForm.cpp index f4ec54e..85b0e36 100644 --- a/src/CallIncomingCallForm.cpp +++ b/src/CallIncomingCallForm.cpp @@ -732,6 +732,9 @@ void IncomingCallForm::OnSceneActivatedN(const SceneId& previousSceneId, const SceneId& currentSceneId, IList* pArgs) { AddOrientationEventListener(*this); + //listen to Foreground events + CallApp* pPhoneApp = static_cast(CallApp::GetInstance()); + pPhoneApp->AddAppStateChangeListener(*this); if(__pCallPresentor == null) { __pCallPresentor = CallPresentationModel::GetInstance(); @@ -868,6 +871,7 @@ IncomingCallForm::OnSceneDeactivated(const SceneId& currentSceneId, const SceneI } CallApp* pCallApp = static_cast(CallApp::GetInstance()); pCallApp->SetTopMostWindow(false); + pCallApp->RemoveAppStateChangeListener(*this); } result @@ -1311,9 +1315,10 @@ IncomingCallForm::OnTouchPressed(const Control& source, const Point& currentPosi void IncomingCallForm::OnTouchReleased(const Control& source, const Point& currentPosition, const TouchEventInfo& touchInfo) { + AppLogDebug("%d",currentPosition.x); if (__isAnswerCallStarted == true) { - if (currentPosition.x > REJECT_LABEL_X_OFFSET) + if (currentPosition.x > __pRejectLabel->GetBounds().x) { //Right reject icon if(__pRejectFinalVisElem == null) @@ -1388,7 +1393,7 @@ IncomingCallForm::OnTouchReleased(const Control& source, const Point& currentPos } else if (__isRejectCallStarted == true) { - if (currentPosition.x < ACCEPT_LABEL_RELATIVE_POS) + if (currentPosition.x < ((__pAcceptLabel->GetBounds().x + __pAcceptLabel->GetWidth())- __pRejectLabel->GetBounds().x)) { //left dial icon if(__pAcceptFinalVisElem == null) @@ -1581,3 +1586,9 @@ IncomingCallForm::OnOrientationChanged(const Control& source, OrientationStatus } } + +void +IncomingCallForm::OnForeground(void) +{ + __pCallPresentor->OnAppForeground(); +}