Launch lemolo dialer to handle incoming calls 44/28044/1 accepted/tizen_3.0.m14.3_ivi tizen_3.0.m14.3_ivi accepted/tizen/ivi/20140926.101841 submit/tizen_ivi/20140924.191211 tizen_3.0.m14.3_ivi_release
authorJimmy Huang <jimmy.huang@intel.com>
Wed, 24 Sep 2014 18:57:35 +0000 (11:57 -0700)
committerJimmy Huang <jimmy.huang@intel.com>
Wed, 24 Sep 2014 18:59:41 +0000 (11:59 -0700)
Adding support for feature TC-714, phoned will launch lemolo dialer
for handling incoming calls when Modello homescreen is not running.

Change-Id: Ieaabe27d094a62b43accc0f14f603ef57a6fe5cc
Signed-off-by: Jimmy Huang <jimmy.huang@intel.com>
CMakeLists.txt
packaging/phoned.changes
packaging/phoned.spec
src/phone.cpp

index 19a2c58..87e4775 100644 (file)
@@ -13,12 +13,14 @@ PKG_CHECK_MODULES(glib REQUIRED glib-2.0)
 PKG_CHECK_MODULES(gio REQUIRED gio-2.0)
 PKG_CHECK_MODULES(dbus REQUIRED dbus-1)
 PKG_CHECK_MODULES(libebook-contacts REQUIRED libebook-contacts-1.2)
+PKG_CHECK_MODULES(aul REQUIRED aul)
 
 INCLUDE_DIRECTORIES(
   ${glib_INCLUDE_DIRS}
   ${gio_INCLUDE_DIRS}
   ${dbus_INCLUDE_DIRS}
   ${libebook-contacts_INCLUDE_DIRS}
+  ${aul_INCLUDE_DIRS}
 )
 
 # -----------------------------------------------------------------------------
@@ -99,6 +101,7 @@ TARGET_LINK_LIBRARIES(${TARGET_NAME}
                       ${gio_LDFLAGS}
                       ${dbus_LDFLAGS}
                       ${libebook-contacts_LDFLAGS}
+                      ${aul_LDFLAGS}
 )
 INSTALL(TARGETS ${TARGET_NAME} DESTINATION ${DESTINATION_PREFIX})
 INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/scripts/org.tizen.phone.service DESTINATION ${DBUS_SERVICE_PREFIX})
index 83c3e72..584dd2c 100644 (file)
@@ -1,3 +1,6 @@
+* Wed Sep 24 2014 Jimmy Huang <jimmy.huang@intel.com> accepted/tizen/ivi/20140915.195444-2-g72610ba
+- Launch lemolo dialer to handle incoming calls
+
 * Thu Sep 18 2014 Jimmy Huang <jimmy.huang@intel.com> accepted/tizen/ivi/20140915.195444-1-g32e0ce7
 - Query available modems and connect to first modem found
 
index 644060b..d8c0683 100644 (file)
@@ -12,6 +12,7 @@ BuildRequires:  pkgconfig(libebook-contacts-1.2)
 BuildRequires:  pkgconfig(expat)
 BuildRequires:  pkgconfig(json-glib-1.0)
 BuildRequires:  pkgconfig(dbus-1)
+BuildRequires:  pkgconfig(aul)
 
 %description
 A service to export OFono/Obex functionality over DBUS, to be used by WebRuntime plugin
index b3d5aed..b4003a0 100644 (file)
@@ -1,6 +1,7 @@
 #include <string.h>
 #include <fstream>
 #include <algorithm>
+#include <aul.h>
 
 #include "phone.h"
 #include "utils.h"
@@ -10,6 +11,8 @@
 namespace PhoneD {
 
 #define TIZEN_PREFIX           "org.tizen"
+#define DIALER_APP_ID          "org.tizen.dialer"
+#define MODELLO_APP_ID         "Modello005.Homescreen"
 
 #define PHONE_SERVICE          TIZEN_PREFIX ".phone"
 #define PHONE_IFACE            TIZEN_PREFIX ".Phone"
@@ -693,6 +696,13 @@ void Phone::callChanged(const char* state, const char* phoneNumber) {
         // a call has been made => update call history
         // use a delayed sync, since the list may not be updated on the phone yet
         g_timeout_add(DELAYED_SYNC_CALLHISTORY_INTERVAL, delayedSyncCallHistory, this);
+    } else if (state && !strcmp(state, "incoming")) {
+        // Launch dialer if Modello is not running since Modello includes a phone app
+        if (!aul_app_is_running(MODELLO_APP_ID)) {
+            LoggerD("Modello is not running");
+            if (aul_open_app(DIALER_APP_ID) < 0)
+                LoggerD("Failed to launch dialer");
+        }
     }
 
     GVariant *props[8];