Fix for N_SE-50075 N_SE-50029 N_SE-50012 N_SE-49983
authorAmith Kumar Mahale <amith.m@samsung.com>
Tue, 27 Aug 2013 13:48:05 +0000 (19:18 +0530)
committerAmith Kumar Mahale <amith.m@samsung.com>
Tue, 27 Aug 2013 13:48:05 +0000 (19:18 +0530)
Change-Id: I2935da1ba2c13c831fad7b09ac0ed1e4dbc5cd1e
Signed-off-by: Amith Kumar Mahale <amith.m@samsung.com>
inc/CallActiveCallForm.h
res/screen-size-normal/IDL_CALL_FORM.xml
src/CallActiveCallForm.cpp
src/CallIncomingCallForm.cpp
src/CallTelephonyManager.cpp

index d7e5820..ad1d3df 100644 (file)
@@ -104,6 +104,8 @@ private:
        void ShowTimerInfo(const Tizen::Base::String& timerLblName, bool isOnHold, long long startTime = 0);
        // Method to set the show state of all the labels when DTMF keypad is launched
        void SetShowStateOnKeypad(bool showState);
+       // Method to set the show state of all the labels when DTMF keypad is launched in Landscape
+       void SetShowStateOnKeypadLandscape(bool showState);
        // Method to populate the list shown on "More" option
        void CreateMoreOptionsMenuList(void);
        // Method to destroy the list shown on "More" option
index d2e50eb..c438cec 100644 (file)
@@ -3,7 +3,8 @@
        This XML file was automatically generated by UiBuilder - do not modify by hand.
 -->
 <!DOCTYPE Scene SYSTEM "UIForm.dtd">
-<Scene Bversion="2.0.0.201307161751" Dversion="20120315">
+
+<Scene Bversion="2.0.0.201308220944" Dversion="20120315">
     <LogicalCoordinate>720</LogicalCoordinate>
     <Form id="IDL_CALL_FORM">
         <property backgroundColor="#000000" backgroundColorOpacity="100" notificationTrayOpenEnabled="false" orientation="Automatic:4Dir" softKey0NormalIcon="" softKey0PressedIcon="" softKey0Text="" softKey1NormalIcon="" softKey1PressedIcon="" softKey1Text="" title="" titleAlign="ALIGN_CENTER" titleIcon="" translucentFooter="false" translucentHeader="false" translucentIndicator="false"/>
     <Label id="IDC_CALLER1_TIME_LABEL" parent="IDL_CALL_FORM">
         <property accessibilityHint="" backgroundBitmapPath="" backgroundColor="#FFFFFF" backgroundColorOpacity="0" horizontalAlign="ALIGN_RIGHT" leftMargin="16" text="Calling..." textColor="#8BF632" textSize="30.0" textStyle="LABEL_TEXT_STYLE_NORMAL" topMargin="0" verticalAlign="ALIGN_MIDDLE"/>
         <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="46.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="" leftRelationType="" marginBottom="0.0" marginLeft="0.0" marginRight="24.0" marginTop="6.0" mode="Portrait" rightRelation="IDL_CALL_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="" topRelationType="RECT_EDGE_RELATION_TOP_TO_BOTTOM" verticalFitPolicy="FIT_POLICY_FIXED" width="160.0" x="536.0" y="99.0"/>
-        <layout bottomRelation="IDC_BACKGROUND_LABEL" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="46.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="" leftRelationType="" marginBottom="16.0" marginLeft="0.0" marginRight="24.0" marginTop="0.0" mode="Landscape" rightRelation="IDL_CALL_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="" topRelationType="" verticalFitPolicy="FIT_POLICY_FIXED" width="150.0" x="1106.0" y="158.0"/>
+        <layout bottomRelation="IDC_BACKGROUND_LABEL" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="46.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="" leftRelationType="" marginBottom="16.0" marginLeft="0.0" marginRight="15.0" marginTop="0.0" mode="Landscape" rightRelation="IDL_CALL_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="" topRelationType="" verticalFitPolicy="FIT_POLICY_FIXED" width="160.0" x="1105.0" y="158.0"/>
     </Label>
     <Label id="IDC_NUMBER1_LABEL" parent="IDL_CALL_FORM">
         <property accessibilityHint="" backgroundBitmapPath="" backgroundColor="#FFFFFF" backgroundColorOpacity="0" horizontalAlign="ALIGN_LEFT" leftMargin="16" text="" textColor="#FFFFFF" textSize="38.0" textStyle="LABEL_TEXT_STYLE_NORMAL" topMargin="0" verticalAlign="ALIGN_MIDDLE"/>
         <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="46.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDC_CALLER1_BIGPHOTO_LABEL" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="24.0" marginRight="24.0" marginTop="6.0" mode="Portrait" rightRelation="IDC_CALLER1_TIME_LABEL" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_LEFT" topRelation="" topRelationType="RECT_EDGE_RELATION_TOP_TO_BOTTOM" verticalFitPolicy="FIT_POLICY_FIXED" width="488.0" x="24.0" y="99.0"/>
-        <layout bottomRelation="IDC_BACKGROUND_LABEL" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="46.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDC_BACKGROUND_LABEL" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="16.0" marginLeft="24.0" marginRight="0.0" marginTop="0.0" mode="Landscape" rightRelation="IDC_CALLER1_TIME_LABEL" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_LEFT" topRelation="" topRelationType="" verticalFitPolicy="FIT_POLICY_FIXED" width="522.0" x="584.0" y="158.0"/>
+        <layout bottomRelation="IDC_BACKGROUND_LABEL" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="46.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDC_BACKGROUND_LABEL" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="16.0" marginLeft="24.0" marginRight="0.0" marginTop="0.0" mode="Landscape" rightRelation="IDC_CALLER1_TIME_LABEL" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_LEFT" topRelation="" topRelationType="" verticalFitPolicy="FIT_POLICY_FIXED" width="521.0" x="584.0" y="158.0"/>
     </Label>
     <Button id="IDC_HOLD_BUTTON" parent="IDL_CALL_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_CENTER" normalBGBitmapPath="C01-1_button_hold_normal.png" normalBitmapPath="" normalColor="" normalColorOpacity="100" normalTextColor="" pressedBGBitmapPath="C01-1_button_hold_01_press.png" pressedBitmapPath="" pressedColor="" pressedColorOpacity="100" pressedTextColor="" text="" textSize="33.0" verticalAlign="ALIGN_MIDDLE"/>
index b36d9ab..9f6ac71 100644 (file)
@@ -277,6 +277,8 @@ ActiveCallForm::OnOrientationChanged(const Tizen::Ui::Control& source, Tizen::Ui
                        {
                                //in landscape mode, caller info is visible.
                                SetShowStateOnKeypad(true);
+                               //Hide few labels and buttons in landscape mode when DTMF keypad is shown
+                               SetShowStateOnKeypadLandscape(false);
                                SetHoldButtonShowState(false);
                        }
                        else if (orientationStatus == ORIENTATION_STATUS_PORTRAIT || orientationStatus == ORIENTATION_STATUS_PORTRAIT_REVERSE)
@@ -579,12 +581,55 @@ ActiveCallForm::OnActionPerformed(const Control& source, int actionId)
 
        case IDA_OPEN_NUMKEYPAD:
        {
+               if(__pDTMFKeypad != null)
+               {
+                       Rectangle rect(0, 0, 0, 0);
+                       if (GetOrientationStatus() == ORIENTATION_STATUS_LANDSCAPE || GetOrientationStatus() == ORIENTATION_STATUS_LANDSCAPE_REVERSE)
+                       {
+                               rect.height = GetClientAreaBounds().height;
+                               rect.width = GetClientAreaBounds().width - __pCallButtonsPanel->GetWidth();
+                       }
+                       else if (GetOrientationStatus() == ORIENTATION_STATUS_PORTRAIT || GetOrientationStatus() == ORIENTATION_STATUS_PORTRAIT_REVERSE)
+                       {
+                               rect.width = GetClientAreaBounds().width;
+                               rect.height = GetClientAreaBounds().height - __pCallButtonsPanel->GetHeight();
+                       }
+                       __pDTMFKeypad->SetBounds(rect);
+                       RelativeLayout* pRelativeLayout = dynamic_cast<RelativeLayout*>(GetLandscapeLayoutN());
+                       if (pRelativeLayout != null)
+                       {
+                               pRelativeLayout->SetRelation(*__pDTMFKeypad, this, RECT_EDGE_RELATION_LEFT_TO_LEFT);
+                               pRelativeLayout->SetRelation(*__pDTMFKeypad, __pCallButtonsPanel, RECT_EDGE_RELATION_RIGHT_TO_LEFT);
+                               pRelativeLayout->Update();
+                               delete pRelativeLayout;
+                       }
+                       pRelativeLayout = dynamic_cast<RelativeLayout*>(GetPortraitLayoutN());
+                       if (pRelativeLayout != null)
+                       {
+                               pRelativeLayout->SetRelation(*__pDTMFKeypad, this, RECT_EDGE_RELATION_LEFT_TO_LEFT);
+                               pRelativeLayout->SetRelation(*__pDTMFKeypad, __pCallButtonsPanel, RECT_EDGE_RELATION_BOTTOM_TO_TOP);
+                               pRelativeLayout->Update();
+                               delete pRelativeLayout;
+                       }
+                       __pDTMFKeypad->setKeysPanelBounds();
+                       __pDTMFKeypad->InvalidateBounds(rect);
+                       __pDTMFKeypad->Invalidate(true);
+
+               }
+
+
+
                if (GetOrientationStatus() == ORIENTATION_STATUS_PORTRAIT || GetOrientationStatus() == ORIENTATION_STATUS_PORTRAIT_REVERSE)
                {
                        //hide only in portrait mode.
                        SetShowStateOnKeypad(false);
                        DestroyMoreOptionsMenuList();
                }
+               if (GetOrientationStatus() == ORIENTATION_STATUS_LANDSCAPE || GetOrientationStatus() == ORIENTATION_STATUS_LANDSCAPE_REVERSE)
+               {
+                       SetShowStateOnKeypadLandscape(false);
+               }
+
                //Hide the hold button as it goes behind DTMF keypad
                SetHoldButtonShowState(false);
                ShowDTMFKeypad();
@@ -594,7 +639,14 @@ ActiveCallForm::OnActionPerformed(const Control& source, int actionId)
 
        case IDA_CLOSE_NUMKEYPAD:
        {
-               SetShowStateOnKeypad(true);
+               if (GetOrientationStatus() == ORIENTATION_STATUS_PORTRAIT || GetOrientationStatus() == ORIENTATION_STATUS_PORTRAIT_REVERSE)
+               {
+                       SetShowStateOnKeypad(true);
+               }
+               if (GetOrientationStatus() == ORIENTATION_STATUS_LANDSCAPE || GetOrientationStatus() == ORIENTATION_STATUS_LANDSCAPE_REVERSE)
+               {
+                       SetShowStateOnKeypadLandscape(true);
+               }
                HideDTMFKeypad();
                __pCallButtonsPanel->SetKeypadButtonState(IDA_OPEN_NUMKEYPAD);
        }
@@ -1088,6 +1140,7 @@ ActiveCallForm::OnSceneActivatedN(const SceneId& previousSceneId, const SceneId&
        //Hide DTMFKeypad, if visible and show caller info
        HideDTMFKeypad();
        SetShowStateOnKeypad(true);
+       SetShowStateOnKeypadLandscape(true);
        __pCallButtonsPanel->SetKeypadButtonState(IDA_OPEN_NUMKEYPAD);
 
        //Set the correct speaker status
@@ -1821,6 +1874,40 @@ ActiveCallForm::SetHoldButtonShowState(bool showState)
 }
 
 void
+ActiveCallForm::SetShowStateOnKeypadLandscape(bool showState)
+{
+       switch (__formType)
+               {
+               case FORMTYPE_ACTIVECONFCALL:
+               case FORMTYPE_ACTIVECALL:
+               {
+                       SetHoldButtonShowState(showState);
+               }
+               break;
+
+               case FORMTYPE_MULTIPLECALLS:
+               {
+                       Label* pLblControl = static_cast<Label*>(GetControl(IDC_CALLER2_LABEL));
+                       pLblControl->SetShowState(showState);
+                       pLblControl = static_cast<Label*>(GetControl(IDC_NUMBER2_LABEL));
+                       pLblControl->SetShowState(showState);
+                       pLblControl = static_cast<Label*>(GetControl(IDC_CALLER2_TIME_LABEL));
+                       pLblControl->SetShowState(showState);
+                       pLblControl = static_cast<Label*>(GetControl(IDC_SWAP_LABEL));
+                       pLblControl->SetShowState(showState);
+                       pLblControl = static_cast<Label*>(GetControl(IDC_BACKGROUND_LABEL2));
+                       pLblControl->SetShowState(showState);
+                       Button* pButtonControl = static_cast<Button*>(GetControl(IDC_SWAP_BUTTON));
+                       pButtonControl->SetShowState(showState);
+               }
+               break;
+
+               default:
+                       break;
+               }
+}
+
+void
 ActiveCallForm::SetShowStateOnKeypad(bool showState)
 {
        Label* pLblControl = static_cast<Label*>(GetControl(IDC_CALLER1_LABEL));
index 77274d1..cae2461 100644 (file)
@@ -809,7 +809,8 @@ IncomingCallForm::OnSceneActivatedN(const SceneId& previousSceneId, const SceneI
 
        //This called here to handle the case when incoming call comes when
        // add call is in foreground.
-       //__pCallPresentor->OnAppForeground();
+       //Uncommenting for N_SE-50029
+       __pCallPresentor->OnAppForeground();
 
 }
 
@@ -1584,7 +1585,7 @@ IncomingCallForm::OnForeground(void)
        Button* pButtonRejectMessage = static_cast<Button*>(GetControl(IDC_REJECT_MESSAGE_BUTTON));
        pButtonRejectMessage->SetFocus();
        pButtonRejectMessage->Invalidate(true);
-//     __pCallPresentor->OnAppForeground();
+       __pCallPresentor->OnAppForeground();
 }
 
 void
index a359135..1576201 100644 (file)
@@ -482,7 +482,7 @@ TelephonyManager::AcceptCall(CallAnsweringOptions answerOptions,int callHandle)
                AppCallInfo* pDuplicateCallInfo = FetchIncomingCallHandleN(incomingHandle, String(L""));
                if(pDuplicateCallInfo == null)
                {
-                       r = E_FAILURE;
+                       r = E_SUCCESS;
                        return r;
                }
                delete pDuplicateCallInfo;
@@ -494,6 +494,12 @@ TelephonyManager::AcceptCall(CallAnsweringOptions answerOptions,int callHandle)
        case ANSERWING_OPTION_HOLD_SINGLE_CALL:
        case ANSERWING_OPTION_END_SINGLE_CALL:
        {
+               //N_SE-50012
+               if(__pActiveCallList->GetCount() < 1)
+               {
+                       r = E_SUCCESS;
+                       return r;
+               }
                r = AcceptSecondCall(answerOptions, callHandle);
        }
        break;
@@ -502,6 +508,14 @@ TelephonyManager::AcceptCall(CallAnsweringOptions answerOptions,int callHandle)
        case ANSERWING_OPTION_REPLACE_HELD_CALL:
        case ANSERWING_OPTION_END_ALL_CALLS:
        {
+               //N_SE-50012
+               if(__pActiveCallList->GetCount() < 2)
+               {
+                       //some call got disconnected just when we are trying to answer
+                       r = E_SUCCESS;
+                       return r;
+
+               }
                r = AcceptMultipleCall(answerOptions, callHandle);
        }
        break;