#define CALLUI_CSTM_I18N_UDATE_IGNORE -2 /* Used temporarily since there is no substitute of UDATE_IGNORE in base-utils */
#define CALLUI_TIME_STRING_BUFF_SIZE 512
+#define CALLUI_PAUSE_LOCK_TIMEOUT_LIMIT 0.35
#define CALLUI_TIME_FORMAT_12 "hm"
#define CALLUI_TIME_FORMAT_24 "Hm"
static bool __bt_device_connected_profile(bt_profile_e profile, void *user_data);
static bool __bt_adapter_bonded_device_cb(bt_device_info_s *device_info, void *user_data);
static void __reset_visibility_properties(callui_app_data_t *ad);
-static void __lock_state_cb (system_settings_key_e key, void *user_data);
+static void __lock_state_changed_cb (system_settings_key_e key, void *user_data);
static const char *__get_res_path();
static const char *__get_resource(const char *res_name);
static char *__vconf_get_str(const char *in_key);
static bool __check_date_on_yesterday(const time_t req_time);
static void __generate_best_pattern(i18n_udatepg_h pattern_generator, const char *locale, i18n_uchar *skeleton, char *formatted_string, time_t *time);
static char *__get_date_text(i18n_udatepg_h pattern_generator, const char *locale, char *skeleton, time_t *time);
+static void __app_launch_reply_cb(app_control_h request, app_control_h reply, app_control_result_e result, void *user_data);
+static void __update_params_according_lockstate(callui_app_data_t *ad);
Eina_Bool _callui_common_is_earjack_connected(void)
{
return ret_val;
}
-int _callui_common_unlock_swipe_lock(void)
+void _callui_common_unlock_swipe_lock(void)
{
int res = vconf_set_int(VCONFKEY_IDLE_LOCK_STATE, VCONFKEY_IDLE_UNLOCK);
if (res != 0) {
err("Set flag IDLE_UNLOCK failed");
}
- return 0;
}
static void __reset_visibility_properties(callui_app_data_t *ad)
{
- _callui_lock_manager_stop(ad->lock_handle);
- ad->start_lock_manager_on_resume = true;
+ if (_callui_lock_manager_is_started(ad->lock_handle)) {
+ _callui_lock_manager_stop(ad->lock_handle);
+ ad->start_lock_manager_on_resume = true;
+ }
+}
+
+static void __update_params_according_lockstate(callui_app_data_t *ad)
+{
+ callui_idle_lock_type_t type = _callui_common_get_idle_lock_type();
+ if (type == CALLUI_LOCK_TYPE_SECURITY_LOCK) {
+ _callui_window_set_above_lockscreen_mode(ad->window, false);
+ }
+ _callui_common_unlock_swipe_lock();
+}
- _callui_window_set_top_level_priority(ad->window, false);
+static void __app_launch_reply_cb(app_control_h request, app_control_h reply, app_control_result_e result, void *user_data)
+{
+ CALLUI_RETURN_IF_FAIL(user_data);
+ callui_app_data_t *ad = user_data;
+
+ if (result == APP_CONTROL_RESULT_APP_STARTED) {
+ ad->on_background = true;
+ __update_params_according_lockstate(ad);
+ } else if (result == APP_CONTROL_RESULT_FAILED) {
+ if (ad->start_lock_manager_on_resume) {
+ _callui_lock_manager_start(ad->lock_handle);
+ ad->start_lock_manager_on_resume = false;
+ }
+ }
}
void _callui_common_launch_setting_bluetooth(void *appdata)
err("app_control_set_app_id() is failed. ret[%d]", ret);
} else if ((ret = app_control_set_operation(app_control, APP_CONTROL_OPERATION_PICK)) != APP_CONTROL_ERROR_NONE) {
err("app_control_set_operation() is failed. ret[%d]", ret);
- } else if ((ret = app_control_send_launch_request(app_control, NULL, NULL)) != APP_CONTROL_ERROR_NONE) {
+ } else if ((ret = app_control_enable_app_started_result_event(app_control)) != APP_CONTROL_ERROR_NONE) {
+ err("app_control_enable_app_started_result_event() is failed. ret[%d]", ret);
+ } else if ((ret = app_control_send_launch_request(app_control, __app_launch_reply_cb, ad)) != APP_CONTROL_ERROR_NONE) {
err("app_control_send_launch_request() is failed. ret[%d]", ret);
} else {
__reset_visibility_properties(ad);
err("app_control_set_uri() is failed. ret[%d]", ret);
} else if ((ret = app_control_add_extra_data(app_control, CALLUI_PHONE_LAUNCH_TYPE_PARAM_NAME, CALLUI_PHONE_LAUNCH_TYPE_VALUE)) != APP_CONTROL_ERROR_NONE) {
err("app_control_add_extra_data() is failed. ret[%d]", ret);
- } else if ((ret = app_control_send_launch_request(app_control, NULL, NULL)) != APP_CONTROL_ERROR_NONE) {
+ } else if ((ret = app_control_enable_app_started_result_event(app_control)) != APP_CONTROL_ERROR_NONE) {
+ err("app_control_enable_app_started_result_event() is failed. ret[%d]", ret);
+ } else if ((ret = app_control_send_launch_request(app_control, __app_launch_reply_cb, ad)) != APP_CONTROL_ERROR_NONE) {
err("app_control_send_launch_request() is failed. ret[%d]", ret);
} else {
__reset_visibility_properties(ad);
}
- if (app_control){
+ if (app_control) {
app_control_destroy(app_control);
}
}
err("app_control_set_app_id() is failed. ret[%d]", ret);
} else if ((ret = app_control_set_operation(app_control, APP_CONTROL_OPERATION_DEFAULT)) != APP_CONTROL_ERROR_NONE) {
err("app_control_set_operation() is failed. ret[%d]", ret);
- } else if ((ret = app_control_send_launch_request(app_control, NULL, NULL)) != APP_CONTROL_ERROR_NONE) {
+ } else if ((ret = app_control_enable_app_started_result_event(app_control)) != APP_CONTROL_ERROR_NONE) {
+ err("app_control_enable_app_started_result_event() is failed. ret[%d]", ret);
+ } else if ((ret = app_control_send_launch_request(app_control, __app_launch_reply_cb, ad)) != APP_CONTROL_ERROR_NONE) {
err("app_control_send_launch_request() is failed. ret[%d]", ret);
} else {
__reset_visibility_properties(ad);
return powerkey_mode;
}
-static void __lock_state_cb (system_settings_key_e key, void *user_data)
+static void __lock_state_changed_cb(system_settings_key_e key, void *user_data)
{
- callui_app_data_t *ad = _callui_get_app_data();
+ CALLUI_RETURN_IF_FAIL(user_data);
+
+ callui_app_data_t *ad = user_data;
+
if (_callui_common_get_idle_lock_type() == CALLUI_LOCK_TYPE_UNLOCK) {
- _callui_window_set_top_level_priority(ad->window, false);
+ dbg("Device lock state [UNLOCKED]");
+ _callui_window_set_above_lockscreen_mode(ad->window, false);
+ if (ad->need_win_minimize) {
+ ad->need_win_minimize = false;
+ _callui_window_minimize(ad->window);
+ }
} else {
- _callui_window_set_top_level_priority(ad->window, true);
+ dbg("Device lock state [LOCKED]");
+ if (!ad->on_background) {
+ _callui_window_set_above_lockscreen_mode(ad->window, true);
+ } else {
+ double time_diff = ecore_time_get() - ad->app_pause_time;
+ if (time_diff <= CALLUI_PAUSE_LOCK_TIMEOUT_LIMIT) {
+ dbg("App_pause -> lock_device time diff [%ld]", time_diff);
+ _callui_window_set_above_lockscreen_mode(ad->window, true);
+ ad->app_pause_time = 0.0;
+ }
+ if (_callui_lock_manager_is_started(ad->lock_handle)) {
+ _callui_lock_manager_stop(ad->lock_handle);
+ ad->start_lock_manager_on_resume = true;
+ }
+ }
}
}
void _callui_common_set_lock_state_changed_cb(void *user_data)
{
- system_settings_set_changed_cb(SYSTEM_SETTINGS_KEY_LOCK_STATE, __lock_state_cb, NULL);
+ CALLUI_RETURN_IF_FAIL(user_data);
+
+ system_settings_set_changed_cb(SYSTEM_SETTINGS_KEY_LOCK_STATE, __lock_state_changed_cb, user_data);
}
void _callui_common_unset_lock_state_changed_cb()
static void __add_ecore_event_key_handlers(callui_app_data_t *ad);
static void __remove_ecore_event_key_handlers(callui_app_data_t *ad);
static void __set_main_win_key_grab(callui_app_data_t *ad);
+static void __set_main_power_key_grab(callui_app_data_t *ad);
+static void __powerkey_mode_changed_cb(keynode_t *node, void *user_data);
static void __unset_main_win_key_grab(callui_app_data_t *ad);
static void __set_text_classes_params();
+static void __process_power_key_up(callui_app_data_t *ad);
+static void __process_home_key_up(callui_app_data_t *ad);
+
static callui_app_data_t g_ad;
-static void __set_main_win_key_grab(callui_app_data_t *ad)
+static void __set_main_power_key_grab(callui_app_data_t *ad)
{
- int res = _callui_window_set_keygrab_mode(ad->window, CALLUI_KEY_MEDIA, CALLUI_WIN_KEYGRAB_EXCLUSIVE);
- if (res != CALLUI_RESULT_OK) {
- dbg("KEY_MEDIA key grab failed");
- }
+ callui_result_e res = CALLUI_RESULT_FAIL;
+ _callui_window_unset_keygrab_mode(ad->window, CALLUI_KEY_POWER);
if (_callui_common_is_powerkey_mode_on()) {
res = _callui_window_set_keygrab_mode(ad->window, CALLUI_KEY_POWER, CALLUI_WIN_KEYGRAB_EXCLUSIVE);
} else {
res = _callui_window_set_keygrab_mode(ad->window, CALLUI_KEY_POWER, CALLUI_WIN_KEYGRAB_SHARED);
}
+
if (res != CALLUI_RESULT_OK) {
dbg("KEY_POWER key grab failed");
}
}
+static void __powerkey_mode_changed_cb(keynode_t *node, void *user_data)
+{
+ __set_main_power_key_grab(user_data);
+}
+
+static void __set_main_win_key_grab(callui_app_data_t *ad)
+{
+ int res = _callui_window_set_keygrab_mode(ad->window, CALLUI_KEY_MEDIA, CALLUI_WIN_KEYGRAB_EXCLUSIVE);
+ if (res != CALLUI_RESULT_OK) {
+ dbg("KEY_MEDIA key grab failed");
+ }
+
+ __set_main_power_key_grab(ad);
+
+ vconf_notify_key_changed(VCONFKEY_CISSAPPL_POWER_KEY_ENDS_CALL_BOOL, __powerkey_mode_changed_cb, ad);
+}
+
static void __unset_main_win_key_grab(callui_app_data_t *ad)
{
_callui_window_unset_keygrab_mode(ad->window, CALLUI_KEY_SELECT);
_callui_window_unset_keygrab_mode(ad->window, CALLUI_KEY_POWER);
_callui_window_unset_keygrab_mode(ad->window, CALLUI_KEY_MEDIA);
+
+ vconf_ignore_key_changed(VCONFKEY_CISSAPPL_POWER_KEY_ENDS_CALL_BOOL, __powerkey_mode_changed_cb);
}
static void __add_ecore_event_key_handlers(callui_app_data_t *ad)
__set_text_classes_params();
+ _callui_common_set_lock_state_changed_cb(ad);
+
return true;
}
{
debug_enter();
+ _callui_common_unset_lock_state_changed_cb();
+
_callui_stp_remove_call_state_event_cb(ad->state_provider, __call_state_change_cb, ad);
_callui_sdm_remove_audio_state_changed_cb(ad->sound_manager, __audio_state_changed_cb, ad);
{
debug_enter();
- _callui_common_unset_lock_state_changed_cb();
-
callui_app_data_t *ad = data;
+ if (_callui_lock_manager_is_started(ad->lock_handle)) {
+ _callui_lock_manager_stop(ad->lock_handle);
+ ad->start_lock_manager_on_resume = true;
+ }
+
_callui_vm_pause(ad->view_manager);
- debug_leave();
+ if (_callui_common_get_idle_lock_type() == CALLUI_LOCK_TYPE_UNLOCK) {
+ dbg("Device is unlocked");
+ ad->on_background = true;
+ _callui_window_set_above_lockscreen_mode(ad->window, false);
+ ad->app_pause_time = ecore_time_get();
+ }
}
static void __app_resume(void *data)
callui_app_data_t *ad = data;
- _callui_common_set_lock_state_changed_cb();
+ ad->on_background = false;
if (ad->start_lock_manager_on_resume) {
ad->start_lock_manager_on_resume = false;
}
_callui_vm_resume(ad->view_manager);
-
- debug_leave();
}
static void __app_service(app_control_h app_control, void *data)
if (CALLUI_RESULT_OK != ret) {
err("_callui_manager_reject_call() failed. ret[%d]", ret);
}
+ } else if (strcmp(operation, CALLUI_APP_CONTROL_OPERATION_LS_RESUME) == 0) {
+ _callui_window_activate(ad->window);
+ _callui_window_set_above_lockscreen_mode(ad->window, true);
}
free(operation);
free(uri_bundle);
}
-static Eina_Bool __hard_key_up_cb(void *data, int type, void *event)
+static void __process_power_key_up(callui_app_data_t *ad)
{
debug_enter();
- CALLUI_RETURN_VALUE_IF_FAIL(data, EINA_FALSE);
- CALLUI_RETURN_VALUE_IF_FAIL(event, EINA_FALSE);
-
- callui_app_data_t *ad = data;
- Ecore_Event_Key *ev = event;
-
callui_view_type_e view_type = _callui_vm_get_cur_view_type(ad->view_manager);
- const callui_call_data_t *incom = _callui_stp_get_call_data(ad->state_provider,
- CALLUI_CALL_DATA_INCOMING);
const callui_call_data_t *active = _callui_stp_get_call_data(ad->state_provider,
CALLUI_CALL_DATA_ACTIVE);
- const callui_call_data_t *held = _callui_stp_get_call_data(ad->state_provider,
- CALLUI_CALL_DATA_HELD);
- /* power key case */
- if (!strcmp(ev->keyname, CALLUI_KEY_POWER)) {
- dbg("in keypower");
- int is_powerkey_enabled = _callui_common_is_powerkey_mode_on();
- dbg("[KEY]KEY_POWER pressed, is_powerkey_enabled(%d)", is_powerkey_enabled);
-
- if (is_powerkey_enabled && _callui_display_is_turned_on(ad->display)) {
- if (view_type == CALLUI_VIEW_DIALLING) {
- if (active) {
- _callui_manager_end_call(ad->call_manager, active->call_id,
- CALLUI_CALL_RELEASE_BY_CALL_HANDLE);
+ int is_powerkey_enabled = _callui_common_is_powerkey_mode_on();
+ dbg("[KEY]KEY_POWER pressed, is_powerkey_enabled(%d)", is_powerkey_enabled);
+
+ if (is_powerkey_enabled && _callui_display_is_turned_on(ad->display)) {
+ if (view_type == CALLUI_VIEW_DIALLING) {
+ if (active) {
+ _callui_manager_end_call(ad->call_manager, active->call_id,
+ CALLUI_CALL_RELEASE_BY_CALL_HANDLE);
+ }
+ } else if (view_type == CALLUI_VIEW_SINGLECALL ||
+ view_type == CALLUI_VIEW_MULTICALL_CONF) {
+ _callui_manager_end_call(ad->call_manager, 0, CALLUI_CALL_RELEASE_ALL);
+ } else if (view_type == CALLUI_VIEW_MULTICALL_SPLIT ||
+ view_type == CALLUI_VIEW_MULTICALL_LIST) {
+ _callui_manager_end_call(ad->call_manager, 0, CALLUI_CALL_RELEASE_ALL_ACTIVE);
+ } else if (view_type == CALLUI_VIEW_INCOMING_CALL_NOTI) {
+ _callui_vm_change_view(ad->view_manager, CALLUI_VIEW_INCOMING_CALL);
+ }
+ } else {
+ const callui_call_data_t *incom = _callui_stp_get_call_data(ad->state_provider,
+ CALLUI_CALL_DATA_INCOMING);
+ const callui_call_data_t *held = _callui_stp_get_call_data(ad->state_provider,
+ CALLUI_CALL_DATA_HELD);
+
+ if (incom && !active && !held) {
+ callui_view_type_e type = CALLUI_VIEW_INCOMING_CALL;
+ callui_view_type_e cur_type = _callui_vm_get_cur_view_type(ad->view_manager);
+ if (_callui_common_get_idle_lock_type() == CALLUI_LOCK_TYPE_UNLOCK &&
+ (cur_type == CALLUI_VIEW_UNDEFINED || cur_type == CALLUI_VIEW_ENDCALL)) {
+ type = CALLUI_VIEW_INCOMING_CALL_NOTI;
+ }
+ _callui_vm_change_view(ad->view_manager, type);
+ }
+ }
+
+ debug_leave();
+}
+
+static void __process_home_key_up(callui_app_data_t *ad)
+{
+ debug_enter();
+
+ if (_callui_window_unset_keygrab_mode(ad->window, CALLUI_KEY_SELECT) != CALLUI_RESULT_OK) {
+ dbg("KEY_SELECT key ungrab failed");
+ }
+
+ callui_view_type_e view_type = _callui_vm_get_cur_view_type(ad->view_manager);
+
+ if (view_type == CALLUI_VIEW_INCOMING_CALL || view_type == CALLUI_VIEW_INCOMING_CALL_NOTI) {
+
+ if (_callui_common_is_answering_mode_on()) {
+ dbg("Answering mode on and Home key pressed on MT screen");
+
+ const callui_call_data_t *active = _callui_stp_get_call_data(ad->state_provider, CALLUI_CALL_DATA_ACTIVE);
+ int unhold_call_count = 0;
+ if (active) {
+ unhold_call_count = active->conf_member_count;
+ }
+
+ if (unhold_call_count == 0) {
+ dbg("No Call Or Held call - Accept");
+ _callui_manager_answer_call(ad->call_manager, CALLUI_CALL_ANSWER_NORMAL);
+
+ if (_callui_common_get_idle_lock_type() == CALLUI_LOCK_TYPE_SWIPE_LOCK) {
+ _callui_common_unlock_swipe_lock();
}
- } else if (view_type == CALLUI_VIEW_SINGLECALL ||
- view_type == CALLUI_VIEW_MULTICALL_CONF) {
- _callui_manager_end_call(ad->call_manager, 0, CALLUI_CALL_RELEASE_ALL);
- } else if (view_type == CALLUI_VIEW_MULTICALL_SPLIT ||
- view_type == CALLUI_VIEW_MULTICALL_LIST) {
- _callui_manager_end_call(ad->call_manager, 0, CALLUI_CALL_RELEASE_ALL_ACTIVE);
- } else if (view_type == CALLUI_VIEW_INCOMING_CALL_NOTI) {
- _callui_vm_change_view(ad->view_manager, CALLUI_VIEW_INCOMING_CALL);
+ } else if (ad->second_call_popup == NULL) {
+ dbg("Show popup - 2nd MT call - test volume popup");
+ _callui_load_second_call_popup(ad);
}
} else {
- if (incom && !active && !held) {
- callui_view_type_e type = CALLUI_VIEW_INCOMING_CALL;
- callui_view_type_e cur_type = _callui_vm_get_cur_view_type(ad->view_manager);
- if (_callui_common_get_idle_lock_type() == CALLUI_LOCK_TYPE_UNLOCK &&
- (cur_type == CALLUI_VIEW_UNDEFINED || cur_type == CALLUI_VIEW_ENDCALL)) {
- type = CALLUI_VIEW_INCOMING_CALL_NOTI;
- }
- _callui_vm_change_view(ad->view_manager, type);
+ if (_callui_window_set_keygrab_mode(ad->window,
+ CALLUI_KEY_SELECT, CALLUI_WIN_KEYGRAB_TOPMOST) != CALLUI_RESULT_OK) {
+ dbg("KEY_SELECT key ungrab failed");
}
}
- } else if (!strcmp(ev->keyname, CALLUI_KEY_MEDIA)) {
- /* todo*/
- dbg("in key-media");
- } else if (!strcmp(ev->keyname, CALLUI_KEY_VOLUMEUP) || !strcmp(ev->keyname, CALLUI_KEY_VOLUMEDOWN)) {
- dbg("Handle Volume Up or Down key");
- if (incom) {
- _callui_manager_stop_alert(ad->call_manager);
+ } else {
+ if (ad->on_background) {
+ return;
}
- } else if (!strcmp(ev->keyname, CALLUI_KEY_SELECT) || !strcmp(ev->keyname, CALLUI_KEY_HOME)) {
- dbg("in KEY_SELECT");
- if (_callui_window_unset_keygrab_mode(ad->window, CALLUI_KEY_SELECT) != CALLUI_RESULT_OK) {
- dbg("KEY_SELECT key ungrab failed");
+ callui_idle_lock_type_t lock_type = _callui_common_get_idle_lock_type();
+ if (lock_type == CALLUI_LOCK_TYPE_SECURITY_LOCK) {
+ _callui_common_unlock_swipe_lock();
+ _callui_window_set_above_lockscreen_mode(ad->window, false);
+ _callui_window_minimize(ad->window);
+ } else if (lock_type == CALLUI_LOCK_TYPE_SWIPE_LOCK) {
+ ad->need_win_minimize = true;
+ _callui_common_unlock_swipe_lock();
+ } else {
+ _callui_window_minimize(ad->window);
}
+ }
- if (view_type == CALLUI_VIEW_INCOMING_CALL ||
- view_type == CALLUI_VIEW_INCOMING_CALL_NOTI) {
+ debug_leave();
+}
- if (_callui_common_is_answering_mode_on()) {
- dbg("Answering mode on and Home key pressed on MT screen");
+static Eina_Bool __hard_key_up_cb(void *data, int type, void *event)
+{
+ debug_enter();
- int unhold_call_count = 0;
- if (active) {
- unhold_call_count = active->conf_member_count;
- }
+ CALLUI_RETURN_VALUE_IF_FAIL(data, EINA_FALSE);
+ CALLUI_RETURN_VALUE_IF_FAIL(event, EINA_FALSE);
- if (unhold_call_count == 0) {
- dbg("No Call Or Held call - Accept");
+ callui_app_data_t *ad = data;
+ Ecore_Event_Key *ev = event;
- _callui_manager_answer_call(ad->call_manager, CALLUI_CALL_ANSWER_NORMAL);
+ /* power key case */
+ if (!strcmp(ev->keyname, CALLUI_KEY_POWER)) {
+ dbg("KEY_POWER");
+ __process_power_key_up(ad);
+ } else if (!strcmp(ev->keyname, CALLUI_KEY_VOLUMEUP) || !strcmp(ev->keyname, CALLUI_KEY_VOLUMEDOWN)) {
+ dbg("KEY_VOLUMEUP or KEY_VOLUMEDOWN");
- if (_callui_common_get_idle_lock_type() == CALLUI_LOCK_TYPE_SWIPE_LOCK) {
- _callui_common_unlock_swipe_lock();
- }
- } else if (ad->second_call_popup == NULL) {
- dbg("Show popup - 2nd MT call - test volume popup");
- _callui_load_second_call_popup(ad);
- }
- } else {
- if (_callui_window_set_keygrab_mode(ad->window,
- CALLUI_KEY_SELECT, CALLUI_WIN_KEYGRAB_TOPMOST) != CALLUI_RESULT_OK) {
- dbg("KEY_SELECT key ungrab failed");
- }
- }
- } else {
- // TODO Implement other way to verify focus window == current
- //Ecore_X_Window focus_win = ecore_x_window_focus_get();
- //if (ad->win != NULL && focus_win == elm_win_xwindow_get(ad->win)) {
- /* ToDo: Use lock-screen interface to raise the home screen */
- _callui_window_set_top_level_priority(ad->window, false);
- _callui_lock_manager_stop(ad->lock_handle);
- ad->on_background = true;
- //}
+ if (_callui_stp_get_call_data(ad->state_provider, CALLUI_CALL_DATA_INCOMING)) {
+ _callui_manager_stop_alert(ad->call_manager);
}
- } else if (!strcmp(ev->keyname, CALLUI_KEY_BACK)) {
- /* todo*/
- dbg("KEY_BACK section");
+ } else if (!strcmp(ev->keyname, CALLUI_KEY_SELECT) || !strcmp(ev->keyname, CALLUI_KEY_HOME)) {
+ dbg("KEY_SELECT or KEY_HOME");
+ __process_home_key_up(ad);
}
DELETE_ECORE_TIMER(ad->earset_key_longpress_timer);
}
if (!strcmp(ev->keyname, CALLUI_KEY_MEDIA)) {
+ DELETE_ECORE_TIMER(ad->earset_key_longpress_timer);
ad->earset_key_longpress_timer = ecore_timer_add(CALLUI_EARSET_KEY_LONG_PRESS_TIMEOUT,
__earset_key_longpress_timer_cb, ad);
} else if (!strcmp(ev->keyname, CALLUI_KEY_SELECT)) {