From: Amith Kumar Mahale Date: Wed, 10 Apr 2013 15:03:09 +0000 (+0530) Subject: Prevent issue fix. 2Nabi issues fixed X-Git-Tag: accepted/tizen_2.1/20130425.023544~9 X-Git-Url: http://review.tizen.org/git/?p=apps%2Fosp%2FCall.git;a=commitdiff_plain;h=41c8c6ea37bd4bb51cbec4c74ce0481e5e10b993 Prevent issue fix. 2Nabi issues fixed Change-Id: I2b988ffc3d52bbf80a560f9f3de9a814e4c7c09c Signed-off-by: Amith Kumar Mahale --- diff --git a/inc/CallActiveCallForm.h b/inc/CallActiveCallForm.h index 822f8af..1c32230 100644 --- a/inc/CallActiveCallForm.h +++ b/inc/CallActiveCallForm.h @@ -130,6 +130,7 @@ private: Tizen::Ui::Controls::ListView* __pMoreOptionsList; Tizen::Ui::Controls::Label* __pMoreOptionsListAnchor; Tizen::Ui::Controls::Label* __pSmallPhotoLabel; + Tizen::Base::String __DtmfString; AppCallInfo* __pActiveCallInfo; AppCallInfo* __pHeldCallInfo; }; diff --git a/res/screen-size-normal/IDL_DTMF_KEYPAD_PANEL.xml b/res/screen-size-normal/IDL_DTMF_KEYPAD_PANEL.xml index f5a3218..5fdc016 100644 --- a/res/screen-size-normal/IDL_DTMF_KEYPAD_PANEL.xml +++ b/res/screen-size-normal/IDL_DTMF_KEYPAD_PANEL.xml @@ -3,19 +3,20 @@ This XML file was automatically generated by UiBuilder - do not modify by hand. --> - + + - + diff --git a/res/screen-size-normal/IDL_MULTIPLE_CALL_FORM.xml b/res/screen-size-normal/IDL_MULTIPLE_CALL_FORM.xml index 86ca93e..632f33c 100644 --- a/res/screen-size-normal/IDL_MULTIPLE_CALL_FORM.xml +++ b/res/screen-size-normal/IDL_MULTIPLE_CALL_FORM.xml @@ -4,7 +4,7 @@ --> - + 720
@@ -37,7 +37,7 @@ diff --git a/src/CallActiveCallForm.cpp b/src/CallActiveCallForm.cpp index b9884d3..11ef10b 100644 --- a/src/CallActiveCallForm.cpp +++ b/src/CallActiveCallForm.cpp @@ -224,8 +224,12 @@ ActiveCallForm::ShowDTMFKeypad(void) pRelativeLayout->SetRelation(*__pDTMFKeypad, __pCallButtonsPanel, RECT_EDGE_RELATION_RIGHT_TO_LEFT); } } - EditField* pTextBox = static_cast(__pDTMFKeypad->GetControl(IDC_TEXTBOX)); __pDTMFKeypad->SetShowState(true); + if(__DtmfString.IsEmpty() == false) + { + EditField* pTextBox = static_cast(__pDTMFKeypad->GetControl(IDC_TEXTBOX)); + pTextBox->SetText(__DtmfString); + } __pDTMFKeypad->Draw(true); __pDTMFKeypad->Show(); } @@ -270,11 +274,12 @@ ActiveCallForm::OnOrientationChanged(const Tizen::Ui::Control& source, Tizen::Ui //in Portrait mode it is hidden beneath DTMF Keypad. SetShowStateOnKeypad(false); } - String dtmfText = static_cast(__pDTMFKeypad->GetControl(IDC_TEXTBOX))->GetText(); - ShowDTMFKeypad(); - //get new text box. - EditField* pTextBox = static_cast(__pDTMFKeypad->GetControl(IDC_TEXTBOX)); - pTextBox->SetText(dtmfText); + if(__pDTMFKeypad->GetShowState() == true) + { + String dtmfText = static_cast(__pDTMFKeypad->GetControl(IDC_TEXTBOX))->GetText(); + HideDTMFKeypad(); + ShowDTMFKeypad(); + } } } //More option is displayed recreate it @@ -290,9 +295,10 @@ ActiveCallForm::HideDTMFKeypad(void) { if(__pDTMFKeypad != null) { - __pDTMFKeypad->SetShowState(false); - __pDTMFKeypad->Draw(true); - __pDTMFKeypad->Show(); + __DtmfString = static_cast(__pDTMFKeypad->GetControl(IDC_TEXTBOX))->GetText(); + + RemoveControl(*__pDTMFKeypad); + __pDTMFKeypad = null; } } @@ -1063,6 +1069,7 @@ ActiveCallForm::OnSceneDeactivated(const SceneId& currentSceneId, const SceneId& { __pMoreOptionsList->SetShowState(false); } + __DtmfString.Clear(); } void @@ -1190,6 +1197,10 @@ ActiveCallForm::UpdateMultipleCallScreen(Tizen::Base::Collection::IListTSetShowState(false); } ShowPersonDetails(contactNo, IDC_NUMBER1_LABEL, IDC_CALLER1_LABEL, false,__pActiveCallInfo); + if(__pMoreOptionsListAnchor != null && __pMoreOptionsListAnchor->GetShowState() == true) + { + CreateMoreOptionsMenuList(); + } } else { @@ -1826,7 +1837,7 @@ ActiveCallForm::CreateItem(int index, int itemWidth) pTextElement->SetFont(font); //construct Enriched text EnrichedText* pEnrichedText = new (std::nothrow) EnrichedText(); - Dimension textDimension; + FloatDimension textDimension; font.GetTextExtent(confCallName, confCallName.GetLength(), textDimension); textDimension.height = textDimension.height + font.GetDescender(); pEnrichedText->Construct(textDimension); @@ -1834,8 +1845,8 @@ ActiveCallForm::CreateItem(int index, int itemWidth) pEnrichedText->Add(*pTextElement); //Add Enriched text to pItem - Point textPos(((2 * IDI_OPTIONMENU_ITEM_SPACING) + W_MGR_CONFCALL_BITMAP), ((IDI_OPTIONMENU_DIMEN.height - textDimension.height) / 2)); - pItem->AddElement(Rectangle(textPos, textDimension), 2, *pEnrichedText); + FloatPoint textPos(((2 * IDI_OPTIONMENU_ITEM_SPACING) + W_MGR_CONFCALL_BITMAP), ((IDI_OPTIONMENU_DIMEN.height - textDimension.height) / 2)); + pItem->AddElement(FloatRectangle(textPos, textDimension), 2, *pEnrichedText); // Cleans up pEnrichedText->RemoveAll(true); delete pEnrichedText; diff --git a/src/CallButtonsPanel.cpp b/src/CallButtonsPanel.cpp index 27bc917..ac0f60d 100644 --- a/src/CallButtonsPanel.cpp +++ b/src/CallButtonsPanel.cpp @@ -572,7 +572,7 @@ CallButtonsPanel::SetEnrichedTextToButton(const String& buttonName, Canvas* pCan Font font; font.Construct(FONT_STYLE_PLAIN, IDI_TEXT_SIZE); - Dimension textDimension; + FloatDimension textDimension; font.GetTextExtent(buttonName, buttonName.GetLength(), textDimension); textDimension.height = textDimension.height + font.GetDescender(); TextElement* pTextElement = new (std::nothrow) TextElement(); diff --git a/src/CallCommonUtils.cpp b/src/CallCommonUtils.cpp index bac96d9..03cfaf8 100644 --- a/src/CallCommonUtils.cpp +++ b/src/CallCommonUtils.cpp @@ -304,7 +304,7 @@ DialUtil::DrawTextToCanvas(const String& buttonText, int textFontStyle, Canvas& delete textColor; //get dimensions of the text - Dimension textDimension; + FloatDimension textDimension; font->GetTextExtent(buttonText, buttonText.GetLength(), textDimension); if(textFontStyle != FONT_KEYPAD_NUMBER) { diff --git a/src/CallConfCallerListForm.cpp b/src/CallConfCallerListForm.cpp index c098589..6dd9a1c 100644 --- a/src/CallConfCallerListForm.cpp +++ b/src/CallConfCallerListForm.cpp @@ -952,6 +952,11 @@ ConfCallerListForm::CreateItem(int itemIndex, int itemWidth) pItem->AddControl(*pSplitCallButton); pItem->AddControl(*pCallLabel); pItem->AddControl(*pEndCallButton); + if(pDisplayName != null) + { + delete pDisplayName; + pDisplayName = null; + } return pItem; diff --git a/src/CallDtmfKeypadPanel.cpp b/src/CallDtmfKeypadPanel.cpp index 066e618..6288388 100644 --- a/src/CallDtmfKeypadPanel.cpp +++ b/src/CallDtmfKeypadPanel.cpp @@ -103,13 +103,13 @@ DtmfKeyPadPanel::OnInitializing(void) //Set background bitmap Label* pKeyBgLbl = static_cast(GetControl(IDC_DTMF_KEY_BG_LABEL, true)); - Bitmap* pKeyBgBitmap = AppUtility::GetBitmapFromResourcesN(IDB_KEYPAD_BG, pKeyBgLbl->GetWidth(), pKeyBgLbl->GetHeight()); + /*Bitmap* pKeyBgBitmap = AppUtility::GetBitmapFromResourcesN(IDB_KEYPAD_BG, pKeyBgLbl->GetWidth(), pKeyBgLbl->GetHeight()); if (pKeyBgBitmap != null) { pKeyBgLbl->SetBackgroundBitmap(*pKeyBgBitmap); delete pKeyBgBitmap; pKeyBgBitmap = null; - } + }*/ //DTMF Keys panel Panel* pKeysPanel = new (std::nothrow) Panel(); diff --git a/src/CallEndCallForm.cpp b/src/CallEndCallForm.cpp index 74955ac..b1a894a 100644 --- a/src/CallEndCallForm.cpp +++ b/src/CallEndCallForm.cpp @@ -312,6 +312,11 @@ EndCallForm::HandleAddToContacts(void) __isContactAppControlLaunched = false; } extraData.RemoveAll(true); + if(pContact != null) + { + delete pContact; + pContact = null; + } } void @@ -349,7 +354,16 @@ EndCallForm::OnSceneActivatedN(const SceneId& previousSceneId, const SceneId& cu //or if call is from known number(i.e present in contacts db), Then do NOT show "Add to Contact" button. if (pEndCall->GetContactInfo() != null || pEndCall->GetContactNumber().IsEmpty() == true) { - SetContactButtonState(false); + Contact* pContact = __pCallPresentor->GetContactN(pEndCall->GetContactNumber()); + //before setting check if the contact is deleted + if(pContact != null) + { + SetContactButtonState(false); + } + else + { + SetContactButtonState(true); + } } else { diff --git a/src/CallIncomingCallForm.cpp b/src/CallIncomingCallForm.cpp index 359790e..bd304c8 100644 --- a/src/CallIncomingCallForm.cpp +++ b/src/CallIncomingCallForm.cpp @@ -605,6 +605,7 @@ IncomingCallForm::ShowRejectMessagePanel(void) } pMessageList->SetBounds(tmpRect.x, tmpRect.y, tmpRect.width, listHeight); + pMessageList->UpdateTableView(); tmpRect = pKeysPanel->GetBounds(); pKeysPanel->SetBounds(tmpRect.x, tmpRect.y, tmpRect.width, H_MESSAGE_BG_BITMAP /*+ H_REJECT_VIEW_FOOTER*/ + listHeight); @@ -1223,7 +1224,7 @@ IncomingCallForm::SetBitmapToRejectMessageButton(const String& btnName, const St //set button name String holdBtnName = AppUtility::GetResourceString(btnName); - Dimension textDimension; + FloatDimension textDimension; if (!holdBtnName.IsEmpty()) { Font font; diff --git a/src/CallPresentationModel.cpp b/src/CallPresentationModel.cpp index 6020c28..73447b1 100644 --- a/src/CallPresentationModel.cpp +++ b/src/CallPresentationModel.cpp @@ -115,7 +115,7 @@ CallPresentationModel::DialCall(String& contactNumber, bool isEmergency) TryCatch(__pTelephonyMgr != null, (errorCode = ERROR_TAPI_INIT_FAILED), "TAPI initialization failed"); //check if phone is in flight mode - if(__pSettingsPresentor->GetFlightModeStatus() == true) + if(__pSettingsPresentor != null && __pSettingsPresentor->GetFlightModeStatus() == true) { __pTelEventListener->HandleTelephonyError(ERROR_FLIGHT_MODE_SET); return; diff --git a/src/CallSettingsManager.cpp b/src/CallSettingsManager.cpp index 2b262f3..b0e6cf5 100644 --- a/src/CallSettingsManager.cpp +++ b/src/CallSettingsManager.cpp @@ -290,6 +290,8 @@ SettingsManager::GetRejectMessageListN(void) { delete pMessageMap; pMessageMap = null; + delete pMessageStr; + pMessageStr = null; return null; } break; diff --git a/src/CallTelephonyManager.cpp b/src/CallTelephonyManager.cpp index 3df209c..d420746 100644 --- a/src/CallTelephonyManager.cpp +++ b/src/CallTelephonyManager.cpp @@ -1838,7 +1838,7 @@ TelephonyManager::HandleIdleCallBack(void* pData) //then divert event to "HandleParticipantEndedFromConference()" AppCallInfo confCallInfo; bool isConferenceCallChanged = false; - for (int index = 0; index < pActiveCallList->GetCount(); index++) + for (int index = 0; (pActiveCallList != null && index < pActiveCallList->GetCount()); index++) { //fetch conference call result r = pActiveCallList->GetAt(index, confCallInfo);