summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPriya Kohli <priya.kohli@samsung.com>2024-07-26 13:10:26 +0530
committerPriya Kohli <priya.kohli@samsung.com>2024-07-26 15:25:32 +0530
commit480cbf533079ed1856221f762d928338ff9848e6 (patch)
tree08a67c79d76670a23b7655eda0a6eba79b578d15
parentd90e07f88afe1a06ec5ddcab6f7b1e4f94ba2813 (diff)
downloadmsg-service-accepted/tizen_unified_dev.tar.gz
msg-service-accepted/tizen_unified_dev.tar.bz2
msg-service-accepted/tizen_unified_dev.zip
Change-Id: Icaab1916be4deabfd19e75ff05dcc7815e122b42 Signed-off-by: Priya Kohli <priya.kohli@samsung.com>
-rwxr-xr-xexternals/CMakeLists.txt2
-rwxr-xr-xexternals/MsgSensorWrapper.cpp77
-rwxr-xr-xpackaging/msg-service.spec1
3 files changed, 1 insertions, 79 deletions
diff --git a/externals/CMakeLists.txt b/externals/CMakeLists.txt
index cedc0fd..8227b48 100755
--- a/externals/CMakeLists.txt
+++ b/externals/CMakeLists.txt
@@ -31,7 +31,7 @@ INCLUDE_DIRECTORIES(
)
INCLUDE(FindPkgConfig)
-pkg_check_modules(externals_pkgs REQUIRED glib-2.0 alarm-service lbs-dbus capi-system-device motion phonenumber-utils)
+pkg_check_modules(externals_pkgs REQUIRED glib-2.0 alarm-service lbs-dbus capi-system-device vconf phonenumber-utils)
FOREACH(flag ${externals_pkgs_CFLAGS})
SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
diff --git a/externals/MsgSensorWrapper.cpp b/externals/MsgSensorWrapper.cpp
index 2daa1ba..d0c8562 100755
--- a/externals/MsgSensorWrapper.cpp
+++ b/externals/MsgSensorWrapper.cpp
@@ -22,14 +22,11 @@
#include "MsgNotificationWrapper.h"
#ifndef MSG_WEARABLE_PROFILE
-#include <gesture_recognition.h>
/*==================================================================================================
VARIABLES
==================================================================================================*/
-gesture_h gestureHandler = NULL;
-
msg_sensor_cb SensorCBFunction = NULL;
#endif /* MSG_WEARABLE_PROFILE */
@@ -39,36 +36,6 @@ msg_sensor_cb SensorCBFunction = NULL;
==================================================================================================*/
#ifndef MSG_WEARABLE_PROFILE
-void MsgGestureCB(gesture_type_e gesture, const gesture_data_h data, double timestamp, gesture_error_e error, void *user_data)
-{
- if (error != GESTURE_ERROR_NONE) {
- MSG_DEBUG("Gesture error = [%d]", error);
- return;
- }
-
- gesture_event_e event;
- int ret = gesture_get_event(data, &event);
- if (ret == GESTURE_ERROR_NONE && event == GESTURE_EVENT_DETECTED && \
- gesture == GESTURE_TURN_FACE_DOWN) {
- MSG_DEBUG("GESTURE_TURN_FACE_DOWN gesture detected.");
- int motion_activation = 0;
- int use_turn_over = 0;
-
- if (MsgSettingGetInt(VCONFKEY_SETAPPL_MOTION_ACTIVATION, &motion_activation) != MSG_SUCCESS) {
- MSG_INFO("MsgSettingGetInt() is failed");
- }
-
- if (MsgSettingGetInt(VCONFKEY_SETAPPL_USE_TURN_OVER, &use_turn_over) != MSG_SUCCESS) {
- MSG_INFO("MsgSettingGetInt() is failed");
- }
-
- if (motion_activation && use_turn_over) {
- if (SensorCBFunction)
- SensorCBFunction();
- }
- }
-}
-
void MsgSensorCBStop()
{
MSG_BEGIN();
@@ -101,25 +68,6 @@ void MsgInitSensor()
msg_error_t MsgSensorConnect()
{
-#ifndef MSG_WEARABLE_PROFILE
- bool supported = false;
- int ret = gesture_is_supported(GESTURE_TURN_FACE_DOWN, &supported);
- if (ret != GESTURE_ERROR_NONE) {
- MSG_DEBUG("gesture_is_supported is failed [%d]", ret);
- return MSG_ERR_UNKNOWN;
- }
- if (!supported) {
- MSG_DEBUG("GESTURE_TURN_FACE_DOWN not supported in the current device.");
- return MSG_ERR_UNKNOWN;
- }
-
- ret = gesture_create(&gestureHandler);
- if (ret != GESTURE_ERROR_NONE) {
- MSG_DEBUG("gesture_create is failed [%d]", ret);
- return MSG_ERR_UNKNOWN;
- }
-#endif /* MSG_WEARABLE_PROFILE */
-
return MSG_SUCCESS;
}
@@ -129,19 +77,6 @@ void MsgSensorDisconnect()
#ifndef MSG_WEARABLE_PROFILE
if (SensorCBFunction != NULL)
SensorCBFunction = NULL;
-
- if (gestureHandler == NULL)
- return;
-
- try {
- if(gesture_stop_recognition(gestureHandler)!= GESTURE_ERROR_NONE)
- MSG_DEBUG("gesture_stop_recognition failed");
- } catch(int exception) {
- MSG_FATAL("gesture_stop_recognition error [%d]", exception);
- }
-
- gesture_release(gestureHandler);
- gestureHandler = NULL;
#endif /* MSG_WEARABLE_PROFILE */
}
@@ -149,11 +84,6 @@ void MsgSensorDisconnect()
msg_error_t MsgRegSensorCB(msg_sensor_cb cb)
{
#ifndef MSG_WEARABLE_PROFILE
- if (gestureHandler == NULL) {
- MSG_DEBUG("Not connected to gesture FW.");
- return MSG_ERR_UNKNOWN;
- }
-
if (cb != NULL) {
/* regist cb. */
SensorCBFunction = cb;
@@ -161,13 +91,6 @@ msg_error_t MsgRegSensorCB(msg_sensor_cb cb)
MSG_DEBUG("cb is NULL.");
return MSG_ERR_UNKNOWN;
}
-
- int ret = gesture_start_recognition(gestureHandler, GESTURE_TURN_FACE_DOWN, \
- GESTURE_OPTION_DEFAULT, MsgGestureCB, NULL);
- if (ret != GESTURE_ERROR_NONE) {
- MSG_DEBUG("gesture_start_recognition failed");
- return MSG_ERR_UNKNOWN;
- }
#endif /* MSG_WEARABLE_PROFILE */
return MSG_SUCCESS;
diff --git a/packaging/msg-service.spec b/packaging/msg-service.spec
index 077f0ef..9899fd2 100755
--- a/packaging/msg-service.spec
+++ b/packaging/msg-service.spec
@@ -47,7 +47,6 @@ BuildRequires: pkgconfig(libsystemd)
BuildRequires: pkgconfig(libtzplatform-config)
BuildRequires: pkgconfig(libxml-2.0)
BuildRequires: pkgconfig(libwbxml2)
-BuildRequires: pkgconfig(motion)
BuildRequires: pkgconfig(phonenumber-utils)
BuildRequires: pkgconfig(sqlite3)
BuildRequires: pkgconfig(tapi)