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

static void btif_hh_handle_evt(UINT16 event, char *p_param)
{
 bt_bdaddr_t *bd_addr = (bt_bdaddr_t*)p_param;
    BTIF_TRACE_EVENT("%s: event=%d", __FUNCTION__, event);
 int ret;
 switch(event)
 {
 case BTIF_HH_CONNECT_REQ_EVT:
 {
            ret = btif_hh_connect(bd_addr);
 if(ret == BT_STATUS_SUCCESS)
 {
                HAL_CBACK(bt_hh_callbacks, connection_state_cb,bd_addr,BTHH_CONN_STATE_CONNECTING);
 }
 else
                HAL_CBACK(bt_hh_callbacks, connection_state_cb,bd_addr,BTHH_CONN_STATE_DISCONNECTED);
 }
 break;

 case BTIF_HH_DISCONNECT_REQ_EVT:
 {
            BTIF_TRACE_EVENT("%s: event=%d", __FUNCTION__, event);
            btif_hh_disconnect(bd_addr);
            HAL_CBACK(bt_hh_callbacks, connection_state_cb,bd_addr,BTHH_CONN_STATE_DISCONNECTING);
 }
 break;

 case BTIF_HH_VUP_REQ_EVT:
 {
            BTIF_TRACE_EVENT("%s: event=%d", __FUNCTION__, event);
            ret = btif_hh_virtual_unplug(bd_addr);
 }
 break;

 default:
 {
            BTIF_TRACE_WARNING("%s : Unknown event 0x%x", __FUNCTION__, event);
 }
 break;
 }
}

static void btif_hh_handle_evt(UINT16 event, char *p_param)
{
 bt_bdaddr_t *bd_addr = (bt_bdaddr_t*)p_param;
    BTIF_TRACE_EVENT("%s: event=%d", __FUNCTION__, event);
 int ret;
 switch(event)
 {
 case BTIF_HH_CONNECT_REQ_EVT:
 {
            ret = btif_hh_connect(bd_addr);
 if(ret == BT_STATUS_SUCCESS)
 {
                HAL_CBACK(bt_hh_callbacks, connection_state_cb,bd_addr,BTHH_CONN_STATE_CONNECTING);
 }
 else
                HAL_CBACK(bt_hh_callbacks, connection_state_cb,bd_addr,BTHH_CONN_STATE_DISCONNECTED);
 }
 break;

 case BTIF_HH_DISCONNECT_REQ_EVT:
 {
            BTIF_TRACE_EVENT("%s: event=%d", __FUNCTION__, event);
            btif_hh_disconnect(bd_addr);
            HAL_CBACK(bt_hh_callbacks, connection_state_cb,bd_addr,BTHH_CONN_STATE_DISCONNECTING);
 }
 break;

 case BTIF_HH_VUP_REQ_EVT:
 {
            BTIF_TRACE_EVENT("%s: event=%d", __FUNCTION__, event);
            ret = btif_hh_virtual_unplug(bd_addr);
 }
 break;

 default:
 {
            BTIF_TRACE_WARNING("%s : Unknown event 0x%x", __FUNCTION__, event);
 }
 break;
 }
}
