From 480cbf533079ed1856221f762d928338ff9848e6 Mon Sep 17 00:00:00 2001 From: Priya Kohli Date: Fri, 26 Jul 2024 13:10:26 +0530 Subject: Removing gesture API Change-Id: Icaab1916be4deabfd19e75ff05dcc7815e122b42 Signed-off-by: Priya Kohli --- externals/CMakeLists.txt | 2 +- externals/MsgSensorWrapper.cpp | 77 ------------------------------------------ packaging/msg-service.spec | 1 - 3 files changed, 1 insertion(+), 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 /*================================================================================================== 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) -- cgit v1.2.3