MP_DIR_HTTP
}mp_dir_e;
+enum {
+ PREF_PLAYER_OFF = 0x00,
+ PREF_PLAYER_ON
+};
+
enum {
PREF_MUSIC_OFF = 0x00,
PREF_MUSIC_PLAY,
#define GET_WINDOW() ((mp_util_get_appdata()) ? mp_util_get_appdata()->win_main : NULL)
#define CHECK_STORE mp_util_is_store_enable()
#define PREF_MUSIC_STATE "preference/org.tizen.music-player/state"
+#define PREF_SOUND_PLAYER_LAUNCH "preference/org.tizen.sound-player/launch_state"
+#define PREF_MUSIC_PLAYER_LAUNCH "preference/org.tizen.music-player/launch_state"
int mp_setting_get_nowplaying_id(void);
bool mp_util_is_streaming(const char *uri);
ad->player_state = PLAY_STATE_PLAYING;
-#ifndef MP_SOUND_PLAYER
-
if (!ad->noti) {
DEBUG_TRACE("notification create");
snprintf(icon_path, 1024, "%sshared_images/T02_control_circle_icon_play.png", shared_path);
free(shared_path);
- notification_delete_all(NOTIFICATION_TYPE_NOTI);
+#ifdef MP_SOUND_PLAYER
+ notification_delete_all_by_type("org.tizen.music-player", NOTIFICATION_TYPE_NOTI);
+#else
+ notification_delete_all_by_type("org.tizen.sound-player", NOTIFICATION_TYPE_NOTI);
+#endif
ad->noti = notification_create(noti_type);
+#ifdef MP_SOUND_PLAYER
+ const char *tag = "minicontrol_sound";
+#else
const char *tag = "minicontrol_music";
+#endif
ret = notification_set_tag(ad->noti, tag);
if (ret != NOTIFICATION_ERROR_NONE) {
DEBUG_TRACE("Unable to set tag [%d]", ret);
ad->create_view_on_play = false;
ad->preload_player_view = NULL;
}
-#endif
mp_ecore_idler_del(ad->create_on_play_lay_idler);
_mp_play_start_lazy(ad);
ad->music_setting_change_flag = false;
ad->paused_by_user = true;
+#ifdef MP_SOUND_PLAYER
+ preference_set_int(PREF_SOUND_PLAYER_LAUNCH, PREF_PLAYER_ON);
+#else
+ preference_set_int(PREF_MUSIC_PLAYER_LAUNCH, PREF_PLAYER_ON);
+#endif
+
mp_media_info_connect();
- int state = RECORDER_DEVICE_STATE_IDLE;
+ recorder_device_state_e state = RECORDER_DEVICE_STATE_IDLE;
recorder_get_device_state(RECORDER_TYPE_VIDEO, &state);
- DEBUG_TRACE("Recorder state: %d", state);
int ret = recorder_add_device_state_changed_cb(mp_recorder_state_cb, ad, &ad->recorder_id);
if (ret != RECORDER_ERROR_NONE) {
DEBUG_TRACE_FUNC();
mp_retm_if(ad == NULL, "ad is null");
+#ifdef MP_SOUND_PLAYER
+ preference_set_int(PREF_SOUND_PLAYER_LAUNCH, PREF_PLAYER_OFF);
+#else
+ preference_set_int(PREF_MUSIC_PLAYER_LAUNCH, PREF_PLAYER_OFF);
+#endif
+
mp_volume_finalize();
- int ret = recorder_remove_device_state_changed_cb(ad->recorder_id);
+ int ret = RECORDER_ERROR_NONE;
+ ret = recorder_remove_device_state_changed_cb(ad->recorder_id);
if (ret != RECORDER_ERROR_NONE) {
ERROR_TRACE("Unable to remove callback for recorder state");
}
mp_music_view_mgr_release();
#endif
-#ifndef MP_SOUND_PLAYER
- if (ad->noti) {
- notification_delete(ad->noti);
- notification_free(ad->noti);
+ int music_state = PREF_PLAYER_OFF;
+ int sound_state = PREF_PLAYER_OFF;
+ ret = PREFERENCE_ERROR_NONE;
+ ret = preference_get_int(PREF_MUSIC_PLAYER_LAUNCH, &music_state);
+ if (ret != PREFERENCE_ERROR_NONE) {
+ ERROR_TRACE("Cannot determine PREF_MUSIC_PLAYER_LAUNCH key value");
+ music_state = PREF_PLAYER_OFF;
+ }
+ ret = PREFERENCE_ERROR_NONE;
+ ret = preference_get_int(PREF_SOUND_PLAYER_LAUNCH, &sound_state);
+ if (ret != PREFERENCE_ERROR_NONE) {
+ ERROR_TRACE("Cannot determine PREF_SOUND_PLAYER_LAUNCH key value");
+ sound_state = PREF_PLAYER_OFF;
+ }
+ if (music_state == PREF_PLAYER_OFF && sound_state == PREF_PLAYER_OFF) {
+ DEBUG_TRACE("Removing indicator icon from notification panel");
+ if (ad->noti) {
+ notification_delete_all_by_type("org.tizen.music-player", NOTIFICATION_TYPE_NOTI);
+ notification_delete_all_by_type("org.tizen.sound-player", NOTIFICATION_TYPE_NOTI);
+ notification_free(ad->noti);
+ }
}
-#endif
return;
}