Remove the unused gesture feature 71/315371/1 accepted/tizen_9.0_unified accepted/tizen_unified accepted/tizen_unified_dev accepted/tizen_unified_toolchain accepted/tizen_unified_x accepted/tizen_unified_x_asan tizen tizen_9.0 accepted/tizen/9.0/unified/20241030.234018 accepted/tizen/unified/20240807.200957 accepted/tizen/unified/dev/20240809.091457 accepted/tizen/unified/toolchain/20240812.133209 accepted/tizen/unified/x/20240808.012316 accepted/tizen/unified/x/asan/20240813.231524 tizen_9.0_m2_release
authorWootak Jung <wootak.jung@samsung.com>
Thu, 25 Jul 2024 09:12:30 +0000 (18:12 +0900)
committerWootak Jung <wootak.jung@samsung.com>
Wed, 31 Jul 2024 03:32:25 +0000 (12:32 +0900)
Change-Id: I9ffe8af459a069a7f20f50b2f5f96c69fdc98bf1
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
standard/bt-main-ug.c

index 996e037..da6f258 100644 (file)
@@ -30,7 +30,6 @@
 #include <notification.h>
 #include <efl_extension.h>
 #include <device/power.h>
 #include <notification.h>
 #include <efl_extension.h>
 #include <device/power.h>
-#include <gesture_recognition.h>
 #include <bundle.h>
 
 #ifdef TIZEN_REDWOOD
 #include <bundle.h>
 
 #ifdef TIZEN_REDWOOD
@@ -200,43 +199,6 @@ static void __bt_ug_release_memory(bt_ug_data *ugd)
        FN_END;
 }
 
        FN_END;
 }
 
-#ifndef __TIZEN_OPEN__
-void __bt_motion_shake_cb(gesture_type_e motion,
-                                       const gesture_data_h event_data,
-                                       double timestamp,
-                                       gesture_error_e error,
-                                       void *data)
-{
-       FN_START;
-
-       bt_ug_data *ugd = NULL;
-       gesture_event_e event;
-       int ret = 0;
-
-       ret_if(data == NULL);
-       ret_if(event_data == NULL);
-       ret_if(error != GESTURE_ERROR_NONE);
-
-       ugd = (bt_ug_data *)data;
-
-       if (motion == GESTURE_SHAKE) {
-               ret = gesture_get_event(data, &event);
-               ret_if(ret != GESTURE_ERROR_NONE);
-
-               if (event == GESTURE_SHAKE_DETECTED) {
-                       BT_DBG("Scan devices");
-                       ret = power_wakeup(0);
-                       if (ret != 0)
-                               BT_ERR("Power wakeup failed [%d]", ret);
-
-                       _bt_main_scan_device(ugd);
-               }
-       }
-
-       FN_END;
-}
-#endif
-
 static void __bt_main_vconf_change_cb(keynode_t *key, void *data)
 {
        retm_if(NULL == key, "key is NULL");
 static void __bt_main_vconf_change_cb(keynode_t *key, void *data)
 {
        retm_if(NULL == key, "key is NULL");
@@ -636,10 +598,8 @@ static void *__on_create(ui_gadget_h ug, enum ug_mode mode, app_control_h servic
        FN_START;
 
        bt_ug_data *ugd = NULL;
        FN_START;
 
        bt_ug_data *ugd = NULL;
+       int ret;
        BT_DBG("UG_LAUNCH_PROFILING");
        BT_DBG("UG_LAUNCH_PROFILING");
-#ifndef __TIZEN_OPEN__
-       gesture_h handle;
-#endif
 
        retv_if(!ug || !priv, NULL);
 
 
        retv_if(!ug || !priv, NULL);
 
@@ -658,33 +618,6 @@ static void *__on_create(ui_gadget_h ug, enum ug_mode mode, app_control_h servic
        _bt_main_init_status(ugd, service);
        BT_DBG("ugd->bt_launch_mode : %d", ugd->bt_launch_mode);
 
        _bt_main_init_status(ugd, service);
        BT_DBG("ugd->bt_launch_mode : %d", ugd->bt_launch_mode);
 
-#ifndef __TIZEN_OPEN__
-       int ret;
-       bool supported = false;
-
-       ret = gesture_is_supported(GESTURE_SHAKE, &supported);
-       if (ret != GESTURE_ERROR_NONE) {
-               BT_ERR("gesture_is_supported failed : %d", ret);
-       } else  {
-               if (!supported) {
-                       BT_ERR("gesture is not supported");
-               } else {
-                       ret =  gesture_create(&handle);
-                       if (ret != GESTURE_ERROR_NONE) {
-                               BT_ERR("gesture_create failed : %d", ret);
-                       } else {
-                               ugd->handle = handle;
-                               ret = gesture_start_recognition(handle, GESTURE_SHAKE,
-                                       GESTURE_OPTION_DEFAULT, __bt_motion_shake_cb, ugd);
-                               if (ret != GESTURE_ERROR_NONE) {
-                                       BT_ERR("gesture_start_recognition failed : %d", ret);
-                                       gesture_release(handle);
-                                       ugd->handle = NULL;
-                               }
-                       }
-               }
-       }
-#endif
        ugd->service = service;
 
        ugd->base = _bt_main_base_layout_create(ugd->win_main, ugd);
        ugd->service = service;
 
        ugd->base = _bt_main_base_layout_create(ugd->win_main, ugd);
@@ -900,12 +833,6 @@ static void __on_destroy(ui_gadget_h ug, app_control_h service, void *priv)
 
        __bt_ug_release_memory(ugd);
 
 
        __bt_ug_release_memory(ugd);
 
-#ifndef __TIZEN_OPEN__
-       if (ugd->handle) {
-               gesture_release(ugd->handle);
-               ugd->handle = NULL;
-       }
-#endif
        FN_END;
 }
 
        FN_END;
 }