Code: static void a2dp_open_ctrl_path(struct a2dp_stream_common *common)
{
 int i;

 /* retry logic to catch any timing variations on control channel */
 for (i = 0; i < CTRL_CHAN_RETRY_COUNT; i++)
 {
 /* connect control channel if not already connected */
 if ((common->ctrl_fd = skt_connect(A2DP_CTRL_PATH, common->buffer_sz)) > 0)
 {
 /* success, now check if stack is ready */
 if (check_a2dp_ready(common) == 0)

                 break;
 
             ERROR("error : a2dp not ready, wait 250 ms and retry");
            usleep(250000);
             skt_disconnect(common->ctrl_fd);
             common->ctrl_fd = AUDIO_SKT_DISCONNECTED;
         }
 
         /* ctrl channel not ready, wait a bit */
        usleep(250000);
     }
 }

Vulnerability Type: DoS 
CWE ID: CWE-284
Summary: Bluetooth in Android 4.x before 4.4.4, 5.0.x before 5.0.2, 5.1.x before 5.1.1, and 6.x before 2016-08-01 allows attackers to cause a denial of service (loss of Bluetooth 911 functionality) via a crafted application that sends a signal to a Bluetooth process, aka internal bug 28885210.
Commit Message: DO NOT MERGE Fix potential DoS caused by delivering signal to BT process

Bug: 28885210
Change-Id: I63866d894bfca47464d6e42e3fb0357c4f94d360

 Conflicts:
	btif/co/bta_hh_co.c
	btif/src/btif_core.c
Merge conflict resolution of ag/1161415 (referencing ag/1164670)
- Directly into mnc-mr2-release
