2 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
4 // Licensed under the Flora License, Version 1.0 (the License);
5 // you may not use this file except in compliance with the License.
6 // You may obtain a copy of the License at
8 // http://floralicense.org/license/
10 // Unless required by applicable law or agreed to in writing, software
11 // distributed under the License is distributed on an AS IS BASIS,
12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 // See the License for the specific language governing permissions and
14 // limitations under the License.
18 * @file CallEndCallForm.cpp
19 * @brief End Call form implementation
25 #include "CallAppUtility.h"
26 #include "CallEndCallForm.h"
27 #include "CallButtonsPanel.h"
28 #include "CallPresentationModel.h"
29 #include "CallSceneRegister.h"
30 #include "CallTypes.h"
32 using namespace Tizen::App;
33 using namespace Tizen::Base;
34 using namespace Tizen::Base::Collection;
35 using namespace Tizen::Graphics;
36 using namespace Tizen::Media;
37 using namespace Tizen::Ui;
38 using namespace Tizen::Ui::Controls;
39 using namespace Tizen::Ui::Scenes;
40 using namespace Tizen::Social;
43 const int IDI_APP_END_TIMER = 3000;
44 const int W_PHOTO_LABEL = 720;
45 const int H_PHOTO_LABEL = 720;
46 const int X_PHOTO_LBL = 166;
47 const int Y_PHOTO_LBL = 232;
48 const int W_PHOTO_LBL = 388;
49 const int H_PHOTO_LBL = 388;
50 static const wchar_t* IDL_END_CALL_FORM = L"IDL_END_CALL_FORM";
51 static const wchar_t* IDC_NUMBER1_LABEL = L"IDC_NUMBER1_LABEL";
52 static const wchar_t* IDC_CALLER1_LABEL = L"IDC_CALLER1_LABEL";
53 static const wchar_t* IDC_KEY_BG_LABEL = L"IDC_KEY_BG_LABEL";
54 static const wchar_t* IDC_CALLER1_BIGPHOTO_LABEL = L"IDC_CALLER1_BIGPHOTO_LABEL";
55 static const wchar_t* IDB_END_CALL_DEFAULT_ICON = L"C01-1_call_default_caller ID_720x720.png";
56 static const wchar_t* IDC_VOICECALL_BUTTON = L"IDC_VOICECALL_BUTTON";
57 static const wchar_t* IDC_VIDEOCALL_BUTTON = L"IDC_VIDEOCALL_BUTTON";
58 static const wchar_t* IDC_ADD_TO_CONTACT_BUTTON = L"IDC_ADD_TO_CONTACT_BUTTON";
59 static const wchar_t* IDC_MSG_BUTTON = L"IDC_MSG_BUTTON";
62 EndCallForm::EndCallForm(void)
63 : BaseForm(FORMTYPE_ENDCALL)
65 __pCallButtonsPanel = null;
66 __pContactNumber = null;
67 __pEndCallEventTimer = null;
68 __pSmallPhotoLabel = null;
69 __isMsgAppControlLaunched = false;
70 __isContactAppControlLaunched = false;
73 EndCallForm::~EndCallForm(void)
75 if (__pEndCallEventTimer != null)
77 __pEndCallEventTimer->Cancel();
78 delete __pEndCallEventTimer;
79 __pEndCallEventTimer = null;
81 if (__pSmallPhotoLabel != null)
83 __pSmallPhotoLabel = null;
88 EndCallForm::Initialize(void)
90 Construct(IDL_END_CALL_FORM);
94 EndCallForm::OnInitializing(void)
98 //initialize keypad and buttons
99 InitializeCallButtonsPanel();
101 __pEndCallEventTimer = new (std::nothrow) Tizen::Base::Runtime::Timer();
102 r = __pEndCallEventTimer->Construct(*this);
104 __pCallPresentor = CallPresentationModel::GetInstance();
109 EndCallForm::InitializeCallButtonsPanel(void)
111 Label* pKeysBgLbl = static_cast<Label*>(GetControl(IDC_KEY_BG_LABEL, true));
112 Bitmap* pBgBitmap = AppUtility::GetBitmapFromResourcesN(IDB_BACKGROUND_BITMAP, pKeysBgLbl->GetWidth(), pKeysBgLbl->GetHeight());
113 if (pBgBitmap != null)
115 pKeysBgLbl->SetBackgroundBitmap(*pBgBitmap);
117 if (__pCallButtonsPanel == null)
119 __pCallButtonsPanel = new (std::nothrow) CallButtonsPanel();
120 __pCallButtonsPanel->ConstructPanel(this, FORMTYPE_ENDCALL);
121 __pCallButtonsPanel->SetBounds(pKeysBgLbl->GetBounds());
122 AddControl(*__pCallButtonsPanel);
125 RelativeLayout* pRelativeLayout = dynamic_cast<RelativeLayout*>(GetPortraitLayoutN());
126 if (pRelativeLayout != null)
128 pRelativeLayout->SetRelation(*__pCallButtonsPanel, *pKeysBgLbl, RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM);
130 pRelativeLayout = dynamic_cast<RelativeLayout*>(GetLandscapeLayoutN());
131 if (pRelativeLayout != null)
133 pRelativeLayout->SetRelation(*__pCallButtonsPanel, *pKeysBgLbl, RECT_EDGE_RELATION_LEFT_TO_LEFT);
134 pRelativeLayout->SetRelation(*__pCallButtonsPanel, *pKeysBgLbl, RECT_EDGE_RELATION_RIGHT_TO_RIGHT);
139 EndCallForm::AddKeyPadActionListener(const String& keyName, CommandIds cmdId)
141 Button* pButton = static_cast<Button*>(GetControl(keyName));
144 pButton->SetActionId(cmdId);
145 pButton->AddActionEventListener(*this);
150 EndCallForm::OnTerminating(void)
152 result r = E_SUCCESS;
154 if (__pCallPresentor)
156 __pCallPresentor = null;
162 EndCallForm::OnActionPerformed(const Control& source, int actionId)
164 SceneManager* pSceneManager = SceneManager::GetInstance();
165 AppAssert(pSceneManager);
171 if (__isMsgAppControlLaunched == true)
173 //AppControl already launched.
176 //check if EndCallTimer is running, then cancel it
177 if(__pEndCallEventTimer != null)
179 __pEndCallEventTimer->Cancel();
181 //make an outgoing call with given number
182 String* contactTxt = new (std::nothrow) String(*__pContactNumber);
183 //switch to dialing outgoing call form
184 ArrayList* pContact = new (std::nothrow) ArrayList(SingleObjectDeleter);
185 pContact->Construct();
186 pContact->Add(contactTxt);
188 //Check if dialing a call is possible
189 bool isSimInitialized = __pCallPresentor->CheckSimInitializationIsCompleted();
190 if (isSimInitialized)
192 //Disable all buttons
193 Button* pButton = static_cast<Button*>(GetControl(IDC_VIDEOCALL_BUTTON,true));
194 pButton->SetEnabled(false);
195 pButton->Invalidate(true);
196 pButton = static_cast<Button*>(GetControl(IDC_VOICECALL_BUTTON,true));
197 pButton->SetEnabled(false);
198 pButton->Invalidate(true);
199 pButton = static_cast<Button*>(GetControl(IDC_ADD_TO_CONTACT_BUTTON,true));
200 if(pButton->GetShowState() == true)
202 pButton->SetEnabled(false);
203 pButton->Invalidate(true);
205 pButton = static_cast<Button*>(GetControl(IDC_MSG_BUTTON,true));
206 pButton->SetEnabled(false);
207 pButton->Invalidate(true);
208 //Check if dialing an emergency call
209 bool isEmergencyCall = __pCallPresentor->IsEmergencyNumber(*contactTxt, true);
212 pSceneManager->GoForward( ForwardSceneTransition( IDSCN_SCENE_OUT_EMERGENCYCALL), pContact);
216 pSceneManager->GoForward( ForwardSceneTransition(IDSCN_SCENE_OUTCALL), pContact);
221 //Show error message Popup
222 HandleTelephonyError(ERROR_CODE_SIM_INITIALIZATION_FAILED);
233 if (__isMsgAppControlLaunched == true)
235 //AppControl already launched.
238 //launch message AppControl
239 __isMsgAppControlLaunched = __pCallPresentor->LaunchComposeMessageAppControl(*__pContactNumber, this);
240 if (__isMsgAppControlLaunched == true && __pEndCallEventTimer != null)
242 //cancel EndCallTimer, if AppControl request was successful.
243 __pEndCallEventTimer->Cancel();
244 //Disable the call buttons
245 Button* pButton = static_cast<Button*>(GetControl(IDC_VIDEOCALL_BUTTON,true));
246 pButton->SetEnabled(false);
247 pButton->Invalidate(true);
248 pButton = static_cast<Button*>(GetControl(IDC_VOICECALL_BUTTON,true));
249 pButton->SetEnabled(false);
250 pButton->Invalidate(true);
251 pButton = static_cast<Button*>(GetControl(IDC_ADD_TO_CONTACT_BUTTON,true));
252 if(pButton->GetShowState() == true)
254 pButton->SetEnabled(false);
255 pButton->Invalidate(true);
261 case IDA_ADD_TO_CONTACTS:
263 if(__isContactAppControlLaunched == true)
265 //AppControl already launched.
266 AppLogDebug("__isContactAppControlLaunched == true");
269 HandleAddToContacts();
270 Button* pButton = static_cast<Button*>(GetControl(IDC_VIDEOCALL_BUTTON,true));
271 pButton->SetEnabled(false);
272 pButton->Invalidate(true);
273 pButton = static_cast<Button*>(GetControl(IDC_VOICECALL_BUTTON,true));
274 pButton->SetEnabled(false);
275 pButton->Invalidate(true);
276 pButton = static_cast<Button*>(GetControl(IDC_ADD_TO_CONTACT_BUTTON,true));
277 if(pButton->GetShowState() == true)
279 pButton->SetEnabled(false);
280 pButton->Invalidate(true);
282 pButton = static_cast<Button*>(GetControl(IDC_MSG_BUTTON,true));
283 pButton->SetEnabled(false);
284 pButton->Invalidate(true);
294 EndCallForm::HandleAddToContacts(void)
296 AppLogDebug("Enter");
298 Contact* pContact = __pCallPresentor->GetContactN(*__pContactNumber);
299 //Launch Contact AppControl
300 String requestParameter;
301 if (pContact != null)
304 requestParameter.Append(pContact->GetRecordId());
305 __isContactAppControlLaunched = __pCallPresentor->LaunchViewContactAppControl(requestParameter, this);
312 requestParameter.Append(*__pContactNumber);
313 __isContactAppControlLaunched = __pCallPresentor->LaunchAddContactAppControl(requestParameter, this);
316 if (__isContactAppControlLaunched == true && __pEndCallEventTimer != null)
318 //cancel EndCallTimer, if AppControl request was success.
319 __pEndCallEventTimer->Cancel();
324 EndCallForm::OnSceneActivatedN(const SceneId& previousSceneId, const SceneId& currentSceneId, IList* pArgs)
326 //set itself as listener
327 __pCallPresentor->SetTelEventListener(this);
328 //listen to Foreground events
329 CallApp* pPhoneApp = static_cast<CallApp*>(CallApp::GetInstance());
330 pPhoneApp->AddAppStateChangeListener(*this);
331 __isMsgAppControlLaunched = false;
332 __isContactAppControlLaunched = false;
336 case FORMTYPE_ENDCALL:
338 //fetch ended call details
339 AppCallInfo* pEndCall = static_cast<AppCallInfo*>(pArgs->GetAt(0));
342 __pContactNumber = new (std::nothrow) String();
343 if(pEndCall->GetContactNumber().IsEmpty() == false)
345 __pContactNumber->Append(pEndCall->GetContactNumber());
349 __pContactNumber->Append(AppUtility::GetResourceString(IDS_NUMBER_UNKNOWN));
352 //Fetch & show contact person details
353 ShowPersonDetails(*__pContactNumber, IDC_CALLER1_LABEL, IDC_CALLER1_BIGPHOTO_LABEL,pEndCall);
354 //If call is hidden means contact number is empty,
355 //or if call is from known number(i.e present in contacts db), Then do NOT show "Add to Contact" button.
356 if (pEndCall->GetContactInfo() != null)
358 //Check if contact is deleted in mean time.
359 Contact* pContact = __pCallPresentor->GetContactN(pEndCall->GetContactNumber());
360 //before setting check if the contact is deleted
363 ShowViewContactButton();
369 ShowAddContactButton();
375 ShowAddContactButton();
378 //Check if call is Emergency call or Hidden call,
379 //then disable all button in Call button panel.
380 if (pEndCall->IsEmergency() == true || pEndCall->GetContactNumber().IsEmpty() == true)
382 __pCallButtonsPanel->SetEndCallPanelState(false);
386 __pCallButtonsPanel->SetEndCallPanelState(true);
389 //check if we reached the end call form of an outgoing call then don't show add to contacts
390 if(pEndCall->GetCalllogType() == CALL_LOG_TYPE_VOICE_OUTGOING)
392 __pCallButtonsPanel->ShowOrHideAddtoContactsButton(false);
394 else if(pEndCall->GetCalllogType() == CALL_LOG_TYPE_VOICE_INCOMING)
396 __pCallButtonsPanel->ShowOrHideAddtoContactsButton(true);
406 //Before starting end call timer check if messaging appcontrol was launched during incoming call
407 if (__pEndCallEventTimer && __pCallPresentor->IsAppControlRunning() == false)
409 __pEndCallEventTimer->Start(IDI_APP_END_TIMER);
418 CallApp* pCallApp = static_cast<CallApp*>(CallApp::GetInstance());
419 pCallApp->SetTopMostWindow(false);
420 AddOrientationEventListener(*this);
424 EndCallForm::OnSceneDeactivated(const SceneId& currentSceneId, const SceneId& nextSceneId)
426 if (__pEndCallEventTimer != null)
428 __pEndCallEventTimer->Cancel();
430 if (__pContactNumber)
432 delete __pContactNumber;
433 __pContactNumber = null;
435 if (__pSmallPhotoLabel != null)
437 __pSmallPhotoLabel->SetShowState(false);
439 //remove itself as listener
440 CallApp* pPhoneApp = static_cast<CallApp*>(CallApp::GetInstance());
441 pPhoneApp->RemoveAppStateChangeListener(*this);
442 RemoveOrientationEventListener(*this);
446 EndCallForm::OnDraw(void)
452 EndCallForm::ShowViewContactButton(void)
454 __pCallButtonsPanel->ShowViewContactButton();
458 EndCallForm::ShowAddContactButton(void)
460 __pCallButtonsPanel->ShowAddContactButton();
464 EndCallForm::ShowPhoneNumber(const String& phoneNumber, const String& lblName)
466 String formattedNumber = phoneNumber;
467 Label* pContactLbl = static_cast<Label*>(GetControl(lblName));
468 pContactLbl->SetText(formattedNumber);
472 EndCallForm::ShowPersonDetails(const String& phoneNumber, const String& nameLblName, const String& photoLblName, AppCallInfo* pCallInfo)
475 ShowPhoneNumber(phoneNumber, IDC_NUMBER1_LABEL);
477 Label* pNameLbl = static_cast<Label*>(GetControl(nameLblName));
478 Label* pPhotoLbl = static_cast<Label*>(GetControl(photoLblName));
480 //fetch contact details based on phone number
481 String* pDisplayName = pCallInfo->FetchCallerNameN();
482 Bitmap* pPhotoBitmap = pCallInfo->FetchCallerPhotoN();
484 //passing an empty string to SetText fails in label,
485 //if previously valid text has been set
486 if (pDisplayName != null && pDisplayName->IsEmpty() == true && pNameLbl->GetText().IsEmpty() == false)
488 pDisplayName->Append(L" ");
491 // show display name on name Label
492 if (pDisplayName != null)
494 pNameLbl->SetText(*pDisplayName);
497 // If record not found or no photo id present for user,
498 //fetch default bitmap.
499 if (pPhotoBitmap != null)
501 if(pPhotoBitmap->GetHeight() <= H_SMALL_PHOTO
502 && pPhotoBitmap->GetWidth() <= W_SMALL_PHOTO)
504 ShowThumbnailImage(pPhotoBitmap,photoLblName);
508 Canvas* pCanvas = new (std::nothrow) Canvas;
509 Rectangle canvasRect(Rectangle(0, 0, pPhotoLbl->GetBounds().width, pPhotoLbl->GetBounds().height));
510 pCanvas->Construct(canvasRect);
511 //draw the contact bitmap
512 pCanvas->DrawBitmap(canvasRect,*pPhotoBitmap);
513 Bitmap* pNewPhotoId = new Bitmap();
514 pNewPhotoId->Construct(*pCanvas, pCanvas->GetBounds());
517 pPhotoLbl->SetBackgroundBitmap(*pNewPhotoId);
518 pPhotoLbl->Invalidate(true);
525 Bitmap* pDefaultPhoto = AppUtility::GetBitmapFromResourcesN(IDB_END_CALL_DEFAULT_ICON,W_PHOTO_LABEL,H_PHOTO_LABEL);
526 if (pDefaultPhoto != null)
528 pPhotoLbl->SetBackgroundBitmap(*pDefaultPhoto);
529 pPhotoLbl->Invalidate(true);
530 delete pDefaultPhoto;
548 EndCallForm::ShowThumbnailImage(const Bitmap* pPhotoId,const String& photoLabel)
550 Label* pPhotoLbl = static_cast<Label*>(GetControl(photoLabel));
552 if (pPhotoLbl != null && pPhotoId != null)
554 Canvas* pCanvas = new (std::nothrow) Canvas;
555 Bitmap* pBackground = AppUtility::GetBitmapFromResourcesN(IDB_CALL_THUMBNAIL_BACKGROUND,W_CALL_THUMBNAIL,H_CALL_THUMBNAIL);
556 Bitmap* pShadow = AppUtility::GetBitmapFromResourcesN(IDB_CALL_THUMBNAIL_SHADOW,W_CALL_THUMBNAIL_SHADOW,H_CALL_THUMBNAIL_SHADOW);
557 Rectangle canvasRect(Rectangle(0, 0, pPhotoLbl->GetBounds().width, pPhotoLbl->GetBounds().height));
558 pCanvas->Construct(canvasRect);
559 //draw the back ground
560 pCanvas->DrawBitmap(canvasRect,*pBackground);
561 //draw shadow (to be enabled after correct shadow image is provided )
562 //pCanvas->DrawBitmap(Rectangle((pPhotoLbl->GetBounds().width/2)-(W_CALL_THUMBNAIL_SHADOW/2),
563 // (pPhotoLbl->GetBounds().height/2)-(H_CALL_THUMBNAIL_SHADOW/2),W_CALL_THUMBNAIL_SHADOW,H_CALL_THUMBNAIL_SHADOW),*pShadow);
564 //draw the contact bitmap
565 pCanvas->DrawBitmap(Rectangle((pPhotoLbl->GetBounds().width/2)-(W_SMALL_PHOTO/2),
566 (pPhotoLbl->GetBounds().height/2)-(H_SMALL_PHOTO/2),W_SMALL_PHOTO,H_SMALL_PHOTO),*pPhotoId);
567 Bitmap* pNewPhotoId = new Bitmap();
568 pNewPhotoId->Construct(*pCanvas, pCanvas->GetBounds());
571 pPhotoLbl->SetBackgroundBitmap(*pNewPhotoId);
572 pPhotoLbl->Invalidate(true);
580 EndCallForm::ShowCallersPhotoThumbnail(const Bitmap& pPhotoId)
582 if (__pSmallPhotoLabel != null)
584 RemoveControl(*__pSmallPhotoLabel);
585 __pSmallPhotoLabel = null;
587 //Draw Small Photo and show on small photo label
588 __pSmallPhotoLabel = new (std::nothrow) Label();//static_cast<Label*>(GetControl(IDC_SMALL_PHOTO_LABEL));
589 __pSmallPhotoLabel->Construct(Rectangle(X_PHOTO_LBL, Y_PHOTO_LBL, W_PHOTO_LBL, H_PHOTO_LBL), L"");
590 __pSmallPhotoLabel->SetBackgroundColor(Color(0,0,0));
591 __pSmallPhotoLabel->SetBackgroundBitmap(pPhotoId);
592 // Add a Label to the Form
593 AddControl(*__pSmallPhotoLabel);
594 __pSmallPhotoLabel->Invalidate(true);
598 EndCallForm::OnTimerExpired(Tizen::Base::Runtime::Timer& timer)
600 //goto initial scene or close application, since this was last active call.
601 HandleLastCallCompletion();
605 EndCallForm::OnAppControlCompleteResponseReceived(const AppId& appId, const String& operationId, AppCtrlResult appControlResult, const IMap* pExtraData)
607 AppLogDebug("Enter");
608 if (__isMsgAppControlLaunched == true)
610 //Message AppControl request completed.
611 __isMsgAppControlLaunched = false;
612 __pCallPresentor->AppControlRequestCompleted();
614 if(__isContactAppControlLaunched == true)
616 //notify app control completed
617 __isContactAppControlLaunched = false;
618 __pCallPresentor->AppControlRequestCompleted();
620 //AppControl completed, goto initial scene if present
622 HandleLastCallCompletion();
626 EndCallForm::HandleLastCallCompletion(void)
628 CallApp* pPhoneApp = (static_cast<CallApp*>(UiApp::GetInstance()));
629 pPhoneApp->Terminate();
633 EndCallForm::OnForeground(void)
635 AppLogDebug("Enter");
636 //If Contact app control was launched
637 //as we do not know if it success or failed.
638 if(__isContactAppControlLaunched == true)
640 if(__pEndCallEventTimer != null)
642 __pEndCallEventTimer->Start(2000);
644 if (__pContactNumber != null && __pContactNumber->IsEmpty() == false)
646 AppCallInfo* ActiveCallInfo = new (std::nothrow) AppCallInfo();
647 ActiveCallInfo->SetContactNumber(*__pContactNumber);
648 Contact* pContact = __pCallPresentor->GetContactN(*__pContactNumber);
649 if (pContact != null)
651 ActiveCallInfo->SetContactInfo(*pContact);
653 //before setting check if the contact is deleted
657 ShowViewContactButton();
663 ShowAddContactButton();
665 ShowPersonDetails(*__pContactNumber, IDC_CALLER1_LABEL, IDC_CALLER1_BIGPHOTO_LABEL,ActiveCallInfo);
666 delete ActiveCallInfo;
669 //notify app control completed
670 __isContactAppControlLaunched = false;
671 __pCallPresentor->AppControlRequestCompleted();
673 else if (__isMsgAppControlLaunched == true)
675 //Message AppControl request completed.
676 if(__pEndCallEventTimer != null)
678 __pEndCallEventTimer->Start(2000);
680 __isMsgAppControlLaunched = false;
681 __pCallPresentor->AppControlRequestCompleted();
683 else if(__pCallPresentor->IsAppControlRunning() == true)
685 if(__pEndCallEventTimer != null)
687 __pEndCallEventTimer->Start(2000);
689 __pCallPresentor->AppControlRequestCompleted();
692 Button* pButton = static_cast<Button*>(GetControl(IDC_VIDEOCALL_BUTTON,true));
693 pButton->SetEnabled(true);
694 pButton->Invalidate(true);
695 pButton = static_cast<Button*>(GetControl(IDC_VOICECALL_BUTTON,true));
696 pButton->SetEnabled(true);
697 pButton->Invalidate(true);
698 pButton = static_cast<Button*>(GetControl(IDC_ADD_TO_CONTACT_BUTTON,true));
699 if(pButton->GetShowState() == true)
701 pButton->SetEnabled(true);
702 pButton->Invalidate(true);
704 pButton = static_cast<Button*>(GetControl(IDC_MSG_BUTTON,true));
705 pButton->SetEnabled(true);
706 pButton->Invalidate(true);
711 EndCallForm::OnBackground(void)
713 AppLogDebug("Enter");
717 EndCallForm::OnOrientationChanged(const Tizen::Ui::Control& source, Tizen::Ui::OrientationStatus orientationStatus)
719 AppLogDebug("Enter");
720 if (__pCallButtonsPanel != null)
722 //update position of call buttons panel
723 Label* pKeysBgLbl = static_cast<Label*>(GetControl(IDC_KEY_BG_LABEL, true));
724 __pCallButtonsPanel->SetBounds(pKeysBgLbl->GetBounds());
725 //bring button on top
726 __pCallButtonsPanel->SetButtonPosition();
727 RelativeLayout* pRelativeLayout = dynamic_cast<RelativeLayout*>(GetPortraitLayoutN());
728 if (pRelativeLayout != null)
730 //pRelativeLayout->SetRelation(*__pCallButtonsPanel, *pKeysBgLbl, RECT_EDGE_RELATION_TOP_TO_TOP);
732 pRelativeLayout = dynamic_cast<RelativeLayout*>(GetLandscapeLayoutN());
733 if (pRelativeLayout != null)
735 pRelativeLayout->SetRelation(*__pCallButtonsPanel, *pKeysBgLbl, RECT_EDGE_RELATION_LEFT_TO_LEFT);
736 pRelativeLayout->SetRelation(*__pCallButtonsPanel, *this, RECT_EDGE_RELATION_RIGHT_TO_RIGHT);