Crash fix on receiving second call , Group ringtone playing
authorAmith Kumar Mahale <amith.m@samsung.com>
Sat, 20 Apr 2013 09:25:37 +0000 (14:55 +0530)
committerAmith Kumar Mahale <amith.m@samsung.com>
Sat, 20 Apr 2013 09:25:37 +0000 (14:55 +0530)
Change-Id: Iae28b51e07945dcd1105c89c4466aa7e2e51ad82
Signed-off-by: Amith Kumar Mahale <amith.m@samsung.com>
inc/AppResourceId.h [deleted file]
inc/CallSettingsConstants.h
inc/CallTelephonyManager.h
src/CallIncomingCallForm.cpp
src/CallSettingsConstants.cpp
src/CallTelephonyManager.cpp
src/CallTypes.cpp

diff --git a/inc/AppResourceId.h b/inc/AppResourceId.h
deleted file mode 100644 (file)
index 7e755c5..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-#ifndef _APP_RESOURCE_ID_H_
-#define _APP_RESOURCE_ID_H_
-
-extern const wchar_t* IDC_BACKGROUND_LABEL;
-extern const wchar_t* IDC_CALLER1_BIGPHOTO_LABEL;
-extern const wchar_t* IDC_CALLER1_LABEL;
-extern const wchar_t* IDC_CALLER1_TIME_LABEL;
-extern const wchar_t* IDC_KEY_BG_LABEL;
-extern const wchar_t* IDC_NUMBER1_LABEL;
-extern const wchar_t* IDC_VOICE_CALL_ICON_LABEL;
-extern const wchar_t* IDL_OUTCALL_FORM;
-
-#endif // _APP_RESOURCE_ID_H_
index 87b2a71..abe3f50 100644 (file)
@@ -86,7 +86,6 @@ extern const unsigned int COLOR_LEFT_HEADER_EXPAND_ITEMS;
 //Main List Option text
 extern const unsigned int COLOR_MAIN_TXT;
 //Main List text
-extern const int FONT_SIZE_MAIN_TXT;
 extern const int FONT_SIZE_SUB_TXT;
 //Help text
 extern const int FONT_SIZE_HELP_TXT;
index adb0e60..a08b626 100644 (file)
@@ -209,6 +209,7 @@ private:
        Tizen::Social::Addressbook* __pAddressBook;
        //used to store previously fetched contact.
        Tizen::Social::Contact* __pCachedContact;
+       Tizen::Social::Category __Category;
        //mute status
        bool __isMuted;
        //Speaker Status
index 887aeca..fa067b7 100644 (file)
@@ -218,17 +218,6 @@ IncomingCallForm::OnInitializing(void)
        }
        HideRejectPanel();
 
-       Button* pButtonRejectMessage = static_cast<Button*>(GetControl(IDC_REJECT_MESSAGE_BUTTON));
-       if (pButtonRejectMessage)
-       {
-               SetBitmapToRejectMessageButton(IDS_REJECT_MESSAGE_BTN,IDB_REJECT_MESSAGE_BG,
-                                                                          IDB_REJECT_MESSAGE_UP_ARROW, IDB_REJECT_MESSAGE_ICON, false, false);
-               SetBitmapToRejectMessageButton(IDS_REJECT_MESSAGE_BTN,IDB_REJECT_MESSAGE_BG,
-                                                                          IDB_REJECT_MESSAGE_UP_ARROW, IDB_REJECT_MESSAGE_ICON, false, true);
-               pButtonRejectMessage->SetActionId(IDA_SHOW_REJECT_CALL_MESSAGE_PANEL);
-               pButtonRejectMessage->AddActionEventListener(*this);
-       }
-
        //Get Reject list from Settings Manager
        IMapT<int,String>* pMsgMap = SettingsManager::GetInstance()->GetRejectMessageListN();
        if(pMsgMap != null)
@@ -826,7 +815,16 @@ IncomingCallForm::OnSceneActivatedN(const SceneId& previousSceneId,        const SceneI
        }
        CallApp* pCallApp = static_cast<CallApp*>(CallApp::GetInstance());
        pCallApp->SetTopMostWindow(true);
-
+       Button* pButtonRejectMessage = static_cast<Button*>(GetControl(IDC_REJECT_MESSAGE_BUTTON));
+       if (pButtonRejectMessage)
+       {
+               SetBitmapToRejectMessageButton(IDS_REJECT_MESSAGE_BTN,IDB_REJECT_MESSAGE_BG,
+                                                                          IDB_REJECT_MESSAGE_UP_ARROW, IDB_REJECT_MESSAGE_ICON, false, false);
+               SetBitmapToRejectMessageButton(IDS_REJECT_MESSAGE_BTN,IDB_REJECT_MESSAGE_BG,
+                                                                          IDB_REJECT_MESSAGE_UP_ARROW, IDB_REJECT_MESSAGE_ICON, false, true);
+               pButtonRejectMessage->SetActionId(IDA_SHOW_REJECT_CALL_MESSAGE_PANEL);
+               pButtonRejectMessage->AddActionEventListener(*this);
+       }
 
 }
 
@@ -1324,12 +1322,12 @@ IncomingCallForm::OnTouchReleased(const Control& source, const Point& currentPos
                        if(__pRejectFinalVisElem == null)
                        {
                                __pRejectFinalVisElem = new (std::nothrow) VisualElement();
+                               __pRejectFinalVisElem->Construct();
+                               __pRejectFinalVisElem->SetName(IDI_REJECT_FINAL_VISUAL_ELE_NAME);
                        }
-                       __pRejectFinalVisElem->Construct();
                        __pRejectFinalVisElem->SetBounds(FloatRectangle(0, 0, W_DIAL_LABEL, H_DIAL_LABEL));
                        __pRejectFinalVisElem->SetShowState(true);
                        __pRejectFinalVisElem->SetOpacity(1.00f);
-                       __pRejectFinalVisElem->SetName(IDI_REJECT_FINAL_VISUAL_ELE_NAME);
                        if(__pRejectLabel->GetVisualElement()->GetChild(IDI_REJECT_FINAL_VISUAL_ELE_NAME,true) == null)
                        {
                                AppLogDebug("AttachChild __pRejectFinalVisElem");
@@ -1399,12 +1397,13 @@ IncomingCallForm::OnTouchReleased(const Control& source, const Point& currentPos
                        if(__pAcceptFinalVisElem == null)
                        {
                                __pAcceptFinalVisElem = new (std::nothrow) VisualElement();
+                               __pAcceptFinalVisElem->Construct();
+                               __pAcceptFinalVisElem->SetName(IDI_ACCEPT_FINAL_VISUAL_ELE_NAME);
                        }
-                       __pAcceptFinalVisElem->Construct();
                        __pAcceptFinalVisElem->SetBounds(FloatRectangle(0, 0, W_DIAL_LABEL, H_DIAL_LABEL));
-                       __pAcceptFinalVisElem->SetShowState(true);
                        __pAcceptFinalVisElem->SetOpacity(1.0f);
-                       __pAcceptFinalVisElem->SetName(IDI_ACCEPT_FINAL_VISUAL_ELE_NAME);
+
+
                        if(__pAcceptLabel->GetVisualElement()->GetChild(IDI_ACCEPT_FINAL_VISUAL_ELE_NAME,true) == null)
                        {
                                AppLogDebug("AttachChild __pAcceptFinalVisElem");
index b118478..bb0c6d4 100644 (file)
@@ -58,7 +58,6 @@ const int W_CUSTOM_BG_ELEMENT = 1;
 const int W_DELETE_LIST_ITEM = 628;
 const int W_LEFT_HEADER_EXPAND_ITEMS = 8;
 
-const int FONT_SIZE_MAIN_TXT = 44;
 const int FONT_SIZE_SUB_TXT = 32;
 //Help text
 const int FONT_SIZE_HELP_TXT = 32;
index 767107a..e9dce02 100644 (file)
@@ -2298,6 +2298,16 @@ TelephonyManager::StartAlert(AppCallInfo& incomingCallInfo)
                {
                        //fetch custom ringtone for contact
                        result r = foundContact->GetValue(CONTACT_PROPERTY_ID_RINGTONE, contactRingTone);
+                       //Now check if there is a group ring tone
+                       if(contactRingTone.IsEmpty() == true)
+                       {
+                               IList* pCategoryList = __pAddressBook->GetCategoriesByContactN(foundContact->GetRecordId());
+                               if(pCategoryList != null && pCategoryList->GetCount() > 0)
+                               {
+                                       Category* pCategory = static_cast<Category*>(pCategoryList->GetAt(0));
+                                       contactRingTone = pCategory->GetRingtonePath();
+                               }
+                       }
                        AppLog("ringtone fetched - r = %d", r);
                        delete foundContact;
                        foundContact = null;
index 225cf7b..3075991 100644 (file)
@@ -50,7 +50,7 @@ const wchar_t* IDB_SPEAKER_ON_ICON = L"C01-1_icon_speaker_on.png";
 const wchar_t* IDB_SPEAKER_ON_PRESS_ICON = L"C01-1_icon_speaker_on_press.png";
 const wchar_t* IDB_SPEAKER_ON_DIM_ICON = L"C01-1_icon_speaker_on_dim.png";
 const wchar_t* IDB_SPEAKER_OFF_ICON = L"C01-1_icon_speaker.png";
-const wchar_t* IDB_SPEAKER_OFF_PRESS_ICON = L"C01-1_icon_speaker_press_wh.png";
+const wchar_t* IDB_SPEAKER_OFF_PRESS_ICON = L"C01-1_icon_speaker_press.png";
 const wchar_t* IDB_SPEAKER_OFF_DIM_ICON = L"C01-1_icon_speaker_dim.png";
 const wchar_t* IDB_MUTE_ON_ICON =  L"C01-1_icon_mute_on.png";
 const wchar_t* IDB_MUTE_ON_PRESS_ICON = L"C01-1_icon_mute_on_press.png";