player_state_e play_status = mc_pre_play_get_player_state();
if (PLAYER_STATE_PLAYING == play_status) {
+#if 0 //Enable notification post for play and pause in indicator
+ MP_CHECK(cur_item_data->ad);
+
+ struct app_data *ad = cur_item_data->ad;
+ MP_CHECK(ad);
+ if (!ad->noti) {
+ DEBUG_TRACE("notification create");
+
+ int applist = NOTIFICATION_DISPLAY_APP_INDICATOR;
+ notification_type_e noti_type = NOTIFICATION_TYPE_NOTI;
+ notification_image_type_e img_type = NOTIFICATION_IMAGE_TYPE_ICON_FOR_INDICATOR;
+ int ret = NOTIFICATION_ERROR_NONE;
+
+ char *path = app_get_shared_resource_path();
+
+ char icon_path[1024] = {0};
+ snprintf(icon_path, 1024, "%sshared_images/T02_control_circle_icon_play.png", path);
+ DEBUG_TRACE("Icon Path is : %s", icon_path);
+ free(path);
+
+ notification_delete_all(NOTIFICATION_TYPE_NOTI);
+ ad->noti = notification_create(noti_type);
+ ret = notification_set_image(ad->noti, img_type, icon_path);
+ if (ret != NOTIFICATION_ERROR_NONE) {
+ DEBUG_TRACE("Cannot set the notification image");
+ }
+ ret = notification_set_display_applist(ad->noti, applist);
+ if (ret != NOTIFICATION_ERROR_NONE) {
+ DEBUG_TRACE("Cannot set the display applist");
+ notification_free(ad->noti);
+ }
+ notification_post(ad->noti);
+ }
+#endif
_mc_pre_play_mgr_player_start();
}
_mc_pre_play_mgr_update_play_button_status(cur_item_data);
} else {
elm_object_signal_emit(part_content, "show_pause", "*");
}
+#if 0 //Posts play and pause icon in notification indicator area
mc_post_notification_indicator(it_data, state);
+#endif
//elm_object_item_signal_emit(cur_item_data->it, "show_color" ,"*");
}
elm_theme_extension_add(NULL, edje_path);
free(path);
- if (!ad->noti) {
- DEBUG_TRACE("notification create");
-
- int applist = NOTIFICATION_DISPLAY_APP_INDICATOR;
- notification_type_e noti_type = NOTIFICATION_TYPE_NOTI;
- int ret = NOTIFICATION_ERROR_NONE;
-
- notification_delete_all(NOTIFICATION_TYPE_NOTI);
- ad->noti = notification_create(noti_type);
- ret = notification_set_display_applist(ad->noti, applist);
- if (ret != NOTIFICATION_ERROR_NONE) {
- DEBUG_TRACE("Cannot set the display applist");
- notification_free(ad->noti);
- }
- notification_post(ad->noti);
- }
-
DEBUG_TRACE("end");
return EINA_TRUE;
ad->smat_pipe = NULL;
}
- notification_delete(ad->noti);
- notification_free(ad->noti);
+#if 0 //Free notification handle
+ if (ad->noti) {
+ notification_delete(ad->noti);
+ notification_free(ad->noti);
+ }
+#endif
+
}
}
#ifndef MP_SOUND_PLAYER
+
+ if (!ad->noti) {
+ DEBUG_TRACE("notification create");
+
+ int applist = NOTIFICATION_DISPLAY_APP_INDICATOR;
+ notification_type_e noti_type = NOTIFICATION_TYPE_NOTI;
+ notification_image_type_e img_type = NOTIFICATION_IMAGE_TYPE_ICON_FOR_INDICATOR;
+ int ret = NOTIFICATION_ERROR_NONE;
+
+ char *shared_path = app_get_shared_resource_path();
+ if (!shared_path) {
+ ERROR_TRACE("Shared Resource Path is NULL");
+ }
+
+ char icon_path[1024] = {0};
+ snprintf(icon_path, 1024, "%sshared_images/T02_control_circle_icon_play.png", shared_path);
+ free(shared_path);
+
+ notification_delete_all(NOTIFICATION_TYPE_NOTI);
+ ad->noti = notification_create(noti_type);
+ ret = notification_set_property(ad->noti, NOTIFICATION_PROP_VOLATILE_DISPLAY);
+ if (ret != NOTIFICATION_ERROR_NONE) {
+ DEBUG_TRACE("Cannot set the notification property");
+ }
+ ret = notification_set_image(ad->noti, img_type, icon_path);
+ if (ret != NOTIFICATION_ERROR_NONE) {
+ DEBUG_TRACE("Cannot set the notification image");
+ }
+ ret = notification_set_display_applist(ad->noti, applist);
+ if (ret != NOTIFICATION_ERROR_NONE) {
+ DEBUG_TRACE("Cannot set the display applist");
+ notification_free(ad->noti);
+ }
+ notification_post(ad->noti);
+
+ char *data_path = app_get_data_path();
+ DEBUG_TRACE("Path is: %s", data_path);
+ char playing_status[1024] = {0};
+ if (data_path == NULL) {
+ ERROR_TRACE("unable to get data path");
+ }
+ snprintf(playing_status, 1024, "%s%s", data_path, "NowPlayingStatus");
+ free(data_path);
+
+ if (ad->monitor == NULL) {
+ ad->monitor = ecore_file_monitor_add(playing_status, mp_noti_read_ini_file, NULL);
+ }
+ }
+
if (mp_view_mgr_count_view(GET_VIEW_MGR) == 0) {
mp_common_create_initial_view(ad, NULL, NULL);
evas_object_show(ad->win_main);
conformant = elm_conformant_add(ad->win_main);
MP_CHECK_FALSE(conformant);
-#ifndef MP_SOUND_PLAYER
- if (!ad->noti) {
- DEBUG_TRACE("notification create");
-
- int applist = NOTIFICATION_DISPLAY_APP_INDICATOR;
- notification_type_e noti_type = NOTIFICATION_TYPE_NOTI;
- notification_image_type_e img_type = NOTIFICATION_IMAGE_TYPE_ICON_FOR_INDICATOR;
- int ret = NOTIFICATION_ERROR_NONE;
-
- char *shared_path = app_get_shared_resource_path();
- if (!shared_path) {
- ERROR_TRACE("Shared Resource Path is NULL");
- }
-
- char icon_path[1024] = {0};
- snprintf(icon_path, 1024, "%sshared_images/T02_control_circle_icon_pause.png", shared_path);
- free(shared_path);
-
- notification_delete_all(NOTIFICATION_TYPE_NOTI);
- ad->noti = notification_create(noti_type);
- ret = notification_set_property(ad->noti, NOTIFICATION_PROP_VOLATILE_DISPLAY);
- if (ret != NOTIFICATION_ERROR_NONE) {
- DEBUG_TRACE("Cannot set the notification property");
- }
- ret = notification_set_image(ad->noti, img_type, icon_path);
- if (ret != NOTIFICATION_ERROR_NONE) {
- DEBUG_TRACE("Cannot set the notification image");
- }
- ret = notification_set_display_applist(ad->noti, applist);
- if (ret != NOTIFICATION_ERROR_NONE) {
- DEBUG_TRACE("Cannot set the display applist");
- notification_free(ad->noti);
- }
- notification_post(ad->noti);
-
- char *data_path = app_get_data_path();
- DEBUG_TRACE("Path is: %s", data_path);
- char playing_status[1024] = {0};
- if (data_path == NULL) {
- ERROR_TRACE("unable to get data path");
- }
- snprintf(playing_status, 1024, "%s%s", data_path, "NowPlayingStatus");
- free(data_path);
-
- if (ad->monitor == NULL) {
- ad->monitor = ecore_file_monitor_add(playing_status, mp_noti_read_ini_file, NULL);
- }
- }
-#endif
-
elm_object_signal_emit(conformant, "elm,state,indicator,overlap", "");
evas_object_data_set(conformant, "overlap", (void *)EINA_TRUE);
mp_setting_set_nowplaying_id(0);
#endif
- ecore_file_monitor_del(ad->monitor);
+ if (ad->monitor) {
+ ecore_file_monitor_del(ad->monitor);
+ }
mp_language_mgr_destroy();
mp_ecore_idler_del(ad->app_init_idler);
mp_ecore_timer_del(ad->longpress_timer);
#endif
#ifndef MP_SOUND_PLAYER
- notification_delete(ad->noti);
- notification_free(ad->noti);
+ if (ad->noti) {
+ notification_delete(ad->noti);
+ notification_free(ad->noti);
+ }
#endif
return;
}