From 88d740cf0c083db291c2741d059e0e4b4f4033d6 Mon Sep 17 00:00:00 2001 From: Amith Kumar Mahale Date: Fri, 27 Sep 2013 19:38:43 +0530 Subject: [PATCH] Fix for N_SE-53496 N_SE-53436 N_SE-53451 Change-Id: Ifba328906965d4cbd068e5be86b5df23d033cb55 Signed-off-by: Amith Kumar Mahale --- inc/CallActiveCallForm.h | 3 ++ inc/CallConfCallerListForm.h | 3 ++ inc/CallTypes.h | 4 +++ res/eng-GB.xml | 2 ++ src/CallActiveCallForm.cpp | 64 ++++++++++++++++++++++++++++++++++++++++++ src/CallBaseForm.cpp | 16 +++++++++-- src/CallConfCallerListForm.cpp | 13 ++++++++- src/CallErrorMsgPopup.cpp | 12 ++++++++ src/CallIncomingCallForm.cpp | 4 +-- src/CallPresentationModel.cpp | 2 +- src/CallSoundManager.cpp | 1 + src/CallTelephonyManager.cpp | 7 ++++- src/CallTypes.cpp | 2 ++ 13 files changed, 126 insertions(+), 7 deletions(-) diff --git a/inc/CallActiveCallForm.h b/inc/CallActiveCallForm.h index b3c0002..270811c 100644 --- a/inc/CallActiveCallForm.h +++ b/inc/CallActiveCallForm.h @@ -48,6 +48,7 @@ class ActiveCallForm , public Tizen::Ui::IOrientationEventListener , public Tizen::Social::IAddressbookChangeEventListener , public Tizen::Ui::IPropagatedKeyEventListener + , public Tizen::System::ISettingEventListener { public: ActiveCallForm(FormType formType); @@ -87,6 +88,8 @@ public: virtual void OnForeground(void); virtual void OnBackground(void){}; virtual void OnScreenOff(void){}; + //ISettings Event Listener + virtual void OnSettingChanged(Tizen::Base::String& key); private: // Create the call buttons panel and add to form diff --git a/inc/CallConfCallerListForm.h b/inc/CallConfCallerListForm.h index e5587eb..939945e 100644 --- a/inc/CallConfCallerListForm.h +++ b/inc/CallConfCallerListForm.h @@ -44,6 +44,7 @@ class ConfCallerListForm , public Tizen::Ui::Controls::ITableViewItemProvider , public Tizen::Ui::IOrientationEventListener , public Tizen::Social::IAddressbookChangeEventListener + , public Tizen::System::ISettingEventListener { public: ConfCallerListForm(void); @@ -87,6 +88,8 @@ public: virtual void UpdateItem(int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem); virtual int GetDefaultItemHeight(void); + virtual void OnSettingChanged(Tizen::Base::String& key); + private: // Add the action listener for the buttons void AddActionListener(const Tizen::Base::String& keyName, CommandIds cmdId); diff --git a/inc/CallTypes.h b/inc/CallTypes.h index 3ecfcbb..b3137a4 100644 --- a/inc/CallTypes.h +++ b/inc/CallTypes.h @@ -187,6 +187,8 @@ extern const wchar_t* IDS_CALL_REJECTED_TITLE_STRING; extern const wchar_t* IDS_MESSAGE_SENDING_FAILED; extern const wchar_t* IDS_LOW_MEMORY_MSG; extern const wchar_t* IDS_LOW_MEMORY_MSG_TITLE; +extern const wchar_t* IDS_SERVICE_UNAVAILABLE; +extern const wchar_t* IDS_CALL_BARRED; //Panel extern const wchar_t* PANEL_DIALER; extern const wchar_t* PANEL_LOGS; @@ -447,7 +449,9 @@ enum ErrorCodes ERROR_BARRING_PWD_TOO_LONG, ERROR_FLIGHT_MODE_SET, ERROR_GENERAL, + ERROR_SERVICE_UNAVAILABLE, ERROR_USSD_NUMBER, + ERROR_CALL_BARRED }; enum DialerRequestType diff --git a/res/eng-GB.xml b/res/eng-GB.xml index a3623f6..7d0aed1 100644 --- a/res/eng-GB.xml +++ b/res/eng-GB.xml @@ -185,4 +185,6 @@ Message Sending failed Low Memory Memory Low, Delete some data + Network Unavailable + Call Barred diff --git a/src/CallActiveCallForm.cpp b/src/CallActiveCallForm.cpp index a6e9236..35b25c8 100644 --- a/src/CallActiveCallForm.cpp +++ b/src/CallActiveCallForm.cpp @@ -1147,6 +1147,7 @@ ActiveCallForm::OnSceneActivatedN(const SceneId& previousSceneId, const SceneId& //set itself as listener __pCallPresentor->SetTelEventListener(this); AddOrientationEventListener(*this); + Tizen::System::SettingInfo::AddSettingEventListener(*this); CallApp* pPhoneApp = static_cast(CallApp::GetInstance()); pPhoneApp->AddAppStateChangeListener(*this); @@ -1394,6 +1395,8 @@ ActiveCallForm::OnSceneDeactivated(const SceneId& currentSceneId, const SceneId& { __pAddressbook->SetAddressbookChangeEventListener(null); } + + Tizen::System::SettingInfo::RemoveSettingEventListener(*this); } void @@ -2362,6 +2365,67 @@ ActiveCallForm::OnForeground(void) __pCallPresentor->OnAppForeground(); } +void +ActiveCallForm::OnSettingChanged(Tizen::Base::String& key) +{ + if(key == L"http://tizen.org/setting/contacts.order.firstname") + { + IListT* pCallsList = __pCallPresentor->GetCallListN(); + if(pCallsList != null) + { + int listCount = pCallsList->GetCount(); + for(int index = 0; index < listCount; index++) + { + AppCallInfo callInfo; + Contact* pContact; + pCallsList->GetAt(index, callInfo); + if(__pActiveCallInfo == null) + { + __pActiveCallInfo = new (std::nothrow) AppCallInfo(); + } + *__pActiveCallInfo = callInfo; + String contactNumber; + contactNumber.Append(__pActiveCallInfo->GetContactNumber()); + pContact = __pCallPresentor->GetContactN(__pActiveCallInfo->GetContactNumber()); + if(pContact == null) + { + __pActiveCallInfo->ResetContactNumber(null); + __pActiveCallInfo->ResetContactInfo(null); + + } + else + { + __pActiveCallInfo->SetContactNumber(contactNumber); + __pActiveCallInfo->SetContactInfo(*pContact); + } + if(pContact != null) + { + delete pContact; + pContact = null; + } + if(callInfo.IsConferenceCall() == true) + { + continue; + } + if(callInfo.IsOnHold() == false) + { + ShowPersonDetails(contactNumber, IDC_NUMBER1_LABEL, IDC_CALLER1_LABEL, false,__pActiveCallInfo); + } + else + { + ShowPersonDetails(contactNumber, IDC_NUMBER2_LABEL, IDC_CALLER2_LABEL, true,__pActiveCallInfo); + } + + } + + delete pCallsList; + pCallsList = null; + } + } + +} + + bool ActiveCallForm::OnKeyPressed(Control& source, const KeyEventInfo& keyEventInfo) { diff --git a/src/CallBaseForm.cpp b/src/CallBaseForm.cpp index 2734083..c92e90d 100644 --- a/src/CallBaseForm.cpp +++ b/src/CallBaseForm.cpp @@ -203,9 +203,21 @@ BaseForm::HandleCallHeld(bool isHeld) { AppLogDebug("Enter"); ActiveCallForm* pActiveCallForm = dynamic_cast(this); - if(pActiveCallForm != null) + switch (__formType) + { + case(FORMTYPE_ACTIVECALL): + case(FORMTYPE_ACTIVECONFCALL): + case(FORMTYPE_MULTIPLECALLS): { - pActiveCallForm->OnHoldTelephonyCallback(isHeld); + if(pActiveCallForm != null) + { + pActiveCallForm->OnHoldTelephonyCallback(isHeld); + } + } + break; + + default: + break; } } diff --git a/src/CallConfCallerListForm.cpp b/src/CallConfCallerListForm.cpp index 673139f..3dac607 100644 --- a/src/CallConfCallerListForm.cpp +++ b/src/CallConfCallerListForm.cpp @@ -294,7 +294,7 @@ ConfCallerListForm::OnSceneActivatedN(const SceneId& previousSceneId, const Scen //set itself as listener __pCallPresentor->SetTelEventListener(this); __isCallSplit = false; - + Tizen::System::SettingInfo::AddSettingEventListener(*this); AppLogDebug("Enter"); //DisableAllControls(); @@ -355,6 +355,8 @@ ConfCallerListForm::OnSceneDeactivated(const SceneId& currentSceneId, const Scen { __pAddressbook->SetAddressbookChangeEventListener(null); } + + Tizen::System::SettingInfo::RemoveSettingEventListener(*this); } result @@ -887,6 +889,15 @@ ConfCallerListForm::UpdateItem(int itemIndex, TableViewItem* pItem) return ; } +void +ConfCallerListForm::OnSettingChanged(Tizen::Base::String& key) +{ + if(key == L"http://tizen.org/setting/contacts.order.firstname") + { + __pList->UpdateTableView(); + } +} + int ConfCallerListForm::GetDefaultItemHeight(void) { diff --git a/src/CallErrorMsgPopup.cpp b/src/CallErrorMsgPopup.cpp index 9746c73..e5c0257 100644 --- a/src/CallErrorMsgPopup.cpp +++ b/src/CallErrorMsgPopup.cpp @@ -241,6 +241,18 @@ ErrorMsgPopup::FetchErrorMessage(int errorCode) } break; + case ERROR_SERVICE_UNAVAILABLE: + { + msg.Append(AppUtility::GetResourceString(IDS_SERVICE_UNAVAILABLE)); + } + break; + + case ERROR_CALL_BARRED: + { + msg.Append(AppUtility::GetResourceString(IDS_SERVICE_UNAVAILABLE)); + } + break; + case ERROR_GENERAL: default: { diff --git a/src/CallIncomingCallForm.cpp b/src/CallIncomingCallForm.cpp index f1c831b..e9c11cb 100644 --- a/src/CallIncomingCallForm.cpp +++ b/src/CallIncomingCallForm.cpp @@ -649,12 +649,12 @@ IncomingCallForm::OnActionPerformed(const Control& source, int actionId) if(__pCallPresentor->IsAppControlRunning() == false) { __pCallPresentor->RejectCall(__incomingCallHandle, true,*__pActiveContactNo); - ArrayListT* pCallList = static_cast*>(__pCallPresentor->GetCallListN()); + /*ArrayListT* pCallList = static_cast*>(__pCallPresentor->GetCallListN()); if(pCallList != null && pCallList->GetCount() > 0) { __pCallPresentor->HandleCallConnected(*pCallList); } - pCallList = null; + pCallList = null;*/ } } break; diff --git a/src/CallPresentationModel.cpp b/src/CallPresentationModel.cpp index 1310042..9c31a46 100644 --- a/src/CallPresentationModel.cpp +++ b/src/CallPresentationModel.cpp @@ -207,7 +207,7 @@ CallPresentationModel::DialCall(String& contactNumber, bool isEmergency) if (isCallServiceAvailable == false) { - __pTelEventListener->HandleTelephonyError(ERROR_DIAL_FAILED); + __pTelEventListener->HandleTelephonyError(ERROR_SERVICE_UNAVAILABLE); return ; } // check if GPRS number diff --git a/src/CallSoundManager.cpp b/src/CallSoundManager.cpp index 26733a4..e2680b5 100644 --- a/src/CallSoundManager.cpp +++ b/src/CallSoundManager.cpp @@ -534,6 +534,7 @@ SoundManager::SetWaitTone(void) void SoundManager::ResumeAlert(String& contactRingTone) { + AppLogDebug("Enter"); result res = E_FAILURE; IntensityDurationVibrationPattern vibration; vibration.duration = 3000; diff --git a/src/CallTelephonyManager.cpp b/src/CallTelephonyManager.cpp index a0fda67..45abdc7 100644 --- a/src/CallTelephonyManager.cpp +++ b/src/CallTelephonyManager.cpp @@ -344,6 +344,10 @@ TelephonyManager::SetupMoCall(String& contactNumber, bool isEmergency) { return ERROR_NONE; } + else if (res == TAPI_CAUSE_CALL_BARRED) + { + return ERROR_CALL_BARRED; + } else { return ERROR_TAPI_ERROR; @@ -1072,7 +1076,8 @@ TelephonyManager::DialOutgoingCall(String& contactNumber, bool isEmergency) } else { - return E_FAILURE; + AppLogDebug("%d",res); + return res; } } diff --git a/src/CallTypes.cpp b/src/CallTypes.cpp index 886e650..061fdbb 100644 --- a/src/CallTypes.cpp +++ b/src/CallTypes.cpp @@ -184,6 +184,8 @@ const wchar_t* IDS_CALL_REJECTED_TITLE_STRING = L"IDS_CALL_REJECTED_TITLE_STRING const wchar_t* IDS_MESSAGE_SENDING_FAILED = L"IDS_MESSAGE_SENDING_FAILED"; const wchar_t* IDS_LOW_MEMORY_MSG = L"IDS_LOW_MEMORY_MSG"; const wchar_t* IDS_LOW_MEMORY_MSG_TITLE = L"IDS_LOW_MEMORY_MSG_TITLE"; +const wchar_t* IDS_SERVICE_UNAVAILABLE = L"IDS_SERVICE_UNAVAILABLE"; +const wchar_t* IDS_CALL_BARRED = L"IDS_CALL_BARRED"; //Panel const wchar_t* PANEL_DIALER = L"PanelDialer"; const wchar_t* PANEL_LOGS = L"PanelLogs"; -- 2.7.4