} else {
mc_common_push_track_view_by_group_name(ld->ad, track_type, name, playlist_id, NULL);
}
- free(folder);
}
static void
return;
}
+ DEBUG_TRACE("Media Key : %d", key);
+ if (_mp_is_current_focus_available(ad) != 0) {
+ if (key == MEDIA_KEY_PLAY) {
+ ERROR_TRACE("Some other application has the focus currently... Returning...");
+ return;
+ } else {
+ ERROR_TRACE("Some other application has the focus currently... Changing state in paused state...");
+ ad->paused_by_user = TRUE;
+ }
+ }
+
switch (key) {
case MEDIA_KEY_PLAY:
if (released) {
DEBUG_TRACE("reason for change is %d", reason_for_change);
if (reason_for_change == SOUND_STREAM_FOCUS_CHANGED_BY_VOIP ||
reason_for_change == SOUND_STREAM_FOCUS_CHANGED_BY_CALL ||
- reason_for_change == SOUND_STREAM_FOCUS_CHANGED_BY_RINGTONE) {
+ reason_for_change == SOUND_STREAM_FOCUS_CHANGED_BY_RINGTONE ||
+ reason_for_change == SOUND_STREAM_FOCUS_CHANGED_BY_VOICE_RECOGNITION) {
sound_manager_set_focus_reacquisition(ad->stream_info, EINA_TRUE);
} else if (reason_for_change != SOUND_STREAM_FOCUS_CHANGED_BY_ALARM &&
reason_for_change != SOUND_STREAM_FOCUS_CHANGED_BY_NOTIFICATION) {
bool mp_minicontroller_visible_get(struct appdata *ad);
void mp_minicontroller_on_lcd_event(struct appdata *ad, bool lcd_on);
void mp_minicontroller_update_progressbar(struct appdata *ad);
+int _mp_is_current_focus_available(struct appdata *ad);
#endif
}
#endif
-static int _mp_is_current_focus_available(struct appdata *ad)
+int _mp_is_current_focus_available(struct appdata *ad)
{
sound_stream_focus_change_reason_e changed_by = SOUND_STREAM_FOCUS_CHANGED_BY_MEDIA;
int ret = SOUND_MANAGER_ERROR_NONE;