//
// 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
//
static const wchar_t* IDC_KEY_BG_LABEL = L"IDC_KEY_BG_LABEL";
static const wchar_t* IDC_CALLER1_BIGPHOTO_LABEL = L"IDC_CALLER1_BIGPHOTO_LABEL";
static const wchar_t* IDB_END_CALL_DEFAULT_ICON = L"C01-1_call_default_caller ID_720x720.png";
+static const wchar_t* IDC_VOICECALL_BUTTON = L"IDC_VOICECALL_BUTTON";
+static const wchar_t* IDC_VIDEOCALL_BUTTON = L"IDC_VIDEOCALL_BUTTON";
+static const wchar_t* IDC_ADD_TO_CONTACT_BUTTON = L"IDC_ADD_TO_CONTACT_BUTTON";
+static const wchar_t* IDC_MSG_BUTTON = L"IDC_MSG_BUTTON";
EndCallForm::EndCallForm(void)
__pCallButtonsPanel = new (std::nothrow) CallButtonsPanel();
__pCallButtonsPanel->ConstructPanel(this, FORMTYPE_ENDCALL);
__pCallButtonsPanel->SetBounds(pKeysBgLbl->GetBounds());
- AddControl(*__pCallButtonsPanel);
+ AddControl(__pCallButtonsPanel);
}
RelativeLayout* pRelativeLayout = dynamic_cast<RelativeLayout*>(GetPortraitLayoutN());
{
case IDA_VOICE_CALL:
{
+ if (__isMsgAppControlLaunched == true)
+ {
+ //AppControl already launched.
+ return;
+ }
//check if EndCallTimer is running, then cancel it
if(__pEndCallEventTimer != null)
{
bool isSimInitialized = __pCallPresentor->CheckSimInitializationIsCompleted();
if (isSimInitialized)
{
+ //Disable all buttons
+ Button* pButton = static_cast<Button*>(GetControl(IDC_VIDEOCALL_BUTTON,true));
+ pButton->SetEnabled(false);
+ pButton->Invalidate(true);
+ pButton = static_cast<Button*>(GetControl(IDC_VOICECALL_BUTTON,true));
+ pButton->SetEnabled(false);
+ pButton->Invalidate(true);
+ pButton = static_cast<Button*>(GetControl(IDC_ADD_TO_CONTACT_BUTTON,true));
+ if(pButton->GetShowState() == true)
+ {
+ pButton->SetEnabled(false);
+ pButton->Invalidate(true);
+ }
+ pButton = static_cast<Button*>(GetControl(IDC_MSG_BUTTON,true));
+ pButton->SetEnabled(false);
+ pButton->Invalidate(true);
//Check if dialing an emergency call
bool isEmergencyCall = __pCallPresentor->IsEmergencyNumber(*contactTxt, true);
if (isEmergencyCall)
{
//cancel EndCallTimer, if AppControl request was successful.
__pEndCallEventTimer->Cancel();
+ //Disable the call buttons
+ Button* pButton = static_cast<Button*>(GetControl(IDC_VIDEOCALL_BUTTON,true));
+ pButton->SetEnabled(false);
+ pButton->Invalidate(true);
+ pButton = static_cast<Button*>(GetControl(IDC_VOICECALL_BUTTON,true));
+ pButton->SetEnabled(false);
+ pButton->Invalidate(true);
+ pButton = static_cast<Button*>(GetControl(IDC_ADD_TO_CONTACT_BUTTON,true));
+ if(pButton->GetShowState() == true)
+ {
+ pButton->SetEnabled(false);
+ pButton->Invalidate(true);
+ }
}
}
break;
return;
}
HandleAddToContacts();
+ Button* pButton = static_cast<Button*>(GetControl(IDC_VIDEOCALL_BUTTON,true));
+ pButton->SetEnabled(false);
+ pButton->Invalidate(true);
+ pButton = static_cast<Button*>(GetControl(IDC_VOICECALL_BUTTON,true));
+ pButton->SetEnabled(false);
+ pButton->Invalidate(true);
+ pButton = static_cast<Button*>(GetControl(IDC_ADD_TO_CONTACT_BUTTON,true));
+ if(pButton->GetShowState() == true)
+ {
+ pButton->SetEnabled(false);
+ pButton->Invalidate(true);
+ }
+ pButton = static_cast<Button*>(GetControl(IDC_MSG_BUTTON,true));
+ pButton->SetEnabled(false);
+ pButton->Invalidate(true);
}
break;
}
else if(pEndCall->GetCalllogType() == CALL_LOG_TYPE_VOICE_INCOMING)
{
- __pCallButtonsPanel->ShowOrHideAddtoContactsButton(true);
+ if(pEndCall->GetContactNumber().IsEmpty() == false)
+ {
+ __pCallButtonsPanel->ShowOrHideAddtoContactsButton(true);
+ }
}
}
delete pArgs;
pArgs = null;
}
+ CallApp* pCallApp = static_cast<CallApp*>(CallApp::GetInstance());
+ pCallApp->SetTopMostWindow(false);
AddOrientationEventListener(*this);
}
{
if (__pSmallPhotoLabel != null)
{
- RemoveControl(*__pSmallPhotoLabel);
+ RemoveControl(__pSmallPhotoLabel);
__pSmallPhotoLabel = null;
}
//Draw Small Photo and show on small photo label
__pSmallPhotoLabel->SetBackgroundColor(Color(0,0,0));
__pSmallPhotoLabel->SetBackgroundBitmap(pPhotoId);
// Add a Label to the Form
- AddControl(*__pSmallPhotoLabel);
+ AddControl(__pSmallPhotoLabel);
__pSmallPhotoLabel->Invalidate(true);
}
}
__pCallPresentor->AppControlRequestCompleted();
}
+ //Enable all buttons
+ Button* pButton = static_cast<Button*>(GetControl(IDC_VIDEOCALL_BUTTON,true));
+ pButton->SetEnabled(true);
+ pButton->Invalidate(true);
+ pButton = static_cast<Button*>(GetControl(IDC_VOICECALL_BUTTON,true));
+ pButton->SetEnabled(true);
+ pButton->Invalidate(true);
+ pButton = static_cast<Button*>(GetControl(IDC_ADD_TO_CONTACT_BUTTON,true));
+ if(pButton->GetShowState() == true)
+ {
+ pButton->SetEnabled(true);
+ pButton->Invalidate(true);
+ }
+ pButton = static_cast<Button*>(GetControl(IDC_MSG_BUTTON,true));
+ pButton->SetEnabled(true);
+ pButton->Invalidate(true);
AppLogDebug("Exit");
}