Removing gesture API 86/315186/2 tizen
authorPriya Kohli <priya.kohli@samsung.com>
Fri, 26 Jul 2024 07:40:26 +0000 (13:10 +0530)
committerPriya Kohli <priya.kohli@samsung.com>
Fri, 26 Jul 2024 09:55:32 +0000 (15:25 +0530)
Change-Id: Icaab1916be4deabfd19e75ff05dcc7815e122b42
Signed-off-by: Priya Kohli <priya.kohli@samsung.com>
externals/CMakeLists.txt
externals/MsgSensorWrapper.cpp
packaging/msg-service.spec

index cedc0fd..8227b48 100755 (executable)
@@ -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}")
index 2daa1ba..d0c8562 100755 (executable)
 #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;
index 077f0ef..9899fd2 100755 (executable)
@@ -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)