Removed usage of RemoveControl() in destructor
authorAmith Kumar Mahale <amith.m@samsung.com>
Wed, 3 Apr 2013 15:20:33 +0000 (20:50 +0530)
committerAmith Kumar Mahale <amith.m@samsung.com>
Wed, 3 Apr 2013 15:20:33 +0000 (20:50 +0530)
Change-Id: I40898f9cee47e6eff4443206cb32a5cd5e8ad7ed
Signed-off-by: Amith Kumar Mahale <amith.m@samsung.com>
inc/CallApp.h
manifest.xml
res/screen-size-normal/IDL_CONFCALL_LIST_FORM.xml
src/CallActiveCallForm.cpp
src/CallApp.cpp
src/CallEndCallForm.cpp
src/CallTypes.cpp

index 0516a99..9d8ab19 100644 (file)
@@ -74,14 +74,14 @@ public:
 
 private:
        //internal function to process AppControl request.
-       void ProcessAppControlRequest(RequestId reqId, const Tizen::Base::String& operationId,const Tizen::Base::Collection::IMap* pArgsMap);
+       void ProcessAppControlRequest(RequestId reqId, const Tizen::Base::String& operationId,const Tizen::Base::Collection::IMap* pArgsMap,const Tizen::Base::String* pUriData =null);
        //internal function to process AppControl request.
        void ProcessWebAppControlRequest(RequestId reqId, const Tizen::Base::String& operationId,const Tizen::Base::String* pUriData);
 
        //internal function to handle AppControl Request for Incoming call.
        void HandleIncomingCallAppControlRequest(RequestId reqId,const Tizen::Base::Collection::IMap* pArgsMap);
        //internal function to handle AppControl Request for dial call.
-       void HandleDialCallAppControlRequest(RequestId reqId,const Tizen::Base::Collection::IMap* pArgsMap);
+       void HandleDialCallAppControlRequest(RequestId reqId,const Tizen::Base::Collection::IMap* pArgsMap,const Tizen::Base::String* pUriData);
        //Checks if the number is valid
        bool CheckNumberIsValid(Tizen::Base::String phoneNumber);
 
index 7e26371..69c6dbd 100644 (file)
@@ -15,8 +15,8 @@
             <Privilege>http://tizen.org/privilege/power</Privilege>
             <Privilege>http://tizen.org/privilege/setting</Privilege>
             <Privilege>http://tizen.org/privilege/lockmanager</Privilege>
-            <Privilege>http://tizen.org/privilege/telephony</Privilege>
             <Privilege>http://tizen.org/privilege/messaging.sms</Privilege>
+            <Privilege>http://tizen.org/privilege/telephony</Privilege>
             <Privilege>http://tizen.org/privilege/vibrator</Privilege>
             <Privilege>http://tizen.org/privilege/contact.read</Privilege>
         </Privileges>
index 4fae7d1..97548f8 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.201303280947" Dversion="20120315">
+
+<Scene Bversion="2.0.0.201304011930" 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"/>
@@ -16,7 +17,7 @@
     </Footer>
     <Button id="IDC_END_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="#DDDDDD" disabledColorOpacity="100" highlightedBGBitmapPath="" highlightedBitmapPath="" highlightedBitmapX="0.0" highlightedBitmapY="0.0" highlightedColor="" highlightedColorOpacity="100" highlightedTextColor="#000000" horizontalAlign="ALIGN_CENTER" normalBGBitmapPath="" normalBitmapPath="" normalColor="#B33C3C" normalColorOpacity="100" normalTextColor="#F9F9F9" pressedBGBitmapPath="" pressedBitmapPath="" pressedColor="#409CD3" pressedColorOpacity="100" pressedTextColor="#000000" text="End Call" textSize="48.0" verticalAlign="ALIGN_MIDDLE"/>
-        <layout bottomRelation="" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_TOP" centerHorizontal="false" centerVertical="false" height="112.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_CONFCALL_LIST_FORM" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="26.0" marginLeft="16.0" marginRight="16.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="688.0" x="16.0" y="968.0"/>
+        <layout bottomRelation="IDL_CONFCALL_LIST_FORM" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="112.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_CONFCALL_LIST_FORM" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="26.0" marginLeft="16.0" marginRight="16.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="688.0" x="16.0" y="984.0"/>
         <layout bottomRelation="IDL_CONFCALL_LIST_FORM" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="74.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_CONFCALL_LIST_FORM" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="10.0" marginLeft="26.0" marginRight="26.0" marginTop="0.0" mode="Landscape" rightRelation="IDL_CONFCALL_LIST_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="" topRelationType="" verticalFitPolicy="FIT_POLICY_FIXED" width="1228.0" x="26.0" y="491.0"/>
     </Button>
     <TableView id="IDC_CONF_CALL_LIST_TABLEVIEW" parent="IDL_CONFCALL_LIST_FORM">
@@ -26,7 +27,7 @@
     </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="772.0"/>
+        <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"/>
     </Label>
     <Label id="IDC_CONF_TITLE_LABEL" parent="IDL_CONFCALL_LIST_FORM">
@@ -36,7 +37,7 @@
     </Label>
     <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="772.0"/>
+        <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"/>
     </Button>
 </Scene>
index 058a3ba..3c8952c 100644 (file)
@@ -117,17 +117,14 @@ ActiveCallForm::~ActiveCallForm(void)
        }
        if (__pMoreOptionsList != null)
        {
-               RemoveControl(*__pMoreOptionsList);
                __pMoreOptionsList = null;
        }
        if (__pMoreOptionsListAnchor != null)
        {
-               RemoveControl(*__pMoreOptionsListAnchor);
                __pMoreOptionsListAnchor = null;
        }
        if (__pSmallPhotoLabel != null)
        {
-               RemoveControl(*__pSmallPhotoLabel);
                __pSmallPhotoLabel = null;
        }
        if (__pActiveCallInfo != null)
@@ -140,7 +137,6 @@ ActiveCallForm::~ActiveCallForm(void)
        }
        if(__pDTMFKeypad != null)
        {
-               RemoveControl(*__pDTMFKeypad);
                __pDTMFKeypad = null;
        }
 }
index 21bb85c..4c57277 100644 (file)
@@ -176,7 +176,12 @@ void
 CallApp::OnAppControlRequestReceived(RequestId reqId, const String& operationId, const String* pUriData,
                const String* pMimeType, const IMap* pExtraData)
 {
-       AppLogDebug("Enter");
+       AppLogDebug("Enter ");
+       if(pUriData != null)
+       {
+               AppLogDebug("%ls ",pUriData->GetPointer());
+       }
+
        if(pExtraData == null && pUriData != null)
        {
                //The request is from web app
@@ -186,7 +191,7 @@ CallApp::OnAppControlRequestReceived(RequestId reqId, const String& operationId,
        else
        {
                //process AppControl parameters
-               ProcessAppControlRequest(reqId, operationId, pExtraData);
+               ProcessAppControlRequest(reqId, operationId, pExtraData,pUriData);
        }
        AppLogDebug("EXIT");
 }
@@ -226,7 +231,7 @@ CallApp::ProcessWebAppControlRequest(RequestId reqId, const String& operationId,
 }
 
 void
-CallApp::ProcessAppControlRequest(RequestId reqId, const String& operationId,const IMap* pArgsMap)
+CallApp::ProcessAppControlRequest(RequestId reqId, const String& operationId,const IMap* pArgsMap,const String* pUriData)
 {
        AppLogDebug("Enter %ls",operationId.GetPointer());
        __pLaunchArgs = null;
@@ -252,7 +257,7 @@ CallApp::ProcessAppControlRequest(RequestId reqId, const String& operationId,con
                        }
                        else
                        {
-                               HandleDialCallAppControlRequest(reqId, pArgsMap);
+                               HandleDialCallAppControlRequest(reqId, pArgsMap,pUriData);
                        }
                }
                else
@@ -323,14 +328,14 @@ CallApp::HandleIncomingCallAppControlRequest(RequestId reqId,const IMap* pArgsMa
                else
                {
                        //Show messageBox showing automatic call rejection
-                       MessageBox callRejectedInoMsgBox;
+               /*      MessageBox callRejectedInoMsgBox;
                        String msg(L"Call From ");
                        msg.Append(contactNumber);
                        msg.Append(L" Rejected.");
                        callRejectedInoMsgBox.Construct(L"Call Rejected", msg, MSGBOX_STYLE_NONE,1000);
                        int modalResult = 0;
                        // Calls ShowAndWait() : Draws and Shows itself and processes events
-                       callRejectedInoMsgBox.ShowAndWait(modalResult);
+                       callRejectedInoMsgBox.ShowAndWait(modalResult);*/
 
                        //go back to previous scene if App was already running, else exit application.
                        if(__initialSceneId.IsEmpty() == true)
@@ -353,7 +358,7 @@ CallApp::HandleIncomingCallAppControlRequest(RequestId reqId,const IMap* pArgsMa
 }
 
 void
-CallApp::HandleDialCallAppControlRequest(RequestId reqId,const IMap* pArgsMap)
+CallApp::HandleDialCallAppControlRequest(RequestId reqId,const IMap* pArgsMap,const String* pUriData)
 {
        //response message
        AppCtrlResult appControlResult = APP_CTRL_RESULT_FAILED;
@@ -376,6 +381,22 @@ CallApp::HandleDialCallAppControlRequest(RequestId reqId,const IMap* pArgsMap)
                else
                {
                        AppLogDebug("PARAM_PHONE_NUMBER not present");
+                       //Now check if tel uri is present
+                       if(pUriData != null)
+                       {
+                               AppLogDebug("pUriData is present %ls",pUriData->GetPointer());
+                               phoneNumber.Append(*pUriData);
+                               if(phoneNumber.Contains(PARAM_PHONE_NUMBER))
+                               {
+                                       phoneNumber.Replace(PARAM_PHONE_NUMBER,L"");
+                                       if(phoneNumber.Contains(DELIMITER))
+                                       {
+                                               phoneNumber.Replace(DELIMITER,L"");
+                                               AppLogDebug("%ls",phoneNumber.GetPointer());
+                                       }
+                               }
+                               AppLogDebug("%ls",phoneNumber.GetPointer());
+                       }
                }
                delete pKey;
                //Check if its a valid number
index e257438..bfd46ba 100644 (file)
@@ -77,7 +77,6 @@ EndCallForm::~EndCallForm(void)
        }
        if (__pSmallPhotoLabel != null)
        {
-               RemoveControl(*__pSmallPhotoLabel);
                __pSmallPhotoLabel = null;
        }
 }
index 8491224..3e1b90a 100644 (file)
@@ -272,10 +272,10 @@ const wchar_t* TYPE_SMS = L"type:SMS";
 const wchar_t* TEL = L"tel:";
 const wchar_t* TO = L"to:";
 
-const wchar_t* OPERATION_ID_PICK = L"http://tizen.org/appcontrol/operation/pick";
-const wchar_t* OPERATION_ID_VIEW = L"http://tizen.org/appcontrol/operation/view";
-const wchar_t* OPERATION_ID_ADD = L"http://tizen.org/appcontrol/operation/add";
-const wchar_t* OPERATION_ID_EDIT = L"http://tizen.org/appcontrol/operation/edit";
+const wchar_t* OPERATION_ID_PICK =  L"http://tizen.org/appcontrol/operation/social/pick";
+const wchar_t* OPERATION_ID_VIEW = L"http://tizen.org/appcontrol/operation/social/view";
+const wchar_t* OPERATION_ID_ADD = L"http://tizen.org/appcontrol/operation/social/add";
+const wchar_t* OPERATION_ID_EDIT = L"http://tizen.org/appcontrol/operation/social/edit";
 const wchar_t* OPERATION_ID_CONFIGURE = L"http://tizen.org/appcontrol/operation/configure";
 const wchar_t* OPERATION_ID_CAPTURE = L"http://tizen.org/appcontrol/operation/capture";
 const wchar_t* OPERATION_ID_CALL = L"http://tizen.org/appcontrol/operation/call";
@@ -303,7 +303,7 @@ const wchar_t* PARAM_ORIGIN_MT = L"MT";
 const wchar_t* CALL_HANDLE = L"handle";
 const wchar_t* CONTACT_NUMBER = L"number";
 const wchar_t* PARAM_CALL_VALUE_VOICE = L"voice";
-const wchar_t* PARAM_CALL_TYPE = L"type";
+const wchar_t* PARAM_CALL_TYPE = L"http://tizen.org/appcontrol/data/call/type";
 const wchar_t* PARAM_PHONE_NUMBER = L"tel";
 const wchar_t* INPUT_TYPE_PHONE = L"phone";
 const wchar_t* MESSAGE_TYPE = L"http://tizen.org/appcontrol/data/message/type";