#include <notification.h>
#include <efl_extension.h>
#include <device/power.h>
-#include <gesture_recognition.h>
#include <bundle.h>
#ifdef TIZEN_REDWOOD
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");
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);
_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);
__bt_ug_release_memory(ugd);
-#ifndef __TIZEN_OPEN__
- if (ugd->handle) {
- gesture_release(ugd->handle);
- ugd->handle = NULL;
- }
-#endif
FN_END;
}