Fix for 37272 37208 37254
authorAmith Kumar Mahale <amith.m@samsung.com>
Thu, 2 May 2013 14:35:59 +0000 (20:05 +0530)
committerAmith Kumar Mahale <amith.m@samsung.com>
Thu, 2 May 2013 14:35:59 +0000 (20:05 +0530)
Change-Id: Ic9c9f22dd36a11eef86f62cc6ea91c2e277ac0f4
Signed-off-by: Amith Kumar Mahale <amith.m@samsung.com>
inc/CallActiveCallForm.h
inc/CallPresentationModel.h
inc/CallSoundManager.h
res/screen-size-normal/IDL_MULTIPLE_CALL_FORM.xml
src/CallActiveCallForm.cpp
src/CallApp.cpp
src/CallEndCallForm.cpp
src/CallIncomingCallForm.cpp
src/CallPresentationModel.cpp
src/CallSoundManager.cpp

index 69135bf..768dce0 100644 (file)
@@ -110,6 +110,8 @@ private:
        void HideDTMFKeypad(void);
        //Used to show text in text field
        void SetTextToDTMFTextField(const Tizen::Base::String& dtmfStr);
+       // Set hold button status
+       void SetHoldButtonShowState(bool showState);
 
        //From IListViewItemEventListener
        virtual void OnListViewContextItemStateChanged(Tizen::Ui::Controls::ListView& listView, int index, int elementId, Tizen::Ui::Controls::ListContextItemStatus state);
index 19f8461..abcbef8 100644 (file)
@@ -24,6 +24,7 @@
 #define _PHN_CALL_PRESENTATION_MODEL_H_
 
 #include <FApp.h>
+#include <FTelephony.h>
 #include "CallAppControlRequestMgr.h"
 #include "CallTypes.h"
 #include "CallITelephonyEventListener.h"
@@ -41,6 +42,8 @@ class SettingsPresentationModel;
  */
 class CallPresentationModel: public ITelephonyEventListener
                , public Tizen::App::IAppControlResponseListener
+               , public Tizen::Telephony::ITelephonyNetworkEventListener
+               , public Tizen::Telephony::ITelephonySimEventListener
 {
 public:
        //create a singleton instance
@@ -57,6 +60,8 @@ private:
        static void DestroyInstance(void);
        //gets the sim info
        result GetSimInfo(void);
+       //Used to check if sim is available
+       bool IsSimAvailable(void);
 
 public:
        //set the telephony event listener
@@ -161,6 +166,8 @@ public:
        //From IAppControlResponseListener
        virtual void OnAppControlCompleteResponseReceived(const Tizen::App::AppId& appId, const Tizen::Base::String& operationId, Tizen::App::AppCtrlResult appControlResult, const Tizen::Base::Collection::IMap* pExtraData);
        virtual void OnAppForeground(void);
+       virtual void OnTelephonyNetworkStatusChanged(const Tizen::Telephony::NetworkStatus& networkStatus);
+       virtual void OnTelephonySimStateChanged(Tizen::Telephony::SimState state);
 
 private:
        static CallPresentationModel* __pInstance;
@@ -174,6 +181,9 @@ private:
        bool __isDialAppControlRunning;
        //Used to manage AppControl requests.
        CallAppControlRequestMgr* __pAppControlMgr;
+       Tizen::Telephony::NetworkManager*       __pNetworkManager;
+       Tizen::Telephony::SimStateManager* __psimStateManager;
+       Tizen::Telephony::SimInfo*              __psimInfo;
 };
 
 #endif // _PHN_CALL_PRESENTATION_MODEL_H_
index b379a3d..8019bab 100644 (file)
@@ -62,6 +62,7 @@ public:
        void SetConnectTone(void);
        void SetMinuteReminderTone(void);
        void SetDisconnectTone(void);
+       void SetWaitTone(void);
        result StopSession(void);
        Timer* GetTimer();
        bool GetLastConferenceCall();
@@ -87,6 +88,10 @@ private:
        Tizen::System::Vibrator* __pVibrator;
        // Audio player
        Tizen::Media::Player* __pPlayer;
+       Tizen::Media::Player* __pDisconnectPlayer;
+       Tizen::Media::Player* __pConnectPlayer;
+       Tizen::Media::Player* __pReminderPlayer;
+       Tizen::Media::Player* __pWaitingTonePlayer;
        bool __isSoundStatusOn;
        bool __isVibrateStatusOn;
     Timer __timer;
index 632f33c..09bc765 100644 (file)
@@ -3,8 +3,7 @@
        This XML file was automatically generated by UiBuilder - do not modify by hand.
 -->
 <!DOCTYPE Scene SYSTEM "UIForm.dtd">
-
-<Scene Bversion="2.0.0.201304081058" Dversion="20120315">
+<Scene Bversion="2.0.0.201304261605" Dversion="20120315">
     <LogicalCoordinate>720</LogicalCoordinate>
     <Form id="IDL_MULTIPLE_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_PHOTO_LABEL" parent="IDL_MULTIPLE_CALL_FORM">
         <property accessibilityHint="" backgroundBitmapPath="" backgroundColor="" backgroundColorOpacity="0" horizontalAlign="ALIGN_LEFT" leftMargin="16" text="" textColor="" textSize="33.0" textStyle="LABEL_TEXT_STYLE_NORMAL" topMargin="0" verticalAlign="ALIGN_TOP"/>
         <layout bottomRelation="" bottomRelationType="" centerHorizontal="true" centerVertical="false" height="350.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_MULTIPLE_CALL_FORM" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Portrait" rightRelation="IDL_MULTIPLE_CALL_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDL_MULTIPLE_CALL_FORM" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="720.0" x="0.0" y="0.0"/>
-        <layout bottomRelation="IDL_MULTIPLE_CALL_FORM" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="330.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_MULTIPLE_CALL_FORM" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="330.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Landscape" rightRelation="" rightRelationType="" topRelation="IDL_MULTIPLE_CALL_FORM" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="550.0" x="0.0" y="0.0"/>
+        <layout bottomRelation="IDL_MULTIPLE_CALL_FORM" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="369.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_MULTIPLE_CALL_FORM" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="330.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Landscape" rightRelation="" rightRelationType="" topRelation="IDL_MULTIPLE_CALL_FORM" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="560.0" x="0.0" y="0.0"/>
     </Label>
     <Label id="IDC_BACKGROUND_LABEL" parent="IDL_MULTIPLE_CALL_FORM">
         <property accessibilityHint="" backgroundBitmapPath="C01-1_Incoming call_BG_01.png" backgroundColor="#000000" backgroundColorOpacity="50" horizontalAlign="ALIGN_LEFT" leftMargin="16" text="" textColor="" textSize="33.0" textStyle="LABEL_TEXT_STYLE_NORMAL" topMargin="0" verticalAlign="ALIGN_TOP"/>
         <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="160.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_MULTIPLE_CALL_FORM" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Portrait" rightRelation="IDL_MULTIPLE_CALL_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="720.0" x="0.0" y="0.0"/>
-        <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="160.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDC_CALLER1_PHOTO_LABEL" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_RIGHT" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Landscape" rightRelation="IDL_MULTIPLE_CALL_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDL_MULTIPLE_CALL_FORM" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="730.0" x="550.0" y="0.0"/>
+        <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="199.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDC_CALLER1_PHOTO_LABEL" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_RIGHT" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Landscape" rightRelation="IDL_MULTIPLE_CALL_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDL_MULTIPLE_CALL_FORM" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="720.0" x="560.0" y="0.0"/>
     </Label>
     <Label id="IDC_CALLER1_LABEL" parent="IDL_MULTIPLE_CALL_FORM">
         <property accessibilityHint="" backgroundBitmapPath="" backgroundColor="#FFFFFF" backgroundColorOpacity="0" horizontalAlign="ALIGN_LEFT" leftMargin="16" text="" textColor="#FFFFFF" textSize="58.0" textStyle="LABEL_TEXT_STYLE_NORMAL" topMargin="0" verticalAlign="ALIGN_TOP"/>
         <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="69.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_MULTIPLE_CALL_FORM" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="24.0" marginRight="94.0" marginTop="24.0" mode="Portrait" rightRelation="IDL_MULTIPLE_CALL_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDC_BACKGROUND_LABEL" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="602.0" x="24.0" y="24.0"/>
-        <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="70.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDC_BACKGROUND_LABEL" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="24.0" marginRight="0.0" marginTop="22.0" mode="Landscape" rightRelation="" rightRelationType="" topRelation="IDC_BACKGROUND_LABEL" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="629.0" x="574.0" y="22.0"/>
+        <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="70.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDC_BACKGROUND_LABEL" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="24.0" marginRight="0.0" marginTop="22.0" mode="Landscape" rightRelation="" rightRelationType="" topRelation="IDC_BACKGROUND_LABEL" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="629.0" x="584.0" y="22.0"/>
     </Label>
     <Label id="IDC_NUMBER1_LABEL" parent="IDL_MULTIPLE_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="IDL_MULTIPLE_CALL_FORM" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="24.0" marginRight="208.0" marginTop="6.0" mode="Portrait" rightRelation="IDL_MULTIPLE_CALL_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="" topRelationType="RECT_EDGE_RELATION_TOP_TO_BOTTOM" verticalFitPolicy="FIT_POLICY_FIXED" width="488.0" x="24.0" y="99.0"/>
-        <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="52.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDC_BACKGROUND_LABEL" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="24.0" marginRight="0.0" marginTop="6.0" mode="Landscape" rightRelation="" rightRelationType="" topRelation="IDC_CALLER1_LABEL" topRelationType="RECT_EDGE_RELATION_TOP_TO_BOTTOM" verticalFitPolicy="FIT_POLICY_FIXED" width="513.0" x="574.0" y="98.0"/>
+        <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="52.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDC_BACKGROUND_LABEL" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="24.0" marginRight="0.0" marginTop="6.0" mode="Landscape" rightRelation="" rightRelationType="" topRelation="IDC_CALLER1_LABEL" topRelationType="RECT_EDGE_RELATION_TOP_TO_BOTTOM" verticalFitPolicy="FIT_POLICY_FIXED" width="513.0" x="584.0" y="98.0"/>
     </Label>
     <Label id="IDC_VOICE_CALL_ICON_LABEL" parent="IDL_MULTIPLE_CALL_FORM">
         <property accessibilityHint="" backgroundBitmapPath="C01-1_voice_call_icon.png" backgroundColor="#FFFFFF" backgroundColorOpacity="0" horizontalAlign="ALIGN_LEFT" leftMargin="16" text="" textColor="" textSize="9.0" textStyle="LABEL_TEXT_STYLE_NORMAL" topMargin="0" verticalAlign="ALIGN_TOP"/>
     <Label id="IDC_CALLER1_TIME_LABEL" parent="IDL_MULTIPLE_CALL_FORM">
         <property accessibilityHint="" backgroundBitmapPath="" backgroundColor="#FFFFFF" backgroundColorOpacity="0" horizontalAlign="ALIGN_RIGHT" leftMargin="16" text="00:01:24" 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="IDC_NUMBER1_LABEL" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_RIGHT" marginBottom="0.0" marginLeft="0.0" marginRight="24.0" marginTop="6.0" mode="Portrait" rightRelation="IDL_MULTIPLE_CALL_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="" topRelationType="RECT_EDGE_RELATION_TOP_TO_BOTTOM" verticalFitPolicy="FIT_POLICY_FIXED" width="184.0" x="512.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="6.0" mode="Landscape" rightRelation="IDL_MULTIPLE_CALL_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDC_VOICE_CALL_ICON_LABEL" topRelationType="RECT_EDGE_RELATION_TOP_TO_BOTTOM" verticalFitPolicy="FIT_POLICY_FIXED" width="184.0" x="1072.0" y="98.0"/>
+        <layout bottomRelation="IDC_BACKGROUND_LABEL" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="85.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="" leftRelationType="" marginBottom="16.0" marginLeft="0.0" marginRight="24.0" marginTop="6.0" mode="Landscape" rightRelation="IDL_MULTIPLE_CALL_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDC_VOICE_CALL_ICON_LABEL" topRelationType="RECT_EDGE_RELATION_TOP_TO_BOTTOM" verticalFitPolicy="FIT_POLICY_FIXED" width="184.0" x="1072.0" y="98.0"/>
     </Label>
     <Label id="IDC_CALLER2_PHOTO_LABEL" parent="IDL_MULTIPLE_CALL_FORM">
         <property accessibilityHint="" backgroundBitmapPath="" backgroundColor="" backgroundColorOpacity="0" horizontalAlign="ALIGN_LEFT" leftMargin="16" text="" textColor="#FFFFFF" textSize="33.0" textStyle="LABEL_TEXT_STYLE_NORMAL" topMargin="0" verticalAlign="ALIGN_TOP"/>
         <layout bottomRelation="IDL_MULTIPLE_CALL_FORM" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="390.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_MULTIPLE_CALL_FORM" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="480.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Portrait" rightRelation="IDL_MULTIPLE_CALL_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDC_CALLER1_PHOTO_LABEL" topRelationType="RECT_EDGE_RELATION_TOP_TO_BOTTOM" verticalFitPolicy="FIT_POLICY_FIXED" width="720.0" x="0.0" y="350.0"/>
-        <layout bottomRelation="IDL_MULTIPLE_CALL_FORM" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="330.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_MULTIPLE_CALL_FORM" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="330.0" mode="Landscape" rightRelation="" rightRelationType="" topRelation="IDL_MULTIPLE_CALL_FORM" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="550.0" x="0.0" y="330.0"/>
+        <layout bottomRelation="IDL_MULTIPLE_CALL_FORM" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="369.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_MULTIPLE_CALL_FORM" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="330.0" mode="Landscape" rightRelation="" rightRelationType="" topRelation="IDL_MULTIPLE_CALL_FORM" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="560.0" x="0.0" y="330.0"/>
     </Label>
     <Label id="IDC_BACKGROUND_LABEL2" parent="IDL_MULTIPLE_CALL_FORM">
         <property accessibilityHint="" backgroundBitmapPath="" backgroundColor="#000000" backgroundColorOpacity="50" horizontalAlign="ALIGN_LEFT" leftMargin="16" text="" textColor="" textSize="33.0" textStyle="LABEL_TEXT_STYLE_NORMAL" topMargin="0" verticalAlign="ALIGN_TOP"/>
         <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="162.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_MULTIPLE_CALL_FORM" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Portrait" rightRelation="" rightRelationType="" topRelation="IDC_CALLER2_PHOTO_LABEL" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="720.0" x="0.0" y="350.0"/>
-        <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="160.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_MULTIPLE_CALL_FORM" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Landscape" rightRelation="" rightRelationType="" topRelation="IDC_CALLER2_PHOTO_LABEL" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="550.0" x="0.0" y="330.0"/>
+        <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="160.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_MULTIPLE_CALL_FORM" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Landscape" rightRelation="" rightRelationType="" topRelation="IDC_CALLER2_PHOTO_LABEL" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="560.0" x="0.0" y="330.0"/>
     </Label>
     <Label id="IDC_CALLER2_TIME_LABEL" parent="IDL_MULTIPLE_CALL_FORM">
         <property accessibilityHint="" backgroundBitmapPath="" backgroundColor="" backgroundColorOpacity="0" horizontalAlign="ALIGN_RIGHT" leftMargin="16" text="on hold" textColor="#FFFFFF" 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="RECT_EDGE_RELATION_LEFT_TO_RIGHT" marginBottom="0.0" marginLeft="0.0" marginRight="24.0" marginTop="0.0" mode="Portrait" rightRelation="IDL_MULTIPLE_CALL_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="184.0" x="512.0" y="449.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="0.0" mode="Landscape" rightRelation="IDC_BACKGROUND_LABEL2" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDC_BACKGROUND_LABEL2" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="151.0" x="399.0" y="330.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="0.0" mode="Landscape" rightRelation="IDC_BACKGROUND_LABEL2" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDC_BACKGROUND_LABEL2" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="151.0" x="409.0" y="330.0"/>
     </Label>
     <Label id="IDC_CALLER2_LABEL" parent="IDL_MULTIPLE_CALL_FORM">
         <property accessibilityHint="" backgroundBitmapPath="" backgroundColor="" backgroundColorOpacity="0" horizontalAlign="ALIGN_LEFT" leftMargin="16" text="" textColor="#FFFFFF" textSize="58.0" textStyle="LABEL_TEXT_STYLE_NORMAL" topMargin="0" verticalAlign="ALIGN_TOP"/>
         <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="69.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDC_BACKGROUND_LABEL2" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="24.0" marginRight="0.0" marginTop="24.0" mode="Portrait" rightRelation="" rightRelationType="" topRelation="IDC_BACKGROUND_LABEL2" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="680.0" x="24.0" y="374.0"/>
-        <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="70.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_MULTIPLE_CALL_FORM" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Landscape" rightRelation="IDC_CALLER2_TIME_LABEL" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_LEFT" topRelation="IDC_BACKGROUND_LABEL2" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="399.0" x="0.0" y="330.0"/>
+        <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="70.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_MULTIPLE_CALL_FORM" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Landscape" rightRelation="IDC_CALLER2_TIME_LABEL" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_LEFT" topRelation="IDC_BACKGROUND_LABEL2" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="409.0" x="0.0" y="330.0"/>
     </Label>
     <Label id="IDC_NUMBER2_LABEL" parent="IDL_MULTIPLE_CALL_FORM">
         <property accessibilityHint="" backgroundBitmapPath="" backgroundColor="" backgroundColorOpacity="0" horizontalAlign="ALIGN_LEFT" leftMargin="16" text="" textColor="#FFFFFF" textSize="38.0" textStyle="LABEL_TEXT_STYLE_NORMAL" topMargin="0" verticalAlign="ALIGN_TOP"/>
         <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="46.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDC_BACKGROUND_LABEL2" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="24.0" marginRight="208.0" marginTop="6.0" mode="Portrait" rightRelation="IDL_MULTIPLE_CALL_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDC_CALLER2_LABEL" topRelationType="RECT_EDGE_RELATION_TOP_TO_BOTTOM" verticalFitPolicy="FIT_POLICY_FIXED" width="488.0" x="24.0" y="449.0"/>
-        <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="52.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_MULTIPLE_CALL_FORM" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Landscape" rightRelation="IDC_CALLER2_TIME_LABEL" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_LEFT" topRelation="IDC_CALLER2_LABEL" topRelationType="RECT_EDGE_RELATION_TOP_TO_BOTTOM" verticalFitPolicy="FIT_POLICY_FIXED" width="399.0" x="0.0" y="400.0"/>
+        <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="52.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_MULTIPLE_CALL_FORM" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Landscape" rightRelation="IDC_CALLER2_TIME_LABEL" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_LEFT" topRelation="IDC_CALLER2_LABEL" topRelationType="RECT_EDGE_RELATION_TOP_TO_BOTTOM" verticalFitPolicy="FIT_POLICY_FIXED" width="409.0" x="0.0" y="400.0"/>
     </Label>
     <Button id="IDC_SWAP_BUTTON" parent="IDL_MULTIPLE_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_01.png" normalBitmapPath="" normalColor="" normalColorOpacity="100" normalTextColor="" pressedBGBitmapPath="C01-1_button_hold_normal_01_press.png" pressedBitmapPath="" pressedColor="" pressedColorOpacity="100" pressedTextColor="" text="" textSize="33.0" verticalAlign="ALIGN_MIDDLE"/>
         <layout bottomRelation="IDC_CALLER2_PHOTO_LABEL" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="78.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="" leftRelationType="" marginBottom="15.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Portrait" rightRelation="" rightRelationType="" topRelation="" topRelationType="" verticalFitPolicy="FIT_POLICY_FIXED" width="78.0" x="458.0" y="647.0"/>
-        <layout bottomRelation="IDC_CALLER2_PHOTO_LABEL" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="78.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="" leftRelationType="" marginBottom="20.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Landscape" rightRelation="" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_LEFT" topRelation="" topRelationType="" verticalFitPolicy="FIT_POLICY_FIXED" width="78.0" x="285.0" y="562.0"/>
+        <layout bottomRelation="IDC_CALLER2_PHOTO_LABEL" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="78.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="" leftRelationType="" marginBottom="20.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Landscape" rightRelation="" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_LEFT" topRelation="" topRelationType="" verticalFitPolicy="FIT_POLICY_FIXED" width="78.0" x="285.0" y="601.0"/>
     </Button>
     <Label id="IDC_SWAP_LABEL" parent="IDL_MULTIPLE_CALL_FORM">
         <property accessibilityHint="" backgroundBitmapPath="" backgroundColor="" backgroundColorOpacity="0" horizontalAlign="ALIGN_CENTER" leftMargin="16" text="Swap" textColor="#FFFFFF" textSize="36.0" textStyle="LABEL_TEXT_STYLE_BOLD" topMargin="0" verticalAlign="ALIGN_MIDDLE"/>
         <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="78.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDC_SWAP_BUTTON" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_RIGHT" marginBottom="0.0" marginLeft="0.0" marginRight="14.0" marginTop="0.0" mode="Portrait" rightRelation="IDL_MULTIPLE_CALL_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDC_SWAP_BUTTON" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="170.0" x="536.0" y="647.0"/>
-        <layout bottomRelation="IDC_CALLER2_PHOTO_LABEL" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="78.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="" leftRelationType="" marginBottom="20.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Landscape" rightRelation="IDC_CALLER2_PHOTO_LABEL" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="" topRelationType="" verticalFitPolicy="FIT_POLICY_FIXED" width="170.0" x="380.0" y="562.0"/>
+        <layout bottomRelation="IDC_CALLER2_PHOTO_LABEL" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="78.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="" leftRelationType="" marginBottom="20.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Landscape" rightRelation="IDC_CALLER2_PHOTO_LABEL" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="" topRelationType="" verticalFitPolicy="FIT_POLICY_FIXED" width="170.0" x="390.0" y="601.0"/>
     </Label>
     <Label id="IDC_KEY_BG_LABEL" parent="IDL_MULTIPLE_CALL_FORM">
         <property accessibilityHint="" backgroundBitmapPath="" backgroundColor="" backgroundColorOpacity="0" horizontalAlign="ALIGN_LEFT" leftMargin="16" text="" textColor="" textSize="33.0" textStyle="LABEL_TEXT_STYLE_NORMAL" topMargin="0" verticalAlign="ALIGN_TOP"/>
         <layout bottomRelation="IDL_MULTIPLE_CALL_FORM" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="480.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_MULTIPLE_CALL_FORM" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Portrait" rightRelation="IDL_MULTIPLE_CALL_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDC_CALLER2_PHOTO_LABEL" topRelationType="RECT_EDGE_RELATION_TOP_TO_BOTTOM" verticalFitPolicy="FIT_POLICY_FIXED" width="720.0" x="0.0" y="740.0"/>
-        <layout bottomRelation="IDL_MULTIPLE_CALL_FORM" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="500.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDC_CALLER1_PHOTO_LABEL" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_RIGHT" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Landscape" rightRelation="IDL_MULTIPLE_CALL_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDC_BACKGROUND_LABEL" topRelationType="RECT_EDGE_RELATION_TOP_TO_BOTTOM" verticalFitPolicy="FIT_POLICY_FIXED" width="730.0" x="550.0" y="160.0"/>
+        <layout bottomRelation="IDL_MULTIPLE_CALL_FORM" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="500.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDC_CALLER1_PHOTO_LABEL" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_RIGHT" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Landscape" rightRelation="IDL_MULTIPLE_CALL_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDC_BACKGROUND_LABEL" topRelationType="RECT_EDGE_RELATION_TOP_TO_BOTTOM" verticalFitPolicy="FIT_POLICY_FIXED" width="720.0" x="560.0" y="199.0"/>
     </Label>
 </Scene>
index a11ea22..b00089d 100644 (file)
@@ -269,6 +269,7 @@ ActiveCallForm::OnOrientationChanged(const Tizen::Ui::Control& source, Tizen::Ui
                        {
                                //in landscape mode, caller info is visible.
                                SetShowStateOnKeypad(true);
+                               SetHoldButtonShowState(false);
                        }
                        else if (orientationStatus == ORIENTATION_STATUS_PORTRAIT || orientationStatus == ORIENTATION_STATUS_PORTRAIT_REVERSE)
                        {
@@ -577,6 +578,8 @@ ActiveCallForm::OnActionPerformed(const Control& source, int actionId)
                        //hide only in portrait mode.
                        SetShowStateOnKeypad(false);
                }
+               //Hide the hold button as it goes behind DTMF keypad
+               SetHoldButtonShowState(false);
                ShowDTMFKeypad();
                __pCallButtonsPanel->SetKeypadButtonState(IDA_CLOSE_NUMKEYPAD);
        }
@@ -1048,6 +1051,9 @@ ActiveCallForm::OnSceneActivatedN(const SceneId& previousSceneId, const SceneId&
                delete pArgs;
                pArgs = null;
        }
+
+       CallApp* pCallApp = static_cast<CallApp*>(CallApp::GetInstance());
+       pCallApp->SetTopMostWindow(false);
 }
 
 void
@@ -1613,6 +1619,15 @@ ActiveCallForm::ShowTimerInfo(const String& timerLblName, bool isOnHold, long lo
 }
 
 void
+ActiveCallForm::SetHoldButtonShowState(bool showState)
+{
+       Label* pLblControl = static_cast<Label*>(GetControl(IDC_HOLD_LABEL));
+       pLblControl->SetShowState(showState);
+       Button* pButtonControl = static_cast<Button*>(GetControl(IDC_HOLD_BUTTON));
+       pButtonControl->SetShowState(showState);
+}
+
+void
 ActiveCallForm::SetShowStateOnKeypad(bool showState)
 {
        Label* pLblControl = static_cast<Label*>(GetControl(IDC_CALLER1_LABEL));
@@ -1634,10 +1649,7 @@ ActiveCallForm::SetShowStateOnKeypad(bool showState)
                pLblControl->SetShowState(showState);
                pLblControl = static_cast<Label*>(GetControl(IDC_VOICE_CALL_ICON_LABEL));
                pLblControl->SetShowState(showState);
-               pLblControl = static_cast<Label*>(GetControl(IDC_HOLD_LABEL));
-               pLblControl->SetShowState(showState);
-               Button* pButtonControl = static_cast<Button*>(GetControl(IDC_HOLD_BUTTON));
-               pButtonControl->SetShowState(showState);
+               SetHoldButtonShowState(showState);
        }
        break;
 
@@ -1674,11 +1686,8 @@ ActiveCallForm::SetShowStateOnKeypad(bool showState)
        {
                pLblControl = static_cast<Label*>(GetControl(IDC_PARTICIPANTS_LABEL));
                pLblControl->SetShowState(showState);
-               pLblControl = static_cast<Label*>(GetControl(IDC_HOLD_LABEL));
-               pLblControl->SetShowState(showState);
-               Button* pButtonControl = static_cast<Button*>(GetControl(IDC_HOLD_BUTTON));
-               pButtonControl->SetShowState(showState);
-               pButtonControl = static_cast<Button*>(GetControl(IDC_CONF_CALL_MORE_BUTTON));
+               SetHoldButtonShowState(showState);
+               Button* pButtonControl = static_cast<Button*>(GetControl(IDC_CONF_CALL_MORE_BUTTON));
                pButtonControl->SetShowState(showState);
        }
        break;
@@ -1866,5 +1875,6 @@ ActiveCallForm::DeleteItem(int index, ListItemBase* pItem, int itemWidth)
 void
 ActiveCallForm::OnForeground(void)
 {
+       AppLogDebug("Enter");
        __pCallPresentor->OnAppForeground();
 }
index 97ec256..31f7f52 100644 (file)
@@ -538,19 +538,12 @@ void
 CallApp::SetTopMostWindow(bool bTopMost)
 {
        AppLogDebug("bTopMost = %d",bTopMost);
-       result res = E_FAILURE;
        //ToDO: Need to see if there is better way to handle
        //this case
 
        if(bTopMost == true)
        {
                GetAppFrame()->GetFrame()->SetZOrderGroup(WINDOW_Z_ORDER_GROUP_HIGHEST);
-               if(PowerManager::IsScreenOn() == false)
-               {
-                       AppLogDebug("TurnScreenOn");
-                       res = PowerManager::TurnScreenOn();
-                       AppLogDebug("TurnScreenOn %d",res);
-               }
                AppManager::GetInstance()->AddActiveAppEventListener(*this);
 
        }
@@ -566,9 +559,16 @@ CallApp::SetTopMostWindow(bool bTopMost)
 void
 CallApp::OnActiveAppChanged(const String& appId)
 {
+       result res = E_FAILURE;
        AppLogDebug("Enter %ls",appId.GetPointer());
        if(GetAppId().Equals(appId) == true)
        {
+               if(PowerManager::IsScreenOn() == false)
+               {
+                       AppLogDebug("TurnScreenOn");
+                       res = PowerManager::TurnScreenOn();
+                       AppLogDebug("TurnScreenOn %d",res);
+               }
                result res = PowerManager::KeepScreenOnState(true,false);
                AppLogDebug("KeepScreenOnState %d",res);
 
index ae7ada8..41f5852 100644 (file)
@@ -362,6 +362,8 @@ EndCallForm::OnSceneActivatedN(const SceneId& previousSceneId, const SceneId& cu
                delete pArgs;
                pArgs = null;
        }
+       CallApp* pCallApp = static_cast<CallApp*>(CallApp::GetInstance());
+       pCallApp->SetTopMostWindow(false);
        AddOrientationEventListener(*this);
 }
 
index fdea3cb..2adcc58 100644 (file)
@@ -868,7 +868,6 @@ IncomingCallForm::OnSceneDeactivated(const SceneId& currentSceneId, const SceneI
 
        }
        CallApp* pCallApp = static_cast<CallApp*>(CallApp::GetInstance());
-       pCallApp->SetTopMostWindow(false);
        pCallApp->RemoveAppStateChangeListener(*this);
 }
 
index 7108c61..e2156c2 100644 (file)
@@ -51,6 +51,9 @@ CallPresentationModel::CallPresentationModel(void)
        __isMessageAppControlRunning = false;
        __isDialAppControlRunning = false;
        __pAppControlMgr = null;
+       __pNetworkManager = null;
+       __psimStateManager = null;
+       __psimInfo = null;
 }
 
 CallPresentationModel::~CallPresentationModel(void)
@@ -58,6 +61,21 @@ CallPresentationModel::~CallPresentationModel(void)
        __pTelephonyMgr = null;
        __pSettingsPresentor = null;
        __pAppControlMgr =null;
+       if(__pNetworkManager != null)
+       {
+               delete __pNetworkManager;
+               __pNetworkManager = null;
+       }
+       if(__psimStateManager != null)
+       {
+               delete __psimStateManager;
+               __psimStateManager = null;
+       }
+       if(__psimInfo != null)
+       {
+               delete __psimInfo;
+               __psimInfo = null;
+       }
 }
 
 void
@@ -102,6 +120,9 @@ CallPresentationModel::Construct(void)
        __pTelephonyMgr = TelephonyManager::GetInstance(this);
        __pSettingsPresentor = SettingsPresentationModel::GetInstance();
        __pAppControlMgr = CallAppControlRequestMgr::GetInstance();
+       __pNetworkManager = new (std::nothrow)NetworkManager();
+       __pNetworkManager->Construct(null);
+       GetSimInfo();
        return E_SUCCESS;
 }
 
@@ -118,7 +139,6 @@ CallPresentationModel::DialCall(String& contactNumber, bool isEmergency)
        int errorCode = ERROR_NONE;
        bool isCallServiceAvailable = false;
        NetworkStatus networkStatus;
-       NetworkManager* pNetworkManager = new NetworkManager();
        result r;
        //Check if Telephony Manager is initialized
        TryCatch(__pTelephonyMgr != null, (errorCode = ERROR_TAPI_INIT_FAILED), "TAPI initialization failed");
@@ -130,23 +150,22 @@ CallPresentationModel::DialCall(String& contactNumber, bool isEmergency)
                return;
        }
        //Check if dialing a call is possible - Check if sim is available
-       if (GetSimInfo() == E_FAILURE)
+       if (IsSimAvailable() == false)
        {
                __pTelEventListener->HandleTelephonyError(ERROR_CODE_SIM_INITIALIZATION_FAILED);
                return ;
        }
 
        //fetch call service status
-       r = pNetworkManager->Construct(null);
-       if (r == E_SUCCESS)
+       if(__pNetworkManager != null)
        {
-               r = pNetworkManager->GetNetworkStatus(networkStatus);
+               r = __pNetworkManager->GetNetworkStatus(networkStatus);
                if (r == E_SUCCESS)
                {
                        isCallServiceAvailable = networkStatus.IsCallServiceAvailable();
                }
        }
-       delete pNetworkManager;
+
 
        if (isCallServiceAvailable == false)
        {
@@ -809,41 +828,83 @@ CallPresentationModel::AppControlRequestCompleted(void)
 result
 CallPresentationModel::GetSimInfo(void)
 {
-       int mnc;
-       int mcc;
-       bool isAvailable;
-       String spn;
-       String iccId;
-       String operatorName;
-
-       SimStateManager simStateManager;
-       SimInfo simInfo;
-
-       result r = simStateManager.Construct();
+       __psimStateManager = new (std::nothrow)SimStateManager();
+       result r = __psimStateManager->Construct();
        if (IsFailed(r))
        {
+               delete __psimStateManager;
+               __psimStateManager = null;
                return E_FAILURE;
        }
+       __psimStateManager->SetSimEventListener(this);
 
-       r = simStateManager.GetSimInfo(simInfo);
+       __psimInfo = new (std::nothrow)SimInfo();
+       r = __psimStateManager->GetSimInfo(*__psimInfo);
        if (IsFailed(r))
        {
+               delete __psimStateManager;
+               __psimStateManager = null;
+               delete __psimInfo;
+               __psimInfo = null;
                return E_FAILURE;
        }
+       return E_SUCCESS;
+}
+
+void
+CallPresentationModel::OnTelephonyNetworkStatusChanged(const NetworkStatus& networkStatus)
+{
+
+}
+
+void
+CallPresentationModel::OnTelephonySimStateChanged(Tizen::Telephony::SimState state)
+{
+       if(__psimStateManager != null)
+       {
+               delete __psimStateManager;
+               __psimStateManager =null;
+       }
+       if(__psimInfo != null)
+       {
+               delete __psimInfo;
+               __psimInfo = null;
+       }
 
-       mnc = simInfo.GetMnc();
-       mcc = simInfo.GetMcc();
-       spn = simInfo.GetSpn();
-       iccId = simInfo.GetIccId();
-       operatorName = simInfo.GetOperatorName();
-       //Checks whether a SIM card is present in the device or not
-       isAvailable = simInfo.IsAvailable();
-       if(isAvailable == true)
+       __psimStateManager = new SimStateManager();
+       result r = __psimStateManager->Construct();
+       if (IsFailed(r))
        {
-               return E_SUCCESS;
+               delete __psimStateManager;
+               __psimStateManager = null;
+               return ;
+       }
+
+       __psimInfo = new SimInfo();
+       r = __psimStateManager->GetSimInfo(*__psimInfo);
+       if (IsFailed(r))
+       {
+               delete __psimStateManager;
+               __psimStateManager = null;
+               delete __psimInfo;
+               __psimInfo = null;
+               return ;
+       }
+
+}
+
+bool
+CallPresentationModel::IsSimAvailable(void)
+{
+       if(__psimInfo != null)
+       {
+               return __psimInfo->IsAvailable();
        }
        else
        {
-               return E_FAILURE;
+               return false;
        }
+
+
 }
+
index c66928a..e3ca156 100644 (file)
@@ -41,6 +41,10 @@ SoundManager::SoundManager(void)
        , __pVibrator(null)
        , __pPlayer(null)
        , __lastEndedConferenceCall(false)
+       , __pConnectPlayer(null)
+       , __pDisconnectPlayer(null)
+       , __pReminderPlayer(null)
+       , __pWaitingTonePlayer(null)
 {
        __timer.Construct(*this);
        __isSoundStatusOn = false;
@@ -56,10 +60,32 @@ SoundManager::~SoundManager(void)
        if (__pVibrator != null)
        {
                delete __pVibrator;
+               __pVibrator = null;
        }
        if (__pPlayer != null)
        {
                delete __pPlayer;
+               __pPlayer = null;
+       }
+       if(__pConnectPlayer != null)
+       {
+               delete __pConnectPlayer;
+               __pConnectPlayer = null;
+       }
+       if(__pDisconnectPlayer != null)
+       {
+               delete __pDisconnectPlayer;
+               __pDisconnectPlayer = null;
+       }
+       if(__pReminderPlayer != null)
+       {
+               delete __pReminderPlayer;
+               __pReminderPlayer = null;
+       }
+       if(__pWaitingTonePlayer != null)
+       {
+               delete __pWaitingTonePlayer;
+               __pWaitingTonePlayer = null;
        }
 
 }
@@ -201,49 +227,51 @@ SoundManager::OnTimerExpired(Timer& timer)
        vconf_get_bool(VCONFKEY_CISSAPPL_MINUTE_MINDER_BOOL, &unknownRejectStatus);
        bool ReminderToneSetStatus = unknownRejectStatus;
        result res = E_FAILURE;
+       reminderTonePath.Append(MINUTEREMINDERTONE_PATH);
 
        if(ReminderToneSetStatus == true)
        {
 
-               if(__pPlayer == null)
+               if(__pReminderPlayer == null)
                {
-                       __pPlayer =  new (std::nothrow) Player();
-                       res = __pPlayer->Construct(*this);
-                       if(res != E_SUCCESS)
+
+                       if(reminderTonePath.IsEmpty() == false)
                        {
-                               AppLogDebug("__pPlayer Construct failed with %d",res);
-                               return;
+                               __pReminderPlayer =  new (std::nothrow) Player();
+                               res = __pReminderPlayer->Construct(*this);
+                               if(res != E_SUCCESS)
+                               {
+                                       AppLogDebug("__pReminderPlayer Construct failed with %d",res);
+                                       return;
+                               }
+                               res = __pReminderPlayer->OpenFile(reminderTonePath,false);
+                               if(res != E_SUCCESS)
+                               {
+                                       AppLogDebug("__pReminderPlayer OpenFile failed with %d",res);
+                                       return;
+                               }
+                               res = __pReminderPlayer->SetLooping(false);
+                               if(res != E_SUCCESS)
+                               {
+                                       AppLogDebug("__pReminderPlayer SetLooping failed with %d",res);
+                                       return;
+                               }
+                               res = __pReminderPlayer->SetVolume(80);
+                               if(res != E_SUCCESS)
+                               {
+                                       AppLogDebug("__pReminderPlayer SetVolume failed with %d",res);
+                                       return;
+                               }
                        }
                }
 
-               reminderTonePath.Append(MINUTEREMINDERTONE_PATH);
-               if(reminderTonePath.IsEmpty() == false)
+               if(__pReminderPlayer != null)
                {
-                       __pPlayer->Stop();
-                       __pPlayer->Close();
-                       res = __pPlayer->OpenFile(reminderTonePath,false);
-                       if(res != E_SUCCESS)
-                       {
-                               AppLogDebug("__pPlayer OpenFile failed with %d",res);
-                               return;
-                       }
-                       res = __pPlayer->SetLooping(false);
-                       if(res != E_SUCCESS)
-                       {
-                               AppLogDebug("__pPlayer SetLooping failed with %d",res);
-                               return;
-                       }
-                       res = __pPlayer->SetVolume(80);
-                       if(res != E_SUCCESS)
-                       {
-                               AppLogDebug("__pPlayer SetVolume failed with %d",res);
-                               return;
-                       }
                        SetSoundMode(SOUND_MODE_MEDIA);
-                       res = __pPlayer->Play();
+                       res = __pReminderPlayer->Play();
                        if(res != E_SUCCESS)
                        {
-                               AppLogDebug("__pPlayer Play failed with %d",res);
+                               AppLogDebug("__pReminderPlayer Play failed with %d",res);
                                return;
                        }
                        SetSoundMode(SOUND_MODE_VOICE);
@@ -273,73 +301,75 @@ SoundManager::SetDisconnectTone(void)
        {
                AppLogDebug("disconnectToneSetStatus == true");
                disconnectTonePath.Append(CALLDISCONNECTTONE_PATH);
-               if(__pPlayer == null)
+               if(disconnectTonePath.IsEmpty() == false)
                {
-                       AppLogDebug("__pPlayer == null");
-                       __pPlayer =  new (std::nothrow) Player();
-                       res = __pPlayer->Construct(*this);
-                       if(res != E_SUCCESS)
+                       if(__pDisconnectPlayer == null)
                        {
-                               AppLogDebug("__pPlayer Construct failed with %d",res);
-                               return;
-                       }
+                               AppLogDebug("__pConnectPlayer == null");
+                               __pDisconnectPlayer =  new (std::nothrow) Player();
+                               res = __pDisconnectPlayer->Construct(*this);
+                               if(res != E_SUCCESS)
+                               {
+                                       AppLogDebug("__pDisconnectPlayer Construct failed with %d",res);
+                                       return;
+                               }
+                               res = __pDisconnectPlayer->OpenFile(disconnectTonePath,false);
+                               if(res != E_SUCCESS)
+                               {
+                                       AppLogDebug("__pDisconnectPlayer OpenFile failed with %d",res);
+                                       return;
+                               }
+                               res = __pDisconnectPlayer->SetLooping(false);
+                               if(res != E_SUCCESS)
+                               {
+                                       AppLogDebug("__pDisconnectPlayer SetLooping failed with %d",res);
+                                       return;
+                               }
+                               res = __pDisconnectPlayer->SetVolume(80);
+                               if(res != E_SUCCESS)
+                               {
+                                       AppLogDebug("__pDisconnectPlayer SetLooping SetVolume with %d",res);
+                                       return;
+                               }
 
+                       }
                }
-               if(disconnectTonePath.IsEmpty() == false)
+
+               if(__pDisconnectPlayer != null)
                {
-                       __pPlayer->Stop();
-                       __pPlayer->Close();
-                       AppLogDebug("__pPlayer OpenFile %ls",disconnectTonePath.GetPointer());
-                       res = __pPlayer->OpenFile(disconnectTonePath,false);
-                       if(res != E_SUCCESS)
-                       {
-                               AppLogDebug("__pPlayer OpenFile failed with %d",res);
-                               return;
-                       }
-                       res = __pPlayer->SetLooping(false);
-                       if(res != E_SUCCESS)
-                       {
-                               AppLogDebug("__pPlayer SetLooping failed with %d",res);
-                               return;
-                       }
-                       res = __pPlayer->SetVolume(80);
-                       if(res != E_SUCCESS)
+                       AppLogDebug("__pDisconnectPlayer OpenFile %ls",disconnectTonePath.GetPointer());
+                       SetSoundMode(SOUND_MODE_MEDIA);
+                       AppLogDebug("__pDisconnectPlayer SetVolume");
+                       if(__pDisconnectPlayer->GetState() == PLAYER_STATE_PLAYING)
                        {
-                               AppLogDebug("__pPlayer SetLooping SetVolume with %d",res);
-                               return;
+                               __pDisconnectPlayer->Stop();
                        }
-                       SetSoundMode(SOUND_MODE_MEDIA);
-                       AppLogDebug("__pPlayer SetVolume");
-                       res = __pPlayer->Play();
+                       res = __pDisconnectPlayer->Play();
                        if(res != E_SUCCESS)
                        {
-                               AppLogDebug("__pPlayer Play with %d",res);
+                               AppLogDebug("__pDisconnectPlayer Play with %d",res);
                                return;
                        }
                }
+
        }
+
+
+
+
        AppLogDebug("Exit");
 
 }
 
 void
-SoundManager::SetMinuteReminderTone()
+SoundManager::SetMinuteReminderTone(void)
 {
-
-       int unknownRejectStatus = -1;
-       vconf_get_bool(VCONFKEY_CISSAPPL_MINUTE_MINDER_BOOL, &unknownRejectStatus);
-       bool reminderToneSetStatus = unknownRejectStatus;
-
-       if(reminderToneSetStatus == true)
-       {
-               __timer.StartAsRepeatable(60000);
-       }
-
+       __timer.StartAsRepeatable(60000);
 }
 
 
 void
-SoundManager::SetConnectTone()
+SoundManager::SetConnectTone(void)
 {
 
        String connectTonePath;
@@ -353,112 +383,126 @@ SoundManager::SetConnectTone()
        if(connectToneSetStatus == true)
        {
 
-               if(__pPlayer == null)
+               if(__pConnectPlayer == null)
                {
-                       __pPlayer =  new (std::nothrow) Player();
-                       res = __pPlayer->Construct(*this);
-                       if(res != E_SUCCESS)
+                       if (connectTonePath.IsEmpty() == false)
                        {
-                               AppLogDebug("__pPlayer Construct failed with %d",res);
-                               return;
+                               __pConnectPlayer =  new (std::nothrow) Player();
+                               res = __pConnectPlayer->Construct(*this);
+                               if(res != E_SUCCESS)
+                               {
+                                       AppLogDebug("__pConnectPlayer Construct failed with %d",res);
+                                       return;
+                               }
+                               res = __pConnectPlayer->OpenFile(connectTonePath,false);
+                               if(res != E_SUCCESS)
+                               {
+                                       AppLogDebug("__pConnectPlayer OpenFile failed with %d",res);
+                                       return;
+                               }
+                               res = __pConnectPlayer->SetLooping(false);
+                               if(res != E_SUCCESS)
+                               {
+                                       AppLogDebug("__pConnectPlayer SetLooping failed with %d",res);
+                                       return;
+                               }
+                               res = __pConnectPlayer->SetVolume(80);
+                               if(res != E_SUCCESS)
+                               {
+                                       AppLogDebug("__pConnectPlayer SetVolume failed with %d",res);
+                                       return;
+                               }
                        }
                }
-               if (connectTonePath.IsEmpty() == false)
-               {
 
-                       __pPlayer->Stop();
-                       __pPlayer->Close();
-                       res = __pPlayer->OpenFile(connectTonePath,false);
-                       if(res != E_SUCCESS)
-                       {
-                               AppLogDebug("__pPlayer OpenFile failed with %d",res);
-                               return;
-                       }
-                       res = __pPlayer->SetLooping(false);
-                       if(res != E_SUCCESS)
-                       {
-                               AppLogDebug("__pPlayer SetLooping failed with %d",res);
-                               return;
-                       }
-                       res = __pPlayer->SetVolume(80);
-                       if(res != E_SUCCESS)
-                       {
-                               AppLogDebug("__pPlayer SetVolume failed with %d",res);
-                               return;
-                       }
+               if(__pConnectPlayer != null)
+               {
                        res = SetSoundMode(SOUND_MODE_MEDIA);
-                       AppLogDebug("__pPlayer Playing connect tone");
-                       res = __pPlayer->Play();
+                       AppLogDebug("__pConnectPlayer Playing connect tone");
+                       res = __pConnectPlayer->Play();
                        if(res != E_SUCCESS)
                        {
-                               AppLogDebug("__pPlayer Play failed with %d",res);
+                               AppLogDebug("__pConnectPlayer Play failed with %d",res);
                                return;
                        }
                }
+
        }
+
+
 }
 
 void
-SoundManager::StartAlert(String& contactRingTone)
+SoundManager::SetWaitTone(void)
 {
+       CallAlertStatus status= CALL_ALERT_SOUND;
+       int alertStatus = -1;
        result res = E_FAILURE;
-       AppLogDebug("Enter");
-       if(__pSoundCallSession != null)
+       int retVal = vconf_get_int(VCONFKEY_CISSAPPL_ALERT_ON_CALL_INT, &alertStatus);
+       if (retVal == 0)
        {
-               CallAlertStatus status= CALL_ALERT_SOUND;
-               int alertStatus = -1;
-               int retVal = vconf_get_int(VCONFKEY_CISSAPPL_ALERT_ON_CALL_INT, &alertStatus);
-               if (retVal == 0)
-               {
-                       status = (CallAlertStatus) alertStatus;
-               }
-               AppLogDebug("No Alert already in call");
-               if(status == CALL_ALERT_SOUND)
+               status = (CallAlertStatus) alertStatus;
+       }
+       AppLogDebug("No Alert already in call");
+       if(status == CALL_ALERT_SOUND)
+       {
+               AppLogDebug("Playing alert tone");
+               String waitingTonePath;
+               waitingTonePath.Append(CALLWAITINGTONE_PATH);
+               if(__pWaitingTonePlayer == null)
                {
-                       AppLogDebug("Playing alert tone");
-                       String waitingTonePath;
-                       waitingTonePath.Append(CALLWAITINGTONE_PATH);
-                       if(__pPlayer == null)
-                       {
-                               __pPlayer =  new (std::nothrow) Player();
-                               res = __pPlayer->Construct(*this);
-                               if(res != E_SUCCESS)
-                               {
-                                       AppLogDebug("__pPlayer Construct failed with %d",res);
-                                       return;
-                               }
-                       }
                        if (waitingTonePath.IsEmpty() == false)
                        {
-                               __pPlayer->Stop();
-                               __pPlayer->Close();
-                               res = __pPlayer->OpenFile(waitingTonePath,false);
+                               __pWaitingTonePlayer =  new (std::nothrow) Player();
+                               res = __pWaitingTonePlayer->Construct(*this);
                                if(res != E_SUCCESS)
                                {
-                                       AppLogDebug("__pPlayer OpenFile failed with %d",res);
+                                       AppLogDebug("__pWaitingTonePlayer Construct failed with %d",res);
                                        return;
                                }
-                               res = __pPlayer->SetLooping(true);
+                               res = __pWaitingTonePlayer->OpenFile(waitingTonePath,false);
                                if(res != E_SUCCESS)
                                {
-                                       AppLogDebug("__pPlayer SetLooping failed with %d",res);
+                                       AppLogDebug("__pWaitingTonePlayer OpenFile failed with %d",res);
                                        return;
                                }
-                               res = __pPlayer->SetVolume(80);
+                               res = __pWaitingTonePlayer->SetLooping(true);
                                if(res != E_SUCCESS)
                                {
-                                       AppLogDebug("__pPlayer SetVolume failed with %d",res);
+                                       AppLogDebug("__pWaitingTonePlayer SetLooping failed with %d",res);
                                        return;
                                }
-                               SetSoundMode(SOUND_MODE_MEDIA);
-                               res = __pPlayer->Play();
+                               res = __pWaitingTonePlayer->SetVolume(80);
                                if(res != E_SUCCESS)
                                {
-                                       AppLogDebug("__pPlayer Play failed with %d",res);
+                                       AppLogDebug("__pWaitingTonePlayer SetVolume failed with %d",res);
                                        return;
                                }
                        }
                }
+
+               if( __pWaitingTonePlayer != null )
+               {
+                       SetSoundMode(SOUND_MODE_MEDIA);
+                       res = __pWaitingTonePlayer->Play();
+                       if(res != E_SUCCESS)
+                       {
+                               AppLogDebug("__pWaitingTonePlayer Play failed with %d",res);
+                               return;
+                       }
+               }
+
+       }
+}
+
+void
+SoundManager::StartAlert(String& contactRingTone)
+{
+       result res = E_FAILURE;
+       AppLogDebug("Enter");
+       if(__pSoundCallSession != null)
+       {
+               SetWaitTone();
                return;
        }
        else
@@ -515,7 +559,7 @@ SoundManager::StartAlert(String& contactRingTone)
                        ringTonePath.Clear();
                        ringTonePath.Append(RINGTONE_PATH);
                }
-               __pPlayer->Close();
+
                res = __pPlayer->OpenFile(ringTonePath,false);
                if(res != E_SUCCESS)
                {
@@ -560,7 +604,10 @@ SoundManager::StopAlert(void)
        {
                //todo: stop player
                AppLogDebug("Stopping ring tone");
-               res = __pPlayer->Stop();
+               if(__pPlayer->GetState() == PLAYER_STATE_PLAYING)
+               {
+                       res = __pPlayer->Stop();
+               }
                if(res != E_SUCCESS)
                {
                        AppLogDebug("__pPlayer Stop failed with %d",res);
@@ -581,6 +628,14 @@ SoundManager::StopAlert(void)
                __pVibrator->Stop();
                __isVibrateStatusOn = false;
        }
+       if(__pWaitingTonePlayer != null)
+       {
+               if(__pWaitingTonePlayer->GetState() == PLAYER_STATE_PLAYING)
+               {
+                       __pWaitingTonePlayer->Stop();
+               }
+       }
+
        AppLogDebug("Exit");
 }