Made changes to notification icon in indicator area 02/76002/2 submit/tizen/20160623.045239
authorbhutani.92 <bhutani.92@samsung.com>
Wed, 22 Jun 2016 10:18:15 +0000 (15:48 +0530)
committerAkhil Bhutani <bhutani.92@samsung.com>
Wed, 22 Jun 2016 10:05:56 +0000 (03:05 -0700)
Change-Id: Id4fc8e72e6f41d9eae6ba5d8ee10074a5c5633ce
Signed-off-by: bhutani.92 <bhutani.92@samsung.com>
music-chooser/src/mc-track-list.c
src/common/mp-util.c
src/mp-main.c

index 6aecb93..c72617a 100755 (executable)
@@ -127,9 +127,9 @@ void mc_post_notification_indicator(list_item_data_t *it_data, player_state_e st
        char icon_path[1024] = {0};
 
        if (state == PLAYER_STATE_PLAYING || state == PLAYER_STATE_IDLE) {
-               snprintf(icon_path, 1024, "%sshared_images/T02_control_circle_icon_pause.png", path);
-       } else {
                snprintf(icon_path, 1024, "%sshared_images/T02_control_circle_icon_play.png", path);
+       } else {
+               snprintf(icon_path, 1024, "%sshared_images/T02_control_circle_icon_pause.png", path);
        }
        free(path);
 
index 2ff98fe..a68ffa3 100755 (executable)
@@ -2635,7 +2635,7 @@ const char *util_get_file_path(const char *relative)
        return &buf[0];
 }
 
-
+#ifndef SOUND_PLAYER
 void mp_post_notification_indicator(char *status)
 {
        startfunc;
@@ -2652,9 +2652,9 @@ void mp_post_notification_indicator(char *status)
        char icon_path[1024] = {0};
 
        if (!strcmp(status, "playing")) {
-               snprintf(icon_path, 1024, "%sshared_images/T02_control_circle_icon_pause.png", path);
-       } else {
                snprintf(icon_path, 1024, "%sshared_images/T02_control_circle_icon_play.png", path);
+       } else {
+               snprintf(icon_path, 1024, "%sshared_images/T02_control_circle_icon_pause.png", path);
        }
        free(path);
 
@@ -2662,6 +2662,10 @@ void mp_post_notification_indicator(char *status)
                DEBUG_TRACE("notification create");
                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");
@@ -2718,3 +2722,4 @@ void mp_noti_read_ini_file(void *data, Ecore_File_Monitor *em, Ecore_File_Event
 
        fclose(file);
 }
+#endif
index 17c113e..123a2b8 100755 (executable)
@@ -1604,8 +1604,10 @@ mp_terminate(void *data)
        mp_music_view_mgr_release();
 #endif
 
+#ifndef SOUND_PLAYER
        notification_delete(ad->noti);
        notification_free(ad->noti);
+#endif
        return;
 }
 
@@ -1828,7 +1830,7 @@ app_control(app_control_h app_control, void *data)
        }
        PROFILE_OUT("mp_service");
 
-
+#ifndef SOUND_PLAYER
        char *path = app_get_data_path();
        DEBUG_TRACE("Path is: %s", path);
        char playing_status[1024] = {0};
@@ -1841,6 +1843,7 @@ app_control(app_control_h app_control, void *data)
        if (ad->monitor == NULL) {
                ad->monitor = ecore_file_monitor_add(playing_status, mp_noti_read_ini_file, NULL);
        }
+#endif
 
 
 #ifdef MP_DEBUG_MODE