Fixed logs error in case of auto reject
authorAmith Kumar Mahale <amith.m@samsung.com>
Tue, 9 Apr 2013 15:14:14 +0000 (20:44 +0530)
committerAmith Kumar Mahale <amith.m@samsung.com>
Tue, 9 Apr 2013 15:14:14 +0000 (20:44 +0530)
Change-Id: I587c85a2d6b392c45a2836e7948ade82d6f49168
Signed-off-by: Amith Kumar Mahale <amith.m@samsung.com>
inc/CallTelephonyManager.h
res/screen-size-normal/IDL_CONFCALL_LIST_FORM.xml
src/CallActiveCallForm.cpp
src/CallButtonsPanel.cpp
src/CallConfCallerListForm.cpp
src/CallEndCallForm.cpp
src/CallIncomingCallForm.cpp
src/CallPresentationModel.cpp
src/CallTelephonyManager.cpp

index 07053fa..90d562d 100644 (file)
@@ -53,6 +53,8 @@ public:
        result EndDialingCall(Tizen::Base::String& contactNumber);
        //Function to accept/reject an incoming call
        result AnswerCall(int callHandle, bool acceptCall);
+       //Auto Reject call
+       result AnswerAutoRejectCall(int callHandle);
        //Function to accept call with the given options
        result AcceptCall(CallAnsweringOptions answerOptions,int callHandle);
        //Function to end a conference call
index 97548f8..97520e8 100644 (file)
@@ -4,7 +4,7 @@
 -->
 <!DOCTYPE Scene SYSTEM "UIForm.dtd">
 
-<Scene Bversion="2.0.0.201304011930" Dversion="20120315">
+<Scene Bversion="2.0.0.201304041646" Dversion="20120315">
     <LogicalCoordinate>720</LogicalCoordinate>
     <Form id="IDL_CONFCALL_LIST_FORM">
         <property backgroundColor="#FFFFFF" backgroundColorOpacity="100" notificationTrayOpenEnabled="false" orientation="Automatic:4Dir" softKey0NormalIcon="" softKey0PressedIcon="" softKey0Text="" softKey1NormalIcon="" softKey1PressedIcon="" softKey1Text="" title="" titleAlign="ALIGN_CENTER" titleIcon="" translucentFooter="false" translucentHeader="false" translucentIndicator="false"/>
     <TableView id="IDC_CONF_CALL_LIST_TABLEVIEW" parent="IDL_CONFCALL_LIST_FORM">
         <property backgroundColor="" backgroundColorOpacity="0" fastScrollIndex="" itemDivider="true" itemDividerColor="" scrollBarStyle="TABLE_VIEW_SCROLL_BAR_STYLE_FADE_OUT" scrollInputMode="SCROLL_INPUT_MODE_ALLOW_ANY_DIRECTION" useSearchIcon="false"/>
         <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="560.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_CONFCALL_LIST_FORM" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Portrait" rightRelation="IDL_CONFCALL_LIST_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="" topRelationType="RECT_EDGE_RELATION_TOP_TO_BOTTOM" verticalFitPolicy="FIT_POLICY_FIXED" width="720.0" x="0.0" y="108.0"/>
-        <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="224.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_CONFCALL_LIST_FORM" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Landscape" rightRelation="IDL_CONFCALL_LIST_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDC_CONF_TITLE_LABEL" topRelationType="RECT_EDGE_RELATION_TOP_TO_BOTTOM" verticalFitPolicy="FIT_POLICY_FIXED" width="1280.0" x="0.0" y="52.0"/>
+        <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="336.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_CONFCALL_LIST_FORM" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Landscape" rightRelation="IDL_CONFCALL_LIST_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="" topRelationType="RECT_EDGE_RELATION_TOP_TO_BOTTOM" verticalFitPolicy="FIT_POLICY_FIXED" width="1280.0" x="0.0" y="52.0"/>
     </TableView>
     <Label id="IDC_CALL_TIME_LABEL" parent="IDL_CONFCALL_LIST_FORM">
         <property accessibilityHint="" backgroundBitmapPath="" backgroundColor="" backgroundColorOpacity="0" horizontalAlign="ALIGN_CENTER" leftMargin="16" text="01:02:30" textColor="#000000" textSize="48.0" textStyle="LABEL_TEXT_STYLE_NORMAL" topMargin="0" verticalAlign="ALIGN_MIDDLE"/>
         <layout bottomRelation="IDC_END_CONFCALL_BUTTON" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_TOP" centerHorizontal="true" centerVertical="false" height="78.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="" leftRelationType="" marginBottom="118.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Portrait" rightRelation="" rightRelationType="" topRelation="" topRelationType="" verticalFitPolicy="FIT_POLICY_FIXED" width="300.0" x="210.0" y="788.0"/>
-        <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="52.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="" leftRelationType="" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="68.0" mode="Landscape" rightRelation="" rightRelationType="" topRelation="IDC_CONF_CALL_LIST_TABLEVIEW" topRelationType="RECT_EDGE_RELATION_TOP_TO_BOTTOM" verticalFitPolicy="FIT_POLICY_FIXED" width="533.0" x="304.0" y="344.0"/>
+        <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="52.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="" leftRelationType="" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="25.0" mode="Landscape" rightRelation="" rightRelationType="" topRelation="IDC_CONF_CALL_LIST_TABLEVIEW" topRelationType="RECT_EDGE_RELATION_TOP_TO_BOTTOM" verticalFitPolicy="FIT_POLICY_FIXED" width="533.0" x="304.0" y="413.0"/>
     </Label>
     <Label id="IDC_CONF_TITLE_LABEL" parent="IDL_CONFCALL_LIST_FORM">
         <property accessibilityHint="" backgroundBitmapPath="" backgroundColor="#F8F6EF" backgroundColorOpacity="0" horizontalAlign="ALIGN_LEFT" leftMargin="16" text="CONFERENCE CALL" textColor="#3B73B6" textSize="56.0" textStyle="LABEL_TEXT_STYLE_NORMAL" topMargin="0" verticalAlign="ALIGN_MIDDLE"/>
@@ -38,6 +38,6 @@
     <Button id="IDC_HOLD_CONFCALL_BUTTON" parent="IDL_CONFCALL_LIST_FORM">
         <property DisabledBitmapX="0.0" DisabledBitmapY="0.0" NormalBitmapX="0.0" NormalBitmapY="0.0" PressedBitmapX="0.0" PressedBitmapY="0.0" accessibilityHint="" disableTextColor="" disabledBGBitmapPath="" disabledBitmapPath="" disabledColor="" disabledColorOpacity="100" highlightedBGBitmapPath="" highlightedBitmapPath="" highlightedBitmapX="0.0" highlightedBitmapY="0.0" highlightedColor="" highlightedColorOpacity="100" highlightedTextColor="" horizontalAlign="ALIGN_LEFT" normalBGBitmapPath="" normalBitmapPath="" normalColor="#8E9BA3" normalColorOpacity="100" normalTextColor="" pressedBGBitmapPath="C01-1_button_hold_press.png" pressedBitmapPath="C01-1_button_hold_press.png" pressedColor="#409CD3" pressedColorOpacity="100" pressedTextColor="" text="" textSize="33.0" verticalAlign="ALIGN_TOP"/>
         <layout bottomRelation="IDC_END_CONFCALL_BUTTON" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_TOP" centerHorizontal="false" centerVertical="false" height="78.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="" leftRelationType="" marginBottom="118.0" marginLeft="0.0" marginRight="40.0" marginTop="0.0" mode="Portrait" rightRelation="IDL_CONFCALL_LIST_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="" topRelationType="" verticalFitPolicy="FIT_POLICY_FIXED" width="78.0" x="602.0" y="788.0"/>
-        <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="74.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="" leftRelationType="" marginBottom="0.0" marginLeft="0.0" marginRight="26.0" marginTop="68.0" mode="Landscape" rightRelation="IDL_CONFCALL_LIST_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDC_CONF_CALL_LIST_TABLEVIEW" topRelationType="RECT_EDGE_RELATION_TOP_TO_BOTTOM" verticalFitPolicy="FIT_POLICY_FIXED" width="74.0" x="1180.0" y="344.0"/>
+        <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="74.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="" leftRelationType="" marginBottom="0.0" marginLeft="0.0" marginRight="26.0" marginTop="25.0" mode="Landscape" rightRelation="IDL_CONFCALL_LIST_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDC_CONF_CALL_LIST_TABLEVIEW" topRelationType="RECT_EDGE_RELATION_TOP_TO_BOTTOM" verticalFitPolicy="FIT_POLICY_FIXED" width="74.0" x="1180.0" y="413.0"/>
     </Button>
 </Scene>
index 41f9a46..b9884d3 100644 (file)
@@ -277,6 +277,12 @@ ActiveCallForm::OnOrientationChanged(const Tizen::Ui::Control& source, Tizen::Ui
                        pTextBox->SetText(dtmfText);
                }
        }
+       //More option is displayed recreate it
+       if(__pMoreOptionsListAnchor != null)
+       {
+               CreateMoreOptionsMenuList();
+               CreateMoreOptionsMenuList();
+       }
 }
 
 void
index 11be7c8..27bc917 100644 (file)
@@ -475,7 +475,7 @@ CallButtonsPanel::SetBitmapsToButton(const String& buttonId, const String& butto
 
                case BTN_DIM:
                {
-                       pButton->SetDisabledBitmap(Point(0, 0), *pActualBgBmp);
+                       pButton->SetDisabledBackgroundBitmap(*pActualBgBmp);
                }
                break;
                }
index d3735ba..c098589 100644 (file)
@@ -134,6 +134,8 @@ ConfCallerListForm::OnInitializing(void)
                SetFormBackEventListener(this);
                pFooter->SetBackButton();
        }
+       Label* pTimerLbl = static_cast<Label*>(GetControl(IDC_CALL_TIME_LABEL));
+       SetControlAlwaysOnTop(*pTimerLbl,true);
 
        CreateTableView();
        __pCallPresentor = CallPresentationModel::GetInstance();
@@ -308,7 +310,7 @@ ConfCallerListForm::OnSceneActivatedN(const SceneId& previousSceneId, const Scen
        //set itself as listener
        __pCallPresentor->SetTelEventListener(this);
 
-       AddOrientationEventListener(*this);
+       AppLogDebug("Enter");
 
        //DisableAllControls();
        if (__pConfCallInfo != null)
@@ -319,6 +321,7 @@ ConfCallerListForm::OnSceneActivatedN(const SceneId& previousSceneId, const Scen
        //show 1st caller's info.
        //Fetch Conference call info from telephony manager
        __pConfCallInfo = __pCallPresentor->GetConferenceCallInfoN();
+       AppLogDebug("Enter %x",__pConfCallInfo);
 
        //show active call timer
        ShowTimerInfo(IDC_CALL_TIME_LABEL, __pConfCallInfo->GetCallConnectTime());
@@ -341,6 +344,7 @@ ConfCallerListForm::OnSceneActivatedN(const SceneId& previousSceneId, const Scen
        }
 
        __pList->UpdateTableView();
+       AddOrientationEventListener(*this);
        //ActivatePanels();
 }
 
@@ -348,11 +352,6 @@ void
 ConfCallerListForm::OnSceneDeactivated(const SceneId& currentSceneId, const SceneId& nextSceneId)
 {
        RemoveOrientationEventListener(*this);
-       if (__pConfCallInfo != null)
-       {
-               delete __pConfCallInfo;
-               __pConfCallInfo = null;
-       }
        if (__pConfCallTimer != null)
        {
                __pConfCallTimer->Cancel();
@@ -411,6 +410,7 @@ ConfCallerListForm::SetHoldButtonStatus(bool isCallOnHold)
 void
 ConfCallerListForm::HandleParticipantsChanged(void)
 {
+       AppLogDebug("Enter");
        AppCallInfo* pCallInfo = __pCallPresentor->GetConferenceCallInfoN();
        if (pCallInfo == null)
        {
@@ -877,6 +877,7 @@ ConfCallerListForm::GetItemCount(void)
 TableViewItem*
 ConfCallerListForm::CreateItem(int itemIndex, int itemWidth)
 {
+       AppLogDebug("%d %x",itemWidth,__pConfCallInfo);
        IListT<AppCallInfo>* pCallList = __pConfCallInfo->GetCallerList();
 
        TableViewAnnexStyle style = TABLE_VIEW_ANNEX_STYLE_NORMAL;
index 785e929..74955ac 100644 (file)
@@ -384,6 +384,7 @@ EndCallForm::OnSceneActivatedN(const SceneId& previousSceneId, const SceneId& cu
                delete pArgs;
                pArgs = null;
        }
+       AddOrientationEventListener(*this);
 }
 
 void
@@ -405,6 +406,7 @@ EndCallForm::OnSceneDeactivated(const SceneId& currentSceneId, const SceneId& ne
        //remove itself as listener
        CallApp* pPhoneApp = static_cast<CallApp*>(CallApp::GetInstance());
        pPhoneApp->RemoveAppStateChangeListener(*this);
+       RemoveOrientationEventListener(*this);
 }
 
 result
@@ -624,6 +626,7 @@ EndCallForm::OnBackground(void)
 void
 EndCallForm::OnOrientationChanged(const Tizen::Ui::Control& source, Tizen::Ui::OrientationStatus orientationStatus)
 {
+       AppLogDebug("Enter");
        if (__pCallButtonsPanel != null)
        {
                //update position of call buttons panel
@@ -634,7 +637,7 @@ EndCallForm::OnOrientationChanged(const Tizen::Ui::Control& source, Tizen::Ui::O
                RelativeLayout* pRelativeLayout = dynamic_cast<RelativeLayout*>(GetPortraitLayoutN());
                if (pRelativeLayout != null)
                {
-                       pRelativeLayout->SetRelation(*__pCallButtonsPanel, *pKeysBgLbl, RECT_EDGE_RELATION_TOP_TO_TOP);
+                       //pRelativeLayout->SetRelation(*__pCallButtonsPanel, *pKeysBgLbl, RECT_EDGE_RELATION_TOP_TO_TOP);
                }
                pRelativeLayout = dynamic_cast<RelativeLayout*>(GetLandscapeLayoutN());
                if (pRelativeLayout != null)
index 4f88752..359790e 100644 (file)
@@ -1503,7 +1503,7 @@ IncomingCallForm::HandleMultipleCallSelection(int itemIndex)
        __pAcceptVisElem->SetOpacity(1.0f);
        __pRejectVisElem->SetOpacity(1.00f);
 
-       for (int i = 0; i < COUNT_ARROW_ELEMENTS; i++)
+       /*for (int i = 0; i < COUNT_ARROW_ELEMENTS; i++)
        {
                __pRejectArrowLabel = static_cast<Label*>(__pRejectArrowLabelsList->GetAt(i));
                String RejectVisualEleName(IDI_REJECT_ARROW_VISUAL_ELE_NAME);
@@ -1515,7 +1515,7 @@ IncomingCallForm::HandleMultipleCallSelection(int itemIndex)
                AcceptVisualEleName.Append(i);
                __pAcceptArrowVisElem = __pAcceptArrowLabel->GetVisualElement()->GetChild(AcceptVisualEleName,true);
                __pAcceptArrowVisElem->SetOpacity(0.0f);
-       }
+       }*/
        if (__pRejectFinalVisElem != null)
        {
                __pRejectFinalVisElem->Destroy();
@@ -1533,7 +1533,10 @@ IncomingCallForm::HandleMultipleCallSelection(int itemIndex)
                __pOptionPopup = null;
        }
        //accept call
+       if(itemIndex != IDA_BUTTON_CANCEL_OPTIONS_POPUP)
+       {
        __pCallPresentor->AcceptIncomingCall(CallAnsweringOptions(itemIndex),__incomingCallHandle);
+       }
 }
 
 void
index baff300..6020c28 100644 (file)
@@ -567,6 +567,7 @@ CallPresentationModel::HandleCallConnected(Tizen::Base::Collection::IListT<AppCa
 void
 CallPresentationModel::HandleCallDisconnected(bool isLastCall, Tizen::Base::Collection::IListT<AppCallInfo>& pCallList)
 {
+       AppLogDebug("Enter");
        if (isLastCall == true)
        {
                SetSpeakerStatus(false);
index 8a654bb..3df209c 100644 (file)
@@ -388,8 +388,39 @@ TelephonyManager::EndCall(AppCallInfo& endCallInfo)
 }
 
 result
+TelephonyManager::AnswerAutoRejectCall(int callHandle)
+{
+       AppLogDebug("Enter ");
+       result r = E_FAILURE;
+       TelCallAnswerType_t answerType = TAPI_CALL_ANSWER_ACCEPT;
+       int res = -1;
+
+       AppLogDebug("tel_answer_call");
+       answerType = TAPI_CALL_ANSWER_REJECT;
+       AppCallInfo rejectedCallInfo;
+       rejectedCallInfo = *(__pIncomingCall);
+       rejectedCallInfo.SetCalllogType(CALL_LOG_TYPE_VOICE_BLOCKED);
+       SaveCallInfoToLogsDb(rejectedCallInfo);
+       delete __pIncomingCall;
+       __pIncomingCall = null;
+       // redirect to reject call back handler as the flow has to be handled
+       res = tel_answer_call(__pTapiHandle, callHandle, answerType, &HandleCallbackResponse, this);
+
+       if (res == TAPI_CAUSE_SUCCESS)
+       {
+               r = E_SUCCESS;
+       }
+       else
+       {
+               r = E_FAILURE;
+       }
+       return r;
+}
+
+result
 TelephonyManager::AnswerCall(int callHandle, bool acceptCall)
 {
+       AppLogDebug("Enter %d",acceptCall);
        result r = E_FAILURE;
        __pSoundManager->StopAlert();
        TelCallAnswerType_t answerType = TAPI_CALL_ANSWER_ACCEPT;
@@ -402,6 +433,7 @@ TelephonyManager::AnswerCall(int callHandle, bool acceptCall)
        }
        else
        {
+               AppLogDebug("tel_answer_call");
                answerType = TAPI_CALL_ANSWER_REJECT;
                // redirect to reject call back handler as the flow has to be handled
                res = tel_answer_call(__pTapiHandle, callHandle, answerType, &HandleRejectCallbackResponse, this);
@@ -2151,6 +2183,7 @@ TelephonyManager::HandleCallConnected(unsigned int connectedCallHandle)
 bool
 TelephonyManager::CheckIncomingCallToBeRejected(AppCallInfo* pIncomingCallInfo)
 {
+       AppLogDebug("Enter");
        int callHandle = pIncomingCallInfo->GetCallHandle()->ToLong();
        String contactNumber(L"");
        contactNumber.Append(pIncomingCallInfo->GetContactNumber());
@@ -2159,7 +2192,7 @@ TelephonyManager::CheckIncomingCallToBeRejected(AppCallInfo* pIncomingCallInfo)
        if (((__pSettingsManager->GetUnknownRejectStatus() == true) && (pIncomingCallInfo->GetContactInfo() == null))
                        || (__pSettingsManager->IsCallToBeRejected(contactNumber) == true))
        {
-               AnswerCall(callHandle,false);
+               AnswerAutoRejectCall(callHandle);
                return true;
        }
        return false;