#include <FUi.h>
#include <FMedia.h>
#include <FSystem.h>
+#include <FShell.h>
#include "CallActiveCallForm.h"
#include "CallButtonsPanel.h"
#include "CallInfo.h"
#include "CallPresentationModel.h"
#include "CallSceneRegister.h"
#include "CallTypes.h"
+#include "CallApp.h"
using namespace Tizen::App;
using namespace Tizen::Base;
using namespace Tizen::Ui;
using namespace Tizen::Ui::Controls;
using namespace Tizen::Ui::Scenes;
+using namespace Tizen::Shell;
//constants
const int IDI_MAX_SECONDS = 60;
{
//update rect according to client screen area
Rectangle rect(0, 0, 0, 0);
- if (GetOrientationStatus() == ORIENTATION_STATUS_PORTRAIT)
+ if (GetOrientationStatus() == ORIENTATION_STATUS_PORTRAIT || GetOrientationStatus() == ORIENTATION_STATUS_PORTRAIT_REVERSE)
{
rect.width = GetClientAreaBounds().width;
rect.height = GetClientAreaBounds().height - __pCallButtonsPanel->GetHeight();
}
- else if (GetOrientationStatus() == ORIENTATION_STATUS_LANDSCAPE)
+ else if (GetOrientationStatus() == ORIENTATION_STATUS_LANDSCAPE || GetOrientationStatus() == ORIENTATION_STATUS_LANDSCAPE_REVERSE)
{
rect.height = GetClientAreaBounds().height;
rect.width = GetClientAreaBounds().width - __pCallButtonsPanel->GetWidth();
//change orientation of DTMF Keypad, if it is visible.
if (__pDTMFKeypad != null)
{
- if (orientationStatus == ORIENTATION_STATUS_LANDSCAPE)
+ if (orientationStatus == ORIENTATION_STATUS_LANDSCAPE || orientationStatus == ORIENTATION_STATUS_LANDSCAPE_REVERSE)
{
//in landscape mode, caller info is visible.
SetShowStateOnKeypad(true);
+ SetHoldButtonShowState(false);
}
- else if (orientationStatus == ORIENTATION_STATUS_PORTRAIT)
+ else if (orientationStatus == ORIENTATION_STATUS_PORTRAIT || orientationStatus == ORIENTATION_STATUS_PORTRAIT_REVERSE)
{
//in Portrait mode it is hidden beneath DTMF Keypad.
SetShowStateOnKeypad(false);
{
pRelativeLayout->SetRelation(*__pCallButtonsPanel, *pKeysBgLbl, RECT_EDGE_RELATION_LEFT_TO_LEFT);
pRelativeLayout->SetRelation(*__pCallButtonsPanel, *pKeysBgLbl, RECT_EDGE_RELATION_RIGHT_TO_RIGHT);
+ pRelativeLayout->SetRelation(*__pCallButtonsPanel, *pKeysBgLbl, RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM);
+ pRelativeLayout->SetRelation(*__pCallButtonsPanel, *pKeysBgLbl, RECT_EDGE_RELATION_TOP_TO_TOP);
}
return r;
case IDA_OPEN_NUMKEYPAD:
{
- if (GetOrientationStatus() == ORIENTATION_STATUS_PORTRAIT)
+ if (GetOrientationStatus() == ORIENTATION_STATUS_PORTRAIT || GetOrientationStatus() == ORIENTATION_STATUS_PORTRAIT_REVERSE)
{
//hide only in portrait mode.
- SetShowStateOnKeypad(false);
+ SetShowStateOnKeypad(false);
}
+ //Hide the hold button as it goes behind DTMF keypad
+ SetHoldButtonShowState(false);
ShowDTMFKeypad();
__pCallButtonsPanel->SetKeypadButtonState(IDA_CLOSE_NUMKEYPAD);
}
//switch to Dialer Form to make an call
if(__pCallPresentor->GetCurrentCallCount() == 1)
{
-/* ArrayList* pArgs = new (std::nothrow) ArrayList(SingleObjectDeleter);
- pArgs->Construct();
- String* formType = new (std::nothrow) String();
- formType->Append(__formType);
- pArgs->Add(formType);
- pSceneManager->GoForward( ForwardSceneTransition(IDSCN_DIALER, SCENE_TRANSITION_ANIMATION_TYPE_NONE,
- SCENE_HISTORY_OPTION_NO_HISTORY), pArgs);*/
- __pCallPresentor->LaunchDialAppControl();
-
+ __pCallPresentor->LaunchDialAppControl();
}
}
break;
__pCallPresentor->SetTelEventListener(this);
AddOrientationEventListener(*this);
+ CallApp* pPhoneApp = static_cast<CallApp*>(CallApp::GetInstance());
+ pPhoneApp->AddAppStateChangeListener(*this);
+
//Initialize keypad and buttons
InitializeCallButtonsPanel();
break;
}
+ if(__formType == FORMTYPE_ACTIVECALL || __formType == FORMTYPE_EMERGENCYACTIVECALL ||
+ __formType == FORMTYPE_MULTIPLECALLS || __formType == FORMTYPE_ACTIVECONFCALL)
+ {
+ //Unlock the phone if its locked
+ if(LockManager::GetInstance()->IsLocked())
+ {
+ AppLogDebug("Phone Locked");
+ LockManager::GetInstance()->Unlock();
+ }
+ }
+
//Hide DTMFKeypad, if visible and show caller info
HideDTMFKeypad();
SetShowStateOnKeypad(true);
delete pArgs;
pArgs = null;
}
+
+ CallApp* pCallApp = static_cast<CallApp*>(CallApp::GetInstance());
+ pCallApp->SetTopMostWindow(false);
}
void
__pMoreOptionsList->SetShowState(false);
}
__DtmfString.Clear();
+ CallApp* pCallApp = static_cast<CallApp*>(CallApp::GetInstance());
+ pCallApp->RemoveAppStateChangeListener(*this);
}
void
}
void
+ActiveCallForm::SetHoldButtonShowState(bool showState)
+{
+ Label* pLblControl = static_cast<Label*>(GetControl(IDC_HOLD_LABEL));
+ if(pLblControl != null)
+ {
+ pLblControl->SetShowState(showState);
+ }
+ Button* pButtonControl = static_cast<Button*>(GetControl(IDC_HOLD_BUTTON));
+ if(pButtonControl != null)
+ {
+ pButtonControl->SetShowState(showState);
+ }
+}
+
+void
ActiveCallForm::SetShowStateOnKeypad(bool showState)
{
Label* pLblControl = static_cast<Label*>(GetControl(IDC_CALLER1_LABEL));
pLblControl->SetShowState(showState);
pLblControl = static_cast<Label*>(GetControl(IDC_VOICE_CALL_ICON_LABEL));
pLblControl->SetShowState(showState);
- pLblControl = static_cast<Label*>(GetControl(IDC_HOLD_LABEL));
- pLblControl->SetShowState(showState);
- Button* pButtonControl = static_cast<Button*>(GetControl(IDC_HOLD_BUTTON));
- pButtonControl->SetShowState(showState);
+ SetHoldButtonShowState(showState);
}
break;
{
pLblControl = static_cast<Label*>(GetControl(IDC_PARTICIPANTS_LABEL));
pLblControl->SetShowState(showState);
- pLblControl = static_cast<Label*>(GetControl(IDC_HOLD_LABEL));
- pLblControl->SetShowState(showState);
- Button* pButtonControl = static_cast<Button*>(GetControl(IDC_HOLD_BUTTON));
- pButtonControl->SetShowState(showState);
- pButtonControl = static_cast<Button*>(GetControl(IDC_CONF_CALL_MORE_BUTTON));
+ SetHoldButtonShowState(showState);
+ Button* pButtonControl = static_cast<Button*>(GetControl(IDC_CONF_CALL_MORE_BUTTON));
pButtonControl->SetShowState(showState);
}
break;
delete pItem;
return true;
}
+
+void
+ActiveCallForm::OnForeground(void)
+{
+ AppLogDebug("Enter");
+ __pCallPresentor->OnAppForeground();
+}