*
* Copyright 2012 Samsung Electronics Co., Ltd
*
- * Licensed under the Flora License, Version 1.0 (the "License");
+ * Licensed under the Flora License, Version 1.1 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
{
struct ug_data *ugd = (struct ug_data *)data;
- if ((ugd == NULL) || (ugd->naviframe == NULL)) {
+ if ((ugd == NULL) || (ugd->naviframe == NULL))
return MOTION_TARGET_VIEW_FOCUS_OFF;
- }
- if (elm_object_focus_get(ugd->naviframe)) {
+ if (elm_object_focus_get(ugd->naviframe))
return MOTION_TARGET_VIEW_FOCUS_ON;
- } else {
+ else
return MOTION_TARGET_VIEW_FOCUS_OFF;
- }
}
gboolean motion_activated = FALSE;
struct ug_data *ugd = (struct ug_data *) data;
if (NULL == ugd) {
- DBG(LOG_ERROR,"NULL pointer!");
+ DBG(LOG_ERROR, "NULL pointer!");
return;
}
TARGET_VIEW_FOCUS focus_state = __motion_target_view_focus_get(ugd);
DBG(LOG_DEBUG, "event type: %d, focus state: %d\n", event_type, focus_state);
- if (focus_state != MOTION_TARGET_VIEW_FOCUS_ON) {
+ if (focus_state != MOTION_TARGET_VIEW_FOCUS_ON)
return;
- }
if (vconf_get_bool(VCONFKEY_SETAPPL_MOTION_ACTIVATION,
(void *)&motion_activated)) {
- DBG(LOG_ERROR,"Get motion activation status fail");
+ DBG(LOG_ERROR, "Get motion activation status fail");
return;
}
if (FALSE == motion_activated) {
- DBG(LOG_INFO,"Motion value is false");
+ DBG(LOG_INFO, "Motion value is false");
return;
}
}
if (FALSE == motion_activated) {
- DBG(LOG_INFO,"Shake status is false");
+ DBG(LOG_INFO, "Shake status is false");
return;
}
int ret = -1;
const char *btn_text = NULL;
- if (NULL == ugd) {
- DBG(LOG_ERROR, "Incorrect parameter(NULL)\n");
- return;
- }
-
wfd_refresh_wifi_direct_state(ugd);
if (NULL == ugd->scan_toolbar) {
goto fail;
}
- DBG(LOG_INFO, "Succesfully, Init Sensor Handle\n");
+ DBG(LOG_INFO, "Successfully, Init Sensor Handle\n");
return;
fail:
ret = sf_disconnect(motion_handle);
- if (ret < 0) {
+ if (ret < 0)
DBG(LOG_ERROR, "Failed Operation sf_disconnect. [%d]\n", ret);
- }
}
void motion_destroy(void)
}
ret = sf_stop(motion_handle);
- if (ret < 0) {
+ if (ret < 0)
DBG(LOG_ERROR, "Failed Operation sf_stop. [%d]\n", ret);
- }
+
ret = sf_unregister_event(motion_handle, MOTION_ENGINE_EVENT_SHAKE);
- if (ret < 0) {
+ if (ret < 0)
DBG(LOG_ERROR, "Failed Operation sf_unregister_event. [%d]\n", ret);
- }
+
ret = sf_disconnect(motion_handle);
- if (ret < 0) {
+ if (ret < 0)
DBG(LOG_ERROR, "Failed Operation sf_disconnect. [%d]\n", ret);
- }
}