string = _callmgr_popup_get_ss_info_string(type);
if (string) {
- _callmgr_popup_create_toast_msg(string);
+ _callmgr_popup_create_toast_msg(ad, string);
g_free(string);
string = NULL;
}
string = _callmgr_popup_get_call_err_string(type, ad->dial_num);
if (string) {
- _callmgr_popup_create_toast_msg(string);
+ _callmgr_popup_create_toast_msg(ad, string);
g_free(string);
string = NULL;
}
switch (rec_status_sub_info) {
case CALLMGR_POPUP_REC_STATUS_STOP_BY_NORMAL_E:
- _callmgr_popup_create_toast_msg(_("IDS_CALL_TPOP_RECORDING_SAVED_IN_VOICE_RECORDER"));
+ _callmgr_popup_create_toast_msg(ad, _("IDS_CALL_TPOP_RECORDING_SAVED_IN_VOICE_RECORDER"));
break;
case CALLMGR_POPUP_REC_STATUS_STOP_BY_MEMORY_FULL_E:
- _callmgr_popup_create_toast_msg(_("IDS_CALL_TPOP_RECORDING_SAVED_IN_VOICE_RECORDER_DEVICE_STORAGE_FULL"));
+ _callmgr_popup_create_toast_msg(ad, _("IDS_CALL_TPOP_RECORDING_SAVED_IN_VOICE_RECORDER_DEVICE_STORAGE_FULL"));
break;
case CALLMGR_POPUP_REC_STATUS_STOP_BY_TIME_SHORT_E:
- _callmgr_popup_create_toast_msg(_("IDS_VR_TPOP_UNABLE_TO_SAVE_RECORDING_RECORDING_TOO_SHORT"));
+ _callmgr_popup_create_toast_msg(ad, _("IDS_VR_TPOP_UNABLE_TO_SAVE_RECORDING_RECORDING_TOO_SHORT"));
break;
case CALLMGR_POPUP_REC_STATUS_STOP_BY_NO_ENOUGH_MEMORY_E:
- _callmgr_popup_create_toast_msg(_("IDS_CALL_POP_UNABLE_TO_RECORD_NOT_ENOUGH_MEMORY"));
+ _callmgr_popup_create_toast_msg(ad, _("IDS_CALL_POP_UNABLE_TO_RECORD_NOT_ENOUGH_MEMORY"));
break;
default:
ERR("unhandled sub info[%d]", rec_status_sub_info);
switch (toast_popup_type) {
case CALLMGR_POPUP_TOAST_SWAP_CALL:
- _callmgr_popup_create_toast_msg(_("IDS_CALL_TPOP_SWAPPING_CALLS_ING"));
+ _callmgr_popup_create_toast_msg(ad, _("IDS_CALL_TPOP_SWAPPING_CALLS_ING"));
break;
case CALLMGR_POPUP_TOAST_CUSTOM:
// show ad->dial_num string as it is.
- _callmgr_popup_create_toast_msg(_(ad->dial_num));
+ _callmgr_popup_create_toast_msg(ad, _(ad->dial_num));
break;
default:
ERR("unhadled toast popup type(%d)", toast_popup_type);
}
}
+static void __callmgr_popup_toast_dismissed_cb(void *data, Evas_Object *obj, void *event_info)
+{
+ CallMgrPopAppData_t *ad = (CallMgrPopAppData_t *)data;
+
+ if (ad->popup) {
+ evas_object_del(ad->popup);
+ }
+
+ app_control_destroy(ad->request);
+ ad->request = NULL;
+ elm_exit();
+}
+
+static void __callmgr_popup_toast_cb(void *data, Evas_Object *obj, void *event_info)
+{
+ CallMgrPopAppData_t *ad = (CallMgrPopAppData_t *)data;
+ elm_popup_dismiss(ad->popup);
+}
+
static void __callmgr_popup_fm_popup_cancel_cb(void *data, Evas_Object *obj, void *event_info)
{
CallMgrPopAppData_t *ad = (CallMgrPopAppData_t *)data;
evas_object_show(ad->popup);
}
-void _callmgr_popup_create_toast_msg(char *string)
+void _callmgr_popup_create_toast_msg(void *data, char *string)
{
- DBG("Noti-String : %s", string);
+ CallMgrPopAppData_t *ad = (CallMgrPopAppData_t *)data;
+ char *profile = NULL;
- if (string) {
- notification_status_message_post(string);
+ if (!ad->win_main) {
+ ad->win_main = _callmgr_popup_create_win();
+ if (!ad->win_main) {
+ ERR("win error");
+ elm_exit();
+ }
}
+ _callmgr_popup_del_popup(ad);
- elm_exit();
+ system_info_get_platform_string("tizen.org/feature/profile", &profile);
+ if (!profile) {
+ ERR("profile is NULL");
+ return;
+ }
+
+ DBG("Noti-String: %s", string);
+ DBG("profile: %s", profile);
+ if (!g_strcmp0(profile, "mobile")) {
+ /* Add popup in window */
+ ad->popup = elm_popup_add(ad->win_main);
+ elm_object_style_set(ad->popup, "toast");
+ elm_object_text_set(ad->popup, string);
+ elm_popup_timeout_set(ad->popup, 3.0);
+ evas_object_smart_callback_add(ad->popup, "dismissed", __callmgr_popup_toast_dismissed_cb, ad);
+ evas_object_smart_callback_add(ad->popup, "block,clicked", __callmgr_popup_toast_cb, ad);
+ evas_object_smart_callback_add(ad->popup, "timeout", __callmgr_popup_toast_cb, ad);
+ eext_object_event_callback_add(ad->popup, EEXT_CALLBACK_BACK, __callmgr_popup_toast_cb, ad);
+ evas_object_show(ad->popup);
+ } else if (!g_strcmp0(profile, "wearable")) {
+ /* Add popup in window */
+ ad->popup = elm_popup_add(ad->win_main);
+ elm_object_style_set(ad->popup, "toast/circle");
+ elm_object_part_text_set(ad->popup, "elm.text", string);
+ elm_popup_timeout_set(ad->popup, 3.0);
+ evas_object_smart_callback_add(ad->popup, "dismissed", __callmgr_popup_toast_dismissed_cb, ad);
+ evas_object_smart_callback_add(ad->popup, "block,clicked", __callmgr_popup_toast_cb, ad);
+ evas_object_smart_callback_add(ad->popup, "timeout", __callmgr_popup_toast_cb, ad);
+ eext_object_event_callback_add(ad->popup, EEXT_CALLBACK_BACK, __callmgr_popup_toast_cb, ad);
+ evas_object_show(ad->popup);
+ }
+ free(profile);
}
void _callmgr_popup_del_popup(void *data)