Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 00f683cb authored by Nitin Arora's avatar Nitin Arora Committed by Andre Eisenbach
Browse files

Stop media task alarm when task is exiting

Bug: 20717705
Change-Id: I76e76cf33d7c9f4366f921daf2230e4f681098f7
parent 821ce19a
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -741,6 +741,12 @@ void btif_a2dp_stop_media_task(void)
{
    APPL_TRACE_EVENT("## A2DP STOP MEDIA THREAD ##");

    // Stop timer
    alarm_free(btif_media_cb.media_alarm);
    btif_media_cb.media_alarm = NULL;
    btif_media_cb.is_tx_timer = FALSE;

    // Exit thread
    fixed_queue_free(btif_media_cmd_msg_queue, NULL);
    thread_post(worker_thread, btif_media_thread_cleanup, NULL);
    thread_free(worker_thread);