TizenRefApp-8461 Launch voice call and contacts app in conversation 88/127988/1
authorDenis Dolzhenko <d.dolzhenko@samsung.com>
Wed, 3 May 2017 13:16:03 +0000 (16:16 +0300)
committerDenis Dolzhenko <d.dolzhenko@samsung.com>
Wed, 3 May 2017 13:16:03 +0000 (16:16 +0300)
Change-Id: I527f59858b8cd23285c7f49713b1d73b4c9eb37c
Signed-off-by: Denis Dolzhenko <d.dolzhenko@samsung.com>
src/Common/AppControl/inc/ContactViewer.h
src/Common/AppControl/src/ContactViewer.cpp
src/Conversation/Controller/inc/ConvFrame.h
src/Conversation/Controller/src/ConvFrame.cpp

index 906316c7cd40a254a2bef675e054313c15b29c9b..79840982ddd8e43c497a3bfdd5d3efc18d59443d 100644 (file)
@@ -45,6 +45,13 @@ namespace Msg {
              */
             bool launch(const ContactAddress &address);
 
+            /**
+             * @brief Launches view-operation.
+             * @param[in] string address (phone)
+             * @return true in case of success, otherwise returns false.
+             */
+            bool launch(const std::string &address);
+
             /**
              * @brief Launches view-operation.
              * @return true in case of success, otherwise returns false.
index b214acae9c1b8528065f8bee69aa3cdefbd6b7a7..25b0d524769fefd07eb36ed250d46f6c0bb1638f 100644 (file)
@@ -55,6 +55,12 @@ bool ContactViewer::launch()
     return AppControlLauncher::getInst().launch(*this);
 }
 
+bool ContactViewer::launch(const std::string &address)
+{
+    app_control_add_extra_data(m_Handle, APP_CONTROL_DATA_PHONE, address.c_str());
+    return launch();
+}
+
 const char *ContactViewer::toStr(ContactAddress::OwnerType type)
 {
     switch (type)
index e37b0cdfcb34d0af0eebacab7ebb0dfb03994bc8..f654b0393c1d7df198c4bc43f173fe786bb3d31d 100644 (file)
@@ -23,6 +23,7 @@
 #include "ConvList.h"
 #include "WorkingDir.h"
 #include "MoreOption.h"
+#include "ContactViewer.h"
 
 namespace Msg
 {
@@ -125,6 +126,7 @@ namespace Msg
             SelectButton *m_pSelectButton;
             WorkingDirRef m_WorkingDir;
             MoreOptionItemInfo m_MoreOptionItemsInfo[MorOptionMax];
+            ContactViewer m_ContactViewer;
     };
 }
 
index fae9448624d4a7f932df4f50b2133c50aea41835..b808d4d703a10377c4d9c0ff45d7569cc7c3e49a 100644 (file)
@@ -24,6 +24,7 @@
 #include "IconTextPopup.h"
 #include "MsgBodyFrame.h"
 #include "Recipient.h"
+#include "VoiceCall.h"
 
 using namespace Msg;
 
@@ -338,6 +339,7 @@ void ConvFrame::onReplyClicked(MoreOption &obj)
 void ConvFrame::onCallClicked(MoreOption &obj)
 {
     MSG_LOG("");
+    VoiceCall::launch(m_pList->getRecip().getAddress());
 }
 
 void ConvFrame::onSendMyLocationClicked(MoreOption &obj)
@@ -348,6 +350,7 @@ void ConvFrame::onSendMyLocationClicked(MoreOption &obj)
 void ConvFrame::onRecipientsClicked(MoreOption &obj)
 {
     MSG_LOG("");
+    m_ContactViewer.launch(m_pList->getRecip().getAddress());
 }
 
 void ConvFrame::onBlockNumberClicked(MoreOption &obj)