From 4c0f90e3ffde8bed715144d3bfa8a011f04f734a Mon Sep 17 00:00:00 2001 From: Wootak Jung Date: Thu, 25 Jul 2024 18:12:30 +0900 Subject: [PATCH] Remove the unused gesture feature Change-Id: I9ffe8af459a069a7f20f50b2f5f96c69fdc98bf1 Signed-off-by: Wootak Jung --- standard/bt-main-ug.c | 75 +-------------------------------------------------- 1 file changed, 1 insertion(+), 74 deletions(-) diff --git a/standard/bt-main-ug.c b/standard/bt-main-ug.c index 996e037..da6f258 100644 --- a/standard/bt-main-ug.c +++ b/standard/bt-main-ug.c @@ -30,7 +30,6 @@ #include #include #include -#include #include #ifdef TIZEN_REDWOOD @@ -200,43 +199,6 @@ static void __bt_ug_release_memory(bt_ug_data *ugd) 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"); @@ -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; + int ret; BT_DBG("UG_LAUNCH_PROFILING"); -#ifndef __TIZEN_OPEN__ - gesture_h handle; -#endif 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); -#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); @@ -900,12 +833,6 @@ static void __on_destroy(ui_gadget_h ug, app_control_h service, void *priv) __bt_ug_release_memory(ugd); -#ifndef __TIZEN_OPEN__ - if (ugd->handle) { - gesture_release(ugd->handle); - ugd->handle = NULL; - } -#endif FN_END; } -- 2.7.4